diff options
-rw-r--r-- | fish/.config/fish/config.fish | 1 | ||||
-rw-r--r-- | fish/.config/fish/functions/fish_prompt.fish | 10 | ||||
-rw-r--r-- | fish/.config/fish/functions/fish_right_prompt.fish | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index f7fd5a4..c1d41a4 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -11,3 +11,4 @@ alias dict='sdcv' alias mp3-dl='youtube-dl --extract-audio --audio-format mp3' eval (dircolors -c ~/.dir_colors) +eval (python -m virtualfish) diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index 4a0c974..80804ed 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -23,6 +23,10 @@ function fish_prompt echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" + if set -q VIRTUAL_ENV + echo -n -s ' (' (basename "$VIRTUAL_ENV") ') ' + end + if test $last_status -gt 0 set_color $fish_color_cwd_root echo -n -s ' ‣ ' @@ -31,9 +35,3 @@ function fish_prompt echo -n -s ' ‣ ' end end - -function fish_right_prompt - set_color $fish_color_autosuggestion - date '+%H:%M:%S' - set_color normal -end diff --git a/fish/.config/fish/functions/fish_right_prompt.fish b/fish/.config/fish/functions/fish_right_prompt.fish new file mode 100644 index 0000000..6bcfd23 --- /dev/null +++ b/fish/.config/fish/functions/fish_right_prompt.fish @@ -0,0 +1,5 @@ +function fish_right_prompt + set_color $fish_color_autosuggestion + date '+%H:%M:%S' + set_color normal +end |