]> Freerunner's - dotfiles.git/commitdiff
fish: update config
authorAndre Ramnitz <tux.rising@gmail.com>
Mon, 27 Oct 2025 22:06:42 +0000 (23:06 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 27 Oct 2025 22:06:42 +0000 (23:06 +0100)
dot-config/fish/config.fish
dot-config/fish/functions/hyprconfig.fish [new file with mode: 0644]
dot-config/fish/functions/lf.fish [new file with mode: 0644]
dot-config/fish/functions/lfcd.fish [deleted file]

index 297394416508050db1b9aa55416e7c384c054c05..795c5122b74d2e7af1b62c4728911de46c8ba0cd 100644 (file)
@@ -6,6 +6,8 @@ if status is-interactive
     set EZA_COLORS "*.patch.skip=38;5;244"
     command -v fastfetch && command fastfetch -c ~/.config/fastfetch/default.jsonc
     source (/usr/bin/starship init fish --print-full-init | psub)
+    set -gx EDITOR 'kks edit'
+    set -gx VISUAL 'kks edit'
     set -g fish_greeting
 end
 
diff --git a/dot-config/fish/functions/hyprconfig.fish b/dot-config/fish/functions/hyprconfig.fish
new file mode 100644 (file)
index 0000000..76c0f1b
--- /dev/null
@@ -0,0 +1,3 @@
+function hyprconfig --wraps='kks edit ~/.config/hypr/hypr*.conf ~/.config/hypr/fragments/* ' --description 'alias hyprconfig=kak ~/.config/hypr/hypr*.conf ~/.config/hypr/fragments/* '
+    kak ~/.config/hypr/hypr*.conf ~/.config/hypr/fragments/*  $argv
+end
diff --git a/dot-config/fish/functions/lf.fish b/dot-config/fish/functions/lf.fish
new file mode 100644 (file)
index 0000000..4e64c07
--- /dev/null
@@ -0,0 +1,19 @@
+# Change working dir in fish to last dir in lf on exit (adapted from ranger).
+#
+# You may put this file to a directory in $fish_function_path variable:
+#
+#     mkdir -p ~/.config/fish/functions
+#     ln -s "/path/to/lfcd.fish" ~/.config/fish/functions
+#
+# You may also like to assign a key (Ctrl-O) to this command:
+#
+#     bind \co 'set old_tty (stty -g); stty sane; lfcd; stty $old_tty; commandline -f repaint'
+#
+# You may put this in a function called fish_user_key_bindings.
+
+function lf --wraps="lf" --description="lf - Terminal file manager (changing directory on exit)"
+    # `command` is needed in case `lfcd` is aliased to `lf`.
+    # Quotes will cause `cd` to not change directory if `lf` prints nothing to stdout due to an error.
+    cd "$(command lf -print-last-dir $argv)"
+end
+
diff --git a/dot-config/fish/functions/lfcd.fish b/dot-config/fish/functions/lfcd.fish
deleted file mode 100644 (file)
index 1e50b6f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Change working dir in fish to last dir in lf on exit (adapted from ranger).
-#
-# You may put this file to a directory in $fish_function_path variable:
-#
-#     mkdir -p ~/.config/fish/functions
-#     ln -s "/path/to/lfcd.fish" ~/.config/fish/functions
-#
-# You may also like to assign a key (Ctrl-O) to this command:
-#
-#     bind \co 'set old_tty (stty -g); stty sane; lfcd; stty $old_tty; commandline -f repaint'
-#
-# You may put this in a function called fish_user_key_bindings.
-
-function lfcd --wraps="lf" --description="lf - Terminal file manager (changing directory on exit)"
-    # `command` is needed in case `lfcd` is aliased to `lf`.
-    # Quotes will cause `cd` to not change directory if `lf` prints nothing to stdout due to an error.
-    cd "$(command lf -print-last-dir $argv)"
-end
-