Fix hx function
parent
25e6aecd5c
commit
b18d15a62c
|
@ -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
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue