From b18d15a62c55b68a550be2d5f962d2d2a1e6294a Mon Sep 17 00:00:00 2001 From: mat ess Date: Mon, 28 Nov 2022 17:01:54 -0500 Subject: [PATCH] Fix hx function --- modules/home/programs/helix/extras.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/home/programs/helix/extras.nix b/modules/home/programs/helix/extras.nix index aef2888..3a5c61f 100644 --- a/modules/home/programs/helix/extras.nix +++ b/modules/home/programs/helix/extras.nix @@ -27,19 +27,15 @@ in "helix/dark.toml".source = tomlFormat.generate "helix-autotheme" (cfg.settings // { theme = extras.autoTheme.dark; }); }; - programs.fish.shellAbbrs = { - hxl = "${cfg.package} --config ${config.xdg.configHome}/helix/light.toml"; - hxd = "${cfg.package} --config ${config.xdg.configHome}/helix/dark.toml"; - }; - programs.fish.functions = { hx = { + wraps = "hx"; description = "Helix invocation wrapper to automatically select the right theme"; body = '' if is-dark-mode - hxd $argv + command hx --config ${config.xdg.configHome}/helix/dark.toml $argv else - hxl $argv + command hx --config ${config.xdg.configHome}/helix/light.toml $argv end ''; };