all repos — nixfiles @ 7b732e2525a1a161f21793bb006c3f1c5fa311bc

System and user configuration, managed by nix and home-manager

fish: switch theme in all (local) terminal windows at once

Alin
commit

7b732e2525a1a161f21793bb006c3f1c5fa311bc

parent

798f19fb26fefb2a5ed791b377c8d57aed4f7b55

M user/settings/fish/config.fish → user/settings/fish/config.fish
@@ -14,3 +14,7 @@ end
# tide needs this for now https://github.com/IlanCosman/tide/issues/622 set -g fish_key_bindings fish_default_key_bindings + +function __set_current_theme --on-variable THEME_CURRENT + INHIBIT_THEME_HIST=1 theme.sh $THEME_CURRENT +end
A user/settings/fish/functions/set_theme.fish
@@ -0,0 +1,3 @@
+function set_theme --argument-names theme + set -U THEME_CURRENT $theme +end
M user/settings/fish/functions/toggle-light-dark.fish → user/settings/fish/functions/toggle-light-dark.fish
@@ -1,3 +1,7 @@
function toggle-light-dark - last_theme + if test "$THEME_CURRENT" = "$THEME_LIGHT" + set_theme $THEME_DARK + else + set_theme $THEME_LIGHT + end end