|
@@ -1,13 +1,15 @@ |
|
|
xontrib load abbrevs coreutils |
|
|
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='' |
|
|
$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 |
|
|
|