Add tmux theme toggle configuration

This commit is contained in:
Sonny Bakker 2025-04-01 22:14:38 +02:00
parent 3b50e0ee67
commit a68558e4ae
2 changed files with 32 additions and 1 deletions

19
templates/tmux-toggle.j2 Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env sh
#
# {{ ansible_managed }}
#
# Toggle the current window (all panes) between light and dark themes.
set -e
current_window_style=$(tmux show -Av window-style)
case $current_window_style in
'fg=#000000,bg=#eff0f1')
tmux source-file ~/.config/tmux/dark.conf
;;
*)
# Change back to the default window style.
tmux source-file ~/.config/tmux/light.conf
;;
esac