From 5b5336952d2bd61f1f7e170054556ad2b97c8365 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian <code@softinio.com> Date: Mon, 24 Mar 2025 01:12:53 -0700 Subject: [PATCH] zed and helix theme update, kitty add more actions --- home.nix | 2 +- programs/kitty/open-actions.conf | 36 +++++++++++++++++++++++++++++--- programs/zed/default.nix | 2 +- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/home.nix b/home.nix index 0913ae7..df6f1b4 100644 --- a/home.nix +++ b/home.nix @@ -175,7 +175,7 @@ programs.helix = { enable = true; settings = { - theme = "tokyonight"; + theme = "gruvbox_dark_hard"; editor.file-picker.hidden = false; }; }; diff --git a/programs/kitty/open-actions.conf b/programs/kitty/open-actions.conf index e8271b2..3c172ab 100644 --- a/programs/kitty/open-actions.conf +++ b/programs/kitty/open-actions.conf @@ -2,9 +2,39 @@ # by the hyperlink-grep kitten and nothing else so far. protocol file fragment_matches [0-9]+ -action launch --type=overlay --cwd=current vim +${FRAGMENT} -- ${FILE_PATH} +action launch --type=overlay --cwd=current hx +${FRAGMENT} -- ${FILE_PATH} # Open text files without fragments in the editor protocol file -mime text/* -action launch --type=overlay --cwd=current -- ${EDITOR} -- ${FILE_PATH} +ext txt,md,conf,ini,log,sh,py,js,html,css,xml,json,yaml,yml,scala,sbt,java,go,py,toml,sql,swift,nix,lua +action launch --type=overlay --cwd=current -- hx -- ${FILE_PATH} + +# Open any image in the full kitty window by clicking on it +protocol file +mime image/* +action launch --type=overlay kitten icat --hold -- ${FILE_PATH} + +# Tail a log file (*.log) in a new OS Window and reduce its font size +protocol file +ext log +action launch --title ${FILE} --type=os-window tail -f -- ${FILE_PATH} +action change_font_size current -2 + +# Open script files +protocol file +ext sh,command,tool +action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL + +# Open shell specific script files +protocol file +ext fish,bash,zsh +action launch --hold --type=os-window kitty +shebang $FILE_PATH __ext__ + +# Open directories +protocol file +mime inode/directory +action launch --type=os-window --cwd -- $FILE_PATH + +# Open ssh URLs with ssh command +protocol ssh +action launch --type=os-window ssh -- $URL diff --git a/programs/zed/default.nix b/programs/zed/default.nix index c33b90d..a6517ce 100644 --- a/programs/zed/default.nix +++ b/programs/zed/default.nix @@ -59,7 +59,7 @@ in }; }; telemetry.metrics = false; - theme = "Gruvbox Dark"; + theme = "Gruvbox Dark Hard"; vim_mode = true; }; };