]> Freerunner's - dotfiles.git/commitdiff
fish: update aliases
authorAndre Ramnitz <tux.rising@gmail.com>
Sat, 16 Dec 2023 18:15:07 +0000 (19:15 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:52 +0000 (18:18 +0200)
fish/.config/fish/functions/gs.fish [new file with mode: 0644]
fish/.config/fish/functions/hc.fish [new file with mode: 0644]
fish/.config/fish/functions/r.fish [new file with mode: 0644]

diff --git a/fish/.config/fish/functions/gs.fish b/fish/.config/fish/functions/gs.fish
new file mode 100644 (file)
index 0000000..0755f7c
--- /dev/null
@@ -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 (file)
index 0000000..cfbfd46
--- /dev/null
@@ -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 (file)
index 0000000..3bd11cd
--- /dev/null
@@ -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