feat(fish): add some plugins, update functions
This commit is contained in:
25
.config/fish/conf.d/puffer_fish_key_bindings.fish
Normal file
25
.config/fish/conf.d/puffer_fish_key_bindings.fish
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
status is-interactive || exit
|
||||||
|
|
||||||
|
function _puffer_fish_key_bindings --on-variable fish_key_bindings
|
||||||
|
set -l modes
|
||||||
|
if test "$fish_key_bindings" = fish_default_key_bindings
|
||||||
|
set modes default insert
|
||||||
|
else
|
||||||
|
set modes insert default
|
||||||
|
end
|
||||||
|
|
||||||
|
bind --mode $modes[1] . _puffer_fish_expand_dots
|
||||||
|
bind --mode $modes[1] ! _puffer_fish_expand_bang
|
||||||
|
bind --mode $modes[1] '$' _puffer_fish_expand_lastarg
|
||||||
|
bind --mode $modes[2] --erase . ! '$'
|
||||||
|
end
|
||||||
|
|
||||||
|
_puffer_fish_key_bindings
|
||||||
|
|
||||||
|
set -l uninstall_event puffer_fish_key_bindings_uninstall
|
||||||
|
|
||||||
|
function _$uninstall_event --on-event $uninstall_event
|
||||||
|
bind -e .
|
||||||
|
bind -e !
|
||||||
|
bind -e '$'
|
||||||
|
end
|
||||||
1
.config/fish/fish_plugins
Normal file
1
.config/fish/fish_plugins
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nickeb96/puffer-fish
|
||||||
@@ -2,13 +2,12 @@
|
|||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR --export BAT_THEME:OneHalfDark
|
SETUVAR --export BAT_THEME:OneHalfDark
|
||||||
SETUVAR --export EDITOR:nvim
|
SETUVAR --export EDITOR:nvim
|
||||||
SETUVAR --export ELECTRON_OSZONE_PLATFORM_HINT:wayland
|
|
||||||
SETUVAR --export ELECTRON_OZONE_PLATFORM_HINT:wayland
|
SETUVAR --export ELECTRON_OZONE_PLATFORM_HINT:wayland
|
||||||
SETUVAR FLASK_ENV:development
|
SETUVAR FLASK_ENV:development
|
||||||
SETUVAR --export --path GODOT_ADDON_PATH:\x7e/\x2elocal/share/godot/addons
|
SETUVAR --export --path GODOT_ADDON_PATH:\x7e/\x2elocal/share/godot/addons
|
||||||
SETUVAR LANG:en_GB\x2eUTF\x2d8
|
SETUVAR LANG:en_GB\x2eUTF\x2d8
|
||||||
SETUVAR LANGUAGE:en_GB\x2eUTF\x2d8
|
SETUVAR LANGUAGE:en_GB\x2eUTF\x2d8
|
||||||
SETUVAR --export LAST_DIR:/home/felix/Code/CODE/tutorials/rust_web_server
|
SETUVAR --export LAST_DIR:/home/felix/Code/side/advent_of_code_2024
|
||||||
SETUVAR --export MY_GITLAB_TOKEN:glpat\x2dye6rAJswy24rQcRNnmLo
|
SETUVAR --export MY_GITLAB_TOKEN:glpat\x2dye6rAJswy24rQcRNnmLo
|
||||||
SETUVAR --export RUSTC_WRAPPER:sccache
|
SETUVAR --export RUSTC_WRAPPER:sccache
|
||||||
SETUVAR --export SUDO_ASKPASS:/usr/bin/ksshaskpass
|
SETUVAR --export SUDO_ASKPASS:/usr/bin/ksshaskpass
|
||||||
@@ -20,6 +19,9 @@ SETUVAR _fish_abbr_clera:clear
|
|||||||
SETUVAR _fish_abbr_current_2D_project:vim\x20Code/side/first_rust_gui
|
SETUVAR _fish_abbr_current_2D_project:vim\x20Code/side/first_rust_gui
|
||||||
SETUVAR _fish_abbr_secscreen:\x2e/Code/scripts/act_second_monitor\x2esh
|
SETUVAR _fish_abbr_secscreen:\x2e/Code/scripts/act_second_monitor\x2esh
|
||||||
SETUVAR _fish_abbr_uin:sudo\x20pacman\x20\x2dRuscn
|
SETUVAR _fish_abbr_uin:sudo\x20pacman\x20\x2dRuscn
|
||||||
|
SETUVAR _fisher_nickeb96_2F_puffer_2D_fish_files:\x7e/\x2econfig/fish/functions/_puffer_fish_expand_bang\x2efish\x1e\x7e/\x2econfig/fish/functions/_puffer_fish_expand_dots\x2efish\x1e\x7e/\x2econfig/fish/functions/_puffer_fish_expand_lastarg\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/puffer_fish_key_bindings\x2efish
|
||||||
|
SETUVAR _fisher_plugins:nickeb96/puffer\x2dfish
|
||||||
|
SETUVAR _fisher_upgraded_to_4_4:\x1d
|
||||||
SETUVAR fish_color_autosuggestion:969896
|
SETUVAR fish_color_autosuggestion:969896
|
||||||
SETUVAR fish_color_cancel:\x2d\x2dreverse
|
SETUVAR fish_color_cancel:\x2d\x2dreverse
|
||||||
SETUVAR fish_color_command:b294bb
|
SETUVAR fish_color_command:b294bb
|
||||||
|
|||||||
9
.config/fish/functions/_puffer_fish_expand_bang.fish
Normal file
9
.config/fish/functions/_puffer_fish_expand_bang.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _puffer_fish_expand_bang
|
||||||
|
switch (commandline -t)
|
||||||
|
case '!'
|
||||||
|
commandline -t $history[1]
|
||||||
|
case '*'
|
||||||
|
commandline -i '!'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
9
.config/fish/functions/_puffer_fish_expand_dots.fish
Normal file
9
.config/fish/functions/_puffer_fish_expand_dots.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _puffer_fish_expand_dots -d 'expand ... to ../.. etc'
|
||||||
|
set -l cmd (commandline --cut-at-cursor)
|
||||||
|
set -l split (string split -- ' ' $cmd)
|
||||||
|
if string match --quiet --regex -- '^(\.\./)*\.\.$' $split[-1]
|
||||||
|
commandline --insert '/..'
|
||||||
|
else
|
||||||
|
commandline --insert '.'
|
||||||
|
end
|
||||||
|
end
|
||||||
9
.config/fish/functions/_puffer_fish_expand_lastarg.fish
Normal file
9
.config/fish/functions/_puffer_fish_expand_lastarg.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _puffer_fish_expand_lastarg
|
||||||
|
switch (commandline -t)
|
||||||
|
case '!'
|
||||||
|
commandline -t ""
|
||||||
|
commandline -f history-token-search-backward
|
||||||
|
case '*'
|
||||||
|
commandline -i '$'
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
function restart --argument x
|
function restart --argument x
|
||||||
|
|
||||||
pkill $x && $x &>/dev/null& && jobs | disown
|
pkill $x && $x &>/dev/null& && sleep 0.2 && jobs | disown
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user