1
1
mirror of https://github.com/rywng/dotfiles.git synced 2024-10-30 23:51:51 +08:00
dotfiles/.config/sway/scripts/themes.sh

31 lines
829 B
Bash
Raw Normal View History

scheme=$(echo "light\ndark" | wofi -d -p "Select color scheme")
# simply subsitude dark and light
if [ $scheme = "light" ]; then
notify-send "Toggling light color scheme"
command="s/dark/light/"
elif [ $scheme = "dark" ]; then
notify-send "Toggling dark color scheme"
command="s/light/dark/"
else
exit 1
fi
2022-09-24 14:19:49 +08:00
sed -i $command ~/.config/kitty/kitty.conf
sed -i $command ~/.config/sway/config.d/display
2022-09-24 14:19:49 +08:00
sed -i $command ~/.config/sway/config.d/theme
sed -i $command ~/.config/swaync/style.css
sed -i $command ~/.config/waybar/style.css
2022-09-24 14:19:49 +08:00
sed -i $command ~/.config/wofi/config
swaync-client -rs &
# more settings
if [ $scheme = "light" ]; then
2022-09-20 13:03:40 +08:00
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/light.conf" &
else
2022-09-20 13:03:40 +08:00
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/dark.conf" &
fi
sway reload