Add global dark/light theme switch with key bind
This commit is contained in:
27
scripts/.local/share/scripts/switch_theme
Executable file
27
scripts/.local/share/scripts/switch_theme
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: switch_theme <mode>"
|
||||
echo "mode: dark|light"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mode=$1
|
||||
|
||||
if [ "$mode" = "light" ]; then
|
||||
emacsclient --eval "(load-theme 'doom-nord-light)"
|
||||
sed -i "s/iceberg_dark/iceberg_light/" ~/.config/kitty/kitty.conf
|
||||
sed -i "s/bg=dark/bg=light/" ~/.config/nvim/init.vim
|
||||
sed -i "s/iceberg_dark/iceberg_light/" ~/.dotfiles/tmux/.tmux.conf
|
||||
pkill kitty
|
||||
tmux source-file ~/.tmux.conf
|
||||
kitty --class tmux tmux a
|
||||
else
|
||||
emacsclient --eval "(load-theme 'doom-nord)"
|
||||
sed -i "s/iceberg_light/iceberg_dark/" ~/.config/kitty/kitty.conf
|
||||
sed -i "s/bg=light/bg=dark/" ~/.config/nvim/init.vim
|
||||
sed -i "s/iceberg_light/iceberg_dark/" ~/.dotfiles/tmux/.tmux.conf
|
||||
pkill kitty
|
||||
tmux source-file ~/.tmux.conf
|
||||
kitty --class tmux tmux a
|
||||
fi
|
||||
Reference in New Issue
Block a user