fish: switch theme in all (local) terminal windows at once
3 files changed, 12 insertions(+), 1 deletion(-)
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