diff options
Diffstat (limited to '.config/fish/functions')
-rw-r--r-- | .config/fish/functions/fish_right_prompt.fish | 7 | ||||
-rw-r--r-- | .config/fish/functions/fish_user_key_bindings.fish | 3 | ||||
-rw-r--r-- | .config/fish/functions/sessiontype.fish | 8 |
3 files changed, 14 insertions, 4 deletions
diff --git a/.config/fish/functions/fish_right_prompt.fish b/.config/fish/functions/fish_right_prompt.fish index 5963ed9..1e28dfc 100644 --- a/.config/fish/functions/fish_right_prompt.fish +++ b/.config/fish/functions/fish_right_prompt.fish | |||
@@ -76,6 +76,11 @@ function fish_right_prompt --description 'Write out the right prompt' | |||
76 | set virtualenv "$green 🐍 " (basename "$VIRTUAL_ENV") | 76 | set virtualenv "$green 🐍 " (basename "$VIRTUAL_ENV") |
77 | end | 77 | end |
78 | 78 | ||
79 | set -l node_version | ||
80 | if set -q nvm_current_version | ||
81 | set node_version "$red " "$nvm_current_version" | ||
82 | end | ||
83 | |||
79 | set hour $blue(date '+%R') | 84 | set hour $blue(date '+%R') |
80 | echo -n -s $virtualenv ' ' $repo_info ' ' $hour | 85 | echo -n -s $node_version ' ' $virtualenv ' ' $repo_info ' ' $hour |
81 | end | 86 | end |
diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish deleted file mode 100644 index ff0d9f3..0000000 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | function fish_user_key_bindings | ||
2 | fzf_key_bindings | ||
3 | end | ||
diff --git a/.config/fish/functions/sessiontype.fish b/.config/fish/functions/sessiontype.fish new file mode 100644 index 0000000..33830ca --- /dev/null +++ b/.config/fish/functions/sessiontype.fish | |||
@@ -0,0 +1,8 @@ | |||
1 | # https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972 | ||
2 | |||
3 | function sessiontype | ||
4 | # https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972 | ||
5 | # have to run it first? | ||
6 | loginctl > /dev/null | ||
7 | loginctl show-session (loginctl | awk '/tty/ {print $1}') -p Type | awk -F= '{print $2}' | ||
8 | end | ||