Compare commits
2 Commits
041519c682
...
ba3d8bc5f9
Author | SHA1 | Date | |
---|---|---|---|
ba3d8bc5f9 | |||
646c43f8d7 |
@ -1,3 +1,7 @@
|
||||
if test -z "$SYSTEM_PROFILE"
|
||||
set -gx SYSTEM_PROFILE SLIM
|
||||
end
|
||||
|
||||
source ~/.config/fish/aliases.fish
|
||||
|
||||
# Set GPG_TTY
|
||||
|
@ -1,12 +1,12 @@
|
||||
function fish_right_prompt
|
||||
if test $SYSTEM_PROFILE != "DEFAULT"
|
||||
if test $SYSTEM_PROFILE = "MINIMAL"
|
||||
return
|
||||
end
|
||||
|
||||
set -l usercolor (set_color $fish_color_cwd)
|
||||
if command -sq cksum
|
||||
# randomised color for user/hostname based on disco.fish
|
||||
set -l shas (echo $USER@$hostname | cksum | string split -f1 ' ' | math --base=hex | string sub -s 3 | string pad -c 0 -w 6 | string match -ra ..)
|
||||
set -l shas (echo $USER$hostname | cksum | string split -f1 ' ' | math --base=hex | string sub -s 3 | string pad -c 0 -w 6 | string match -ra ..)
|
||||
set -l col 0x$shas[1..3]
|
||||
|
||||
# ensure luminance is readable
|
||||
@ -41,5 +41,10 @@ function fish_right_prompt
|
||||
(set_color normal)
|
||||
end
|
||||
function fish_prompt
|
||||
printf '%s%s%s> ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
if fish_is_root_user
|
||||
set letter '#'
|
||||
else
|
||||
set letter '>'
|
||||
end
|
||||
printf '%s%s%s%s ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) $letter
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user