From: Andre Ramnitz Date: Sat, 16 Dec 2023 18:15:07 +0000 (+0100) Subject: fish: update aliases X-Git-Tag: v0.2~314 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=0e442da91fd942dce541d1b20a2b7fabe8619cc2;p=dotfiles.git fish: update aliases --- diff --git a/fish/.config/fish/functions/gs.fish b/fish/.config/fish/functions/gs.fish new file mode 100644 index 00000000..0755f7c4 --- /dev/null +++ b/fish/.config/fish/functions/gs.fish @@ -0,0 +1,3 @@ +function gs --wraps='git status' --description 'alias gs=git status' + git status $argv; +end diff --git a/fish/.config/fish/functions/hc.fish b/fish/.config/fish/functions/hc.fish new file mode 100644 index 00000000..cfbfd46f --- /dev/null +++ b/fish/.config/fish/functions/hc.fish @@ -0,0 +1,3 @@ +function hc --wraps='hyprctl clients' --description 'alias hc=hyprctl clients' + hyprctl clients $argv; +end diff --git a/fish/.config/fish/functions/r.fish b/fish/.config/fish/functions/r.fish new file mode 100644 index 00000000..3bd11cde --- /dev/null +++ b/fish/.config/fish/functions/r.fish @@ -0,0 +1,12 @@ +function r +set tempfile (mktemp -t tmp.XXXXXX) +set command_argument "tab_new;map Q chain shell echo %d > $tempfile; quitall" +command ranger --cmd="$command_argument" $argv +if test -s $tempfile +set ranger_pwd (cat $tempfile) +if test -n $ranger_pwd -a -d $ranger_pwd +builtin cd -- $ranger_pwd +end +end +command rm -f -- $tempfile +end