Sfoglia il codice sorgente

shell stuff

master
parent
commit
c12a198bc7
3 ha cambiato i file con 15 aggiunte e 12 eliminazioni
  1. +1
    -1
      defaults/main.yaml
  2. +13
    -11
      files/shells/xonsh/xonshrc
  3. +1
    -0
      vars/main.yaml

+ 1
- 1
defaults/main.yaml Vedi File

@@ -8,7 +8,7 @@ locales_gen:
- de_DE.UTF-8

root_ssh_key: false
root_shell: /usr/bin/xonsh
root_shell: /usr/bin/fish

debian_distribution: bullseye
debian_components:


+ 13
- 11
files/shells/xonsh/xonshrc Vedi File

@@ -1,13 +1,15 @@
xontrib load abbrevs coreutils

# title
$PROMPT_FIELDS['title'] = lambda: '' if 'XDG_SESSION_TYPE' in ${...} && $XDG_SESSION_TYPE=='x11' \
else $USER+'@'+$HOSTNAME+':'
$TITLE = '{current_job:{} | }{title}{cwd}'

# prompt
$PROMPT_FIELDS['prompt_end'] = lambda: '{INTENSE_RED}#@' if $USER == "root" else '{GREEN}@'
$PROMPT = lambda: ('' if 'XDG_SESSION_TYPE' in ${...} && $XDG_SESSION_TYPE=='x11' \
else ('{INTENSE_GREEN}{user}{WHITE}@{BOLD_WHITE}' if $USER != "root" and $USER != "toor" \
else '{BOLD_RED}')+'{hostname}{WHITE}:')+'{BOLD_BLUE}{cwd}{DEFAULT}{gitstatus: [{}]} {prompt_end} '

# multiline prompt
$MULTILINE_PROMPT=''
$PROMPT = lambda: '{user}@{hostname}:{cwd} {gitstatus: [{}]}{prompt_end} '
$PROMPT_FIELDS['prompt_end'] = lambda: '{INTENSE_RED}@#' if $USER == "root" else '{GREEN}@'
def prompt():
p = ''
if $USER != "root" or $USER != "toor":
p = '{INTENSE_GREEN}{user}{WHITE}@{INTENSE_CYAN}{hostname}'
else:
p = '{INTENSE_RED}{hostname}'
p += '{WHITE}:{INTENSE_YELLOW}{cwd} {DEFAULT}{gitstatus: [{}]}{prompt_end} '
return p
$PROMPT = prompt

+ 1
- 0
vars/main.yaml Vedi File

@@ -54,6 +54,7 @@ debian_common_packages:
- jo
- pv
- qrencode
- moreutils

# languages
- python3