Fix hx function

work
mat ess 2022-11-28 17:01:54 -05:00
parent 25e6aecd5c
commit b18d15a62c
1 changed files with 3 additions and 7 deletions

View File

@ -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
'';
};