diff options
Diffstat (limited to '.config/fish')
| -rw-r--r-- | .config/fish/completions/nvm.fish | 21 | ||||
| -rw-r--r-- | .config/fish/config.fish | 16 | ||||
| -rw-r--r-- | .config/fish/fish_plugins | 2 | ||||
| -rw-r--r-- | .config/fish/fish_variables | 8 | ||||
| -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 |
7 files changed, 55 insertions, 10 deletions
diff --git a/.config/fish/completions/nvm.fish b/.config/fish/completions/nvm.fish new file mode 100644 index 0000000..14be1b7 --- /dev/null +++ b/.config/fish/completions/nvm.fish | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | complete --command nvm --exclusive | ||
| 2 | complete --command nvm --exclusive --long version --description "Print version" | ||
| 3 | complete --command nvm --exclusive --long help --description "Print help" | ||
| 4 | complete --command nvm --long silent --description "Suppress standard output" | ||
| 5 | |||
| 6 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" | ||
| 7 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell" | ||
| 8 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions" | ||
| 9 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install" | ||
| 10 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version" | ||
| 11 | complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( | ||
| 12 | test -e $nvm_data && string split ' ' <$nvm_data/.index | ||
| 13 | )" | ||
| 14 | complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" | ||
| 15 | complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version" | ||
| 16 | complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( | ||
| 17 | _nvm_list | string split ' ' | string replace system '' | ||
| 18 | )" | ||
| 19 | complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( | ||
| 20 | set --query nvm_default_version && echo default | ||
| 21 | )" | ||
diff --git a/.config/fish/config.fish b/.config/fish/config.fish index adcbe4a..7dce7a2 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish | |||
| @@ -8,6 +8,7 @@ set --global --export GOPATH $HOME/.local/share/go | |||
| 8 | set --global --export GPG_TTY (tty) | 8 | set --global --export GPG_TTY (tty) |
| 9 | set --global fish_prompt_pwd_dir_length 0 | 9 | set --global fish_prompt_pwd_dir_length 0 |
| 10 | set --global direnv_fish_mode eval_on_arrow | 10 | set --global direnv_fish_mode eval_on_arrow |
| 11 | set --global VIRTUAL_ENV_DISABLE_PROMPT true | ||
| 11 | 12 | ||
| 12 | # nnn | 13 | # nnn |
| 13 | set --global --export NNN_OPENER $HOME/.local/bin/nuke | 14 | set --global --export NNN_OPENER $HOME/.local/bin/nuke |
| @@ -23,6 +24,7 @@ set --global --export WECHALLTOKEN "35624-0D38B-A2F16-A98B0-5963D-6DF19" | |||
| 23 | set --global --export RUST_SRC_PATH (rustc --print sysroot)/lib/rustlib/src/rust/library/ | 24 | set --global --export RUST_SRC_PATH (rustc --print sysroot)/lib/rustlib/src/rust/library/ |
| 24 | set --global --export NLTK_DATA "$HOME/.local/share/nltk_data" | 25 | set --global --export NLTK_DATA "$HOME/.local/share/nltk_data" |
| 25 | set --global --export VIRTUALFISH_HOME "$HOME/.local/share/venvs/" | 26 | set --global --export VIRTUALFISH_HOME "$HOME/.local/share/venvs/" |
| 27 | set --global --export STARDICT_DATA_DIR "$HOME/.local/share/dict/" | ||
| 26 | 28 | ||
| 27 | 29 | ||
| 28 | if status is-interactive | 30 | if status is-interactive |
| @@ -31,21 +33,17 @@ if status is-interactive | |||
| 31 | abbr --add --global bc 'bc -l' | 33 | abbr --add --global bc 'bc -l' |
| 32 | abbr --add --global bo 'bukuopener' | 34 | abbr --add --global bo 'bukuopener' |
| 33 | abbr --add --global cp 'cp -i' | 35 | abbr --add --global cp 'cp -i' |
| 34 | abbr --add --global C 'xsel -b' # Copy to clipboard | ||
| 35 | abbr --add --global df 'df -h' | 36 | abbr --add --global df 'df -h' |
| 36 | abbr --add --global free 'free -m' | 37 | abbr --add --global free 'free -m' |
| 37 | abbr --add --global gst 'git status' | 38 | abbr --add --global gst 'git status' |
| 38 | abbr --add --global guno 'git status -uno' | 39 | abbr --add --global guno 'git status -uno' |
| 39 | abbr --add --global inc 'task +in +PENDING count' | 40 | abbr --add --global inc 'task +in +PENDING count' |
| 40 | abbr --add --global in 'task add +in' | 41 | abbr --add --global in 'task add +in' |
| 41 | abbr --add --global ledger "ledger -f ~/nextcloud/virtuals/ledger.ledger" | ||
| 42 | abbr --add --global lim 'nvim /home/yigit/nextcloud/virtuals/ledger.ledger' | ||
| 43 | abbr --add --global ls 'exa' | 42 | abbr --add --global ls 'exa' |
| 44 | abbr --add --global maybe 'task due:someday list' | 43 | abbr --add --global maybe 'task due:someday list' |
| 45 | abbr --add --global music 'mpv --no-vid' | 44 | abbr --add --global music 'mpv --no-vid' |
| 46 | abbr --add --global mv 'mv -i' | 45 | abbr --add --global mv 'mv -i' |
| 47 | abbr --add --global nt 'neomutt' | 46 | abbr --add --global nt 'neomutt' |
| 48 | abbr --add --global report "report -f ~/nextcloud/virtuals/ledger.ledger" | ||
| 49 | abbr --add --global re 'remi -gaad -@2' | 47 | abbr --add --global re 'remi -gaad -@2' |
| 50 | abbr --add --global rm 'rm -i' | 48 | abbr --add --global rm 'rm -i' |
| 51 | abbr --add --global s "du -hs * | sort -rh | head -5" | 49 | abbr --add --global s "du -hs * | sort -rh | head -5" |
| @@ -60,9 +58,19 @@ if status is-interactive | |||
| 60 | abbr --add --global wim 'nvim /home/yigit/nextcloud/personal_wiki/text/index.wiki' | 58 | abbr --add --global wim 'nvim /home/yigit/nextcloud/personal_wiki/text/index.wiki' |
| 61 | abbr --add --global yst 'yadm status' | 59 | abbr --add --global yst 'yadm status' |
| 62 | abbr --add --global dr 'dragon-drop' | 60 | abbr --add --global dr 'dragon-drop' |
| 61 | abbr --add --global ddg 'surfraw duckduckgo -j' | ||
| 62 | abbr --add --global lu 'sdcv' | ||
| 63 | |||
| 64 | if test "$WAYLAND_DISPLAY" = "wayland-1" | ||
| 65 | abbr --add --global C 'wl-copy' # Wayland | ||
| 66 | else | ||
| 67 | abbr --add --global C 'xsel -b' # X11 | ||
| 68 | end | ||
| 63 | 69 | ||
| 64 | zoxide init fish | source | 70 | zoxide init fish | source |
| 65 | direnv hook fish | source | 71 | direnv hook fish | source |
| 72 | fzf --fish | source | ||
| 73 | atuin init fish --disable-up-arrow | source | ||
| 66 | 74 | ||
| 67 | fish_ssh_agent | 75 | fish_ssh_agent |
| 68 | end | 76 | end |
diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins new file mode 100644 index 0000000..49bfe20 --- /dev/null +++ b/.config/fish/fish_plugins | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | jorgebucaran/nvm.fish | ||
| 2 | franciscolourenco/done | ||
diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index e8b58fb..6120a57 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables | |||
| @@ -1,7 +1,11 @@ | |||
| 1 | # This file contains fish universal variable definitions. | 1 | # This file contains fish universal variable definitions. |
| 2 | # VERSION: 3.0 | 2 | # VERSION: 3.0 |
| 3 | SETUVAR __fish_initialized:3400 | 3 | SETUVAR __fish_initialized:3800 |
| 4 | SETUVAR _fish_abbr_dr:dragon\x2ddrop | 4 | SETUVAR _fish_abbr_dr:dragon\x2ddrop |
| 5 | SETUVAR _fisher_franciscolourenco_2F_done_files:\x7e/\x2econfig/fish/conf\x2ed/done\x2efish | ||
| 6 | SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:\x7e/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_list\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e\x7e/\x2econfig/fish/functions/nvm\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e\x7e/\x2econfig/fish/completions/nvm\x2efish | ||
| 7 | SETUVAR _fisher_plugins:jorgebucaran/nvm\x2efish\x1efranciscolourenco/done | ||
| 8 | SETUVAR _fisher_upgraded_to_4_4:\x1d | ||
| 5 | SETUVAR fish_color_autosuggestion:6c7086 | 9 | SETUVAR fish_color_autosuggestion:6c7086 |
| 6 | SETUVAR fish_color_cancel:f38ba8 | 10 | SETUVAR fish_color_cancel:f38ba8 |
| 7 | SETUVAR fish_color_command:89b4fa | 11 | SETUVAR fish_color_command:89b4fa |
| @@ -42,4 +46,4 @@ SETUVAR fish_pager_color_selected_background:\x1d | |||
| 42 | SETUVAR fish_pager_color_selected_completion:\x1d | 46 | SETUVAR fish_pager_color_selected_completion:\x1d |
| 43 | SETUVAR fish_pager_color_selected_description:\x1d | 47 | SETUVAR fish_pager_color_selected_description:\x1d |
| 44 | SETUVAR fish_pager_color_selected_prefix:\x1d | 48 | SETUVAR fish_pager_color_selected_prefix:\x1d |
| 45 | SETUVAR fish_user_paths:/home/yigit/\x2ecargo/bin\x1e/home/yigit/\x2elocal/bin | 49 | SETUVAR fish_user_paths:/home/yigit/\x2enix\x2dprofile/bin\x1e/home/yigit/\x2ecargo/bin\x1e/home/yigit/\x2elocal/bin |
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 | ||
