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

52 lines
1.6 KiB
Bash
Raw Normal View History

2024-01-10 11:38:39 +08:00
#!/usr/bin/env bash
2023-07-16 16:15:24 +08:00
scheme=$(echo -e "light\ndark" | wofi -d -p "󰔎 Select color scheme")
# simply subsitude dark and light
if [ $scheme = "light" ]; then
2023-07-16 15:37:50 +08:00
command="s/dark/light/"
elif [ $scheme = "dark" ]; then
2023-07-16 15:37:50 +08:00
command="s/light/dark/"
else
2023-07-16 15:37:50 +08:00
exit 1
fi
2022-09-24 14:19:49 +08:00
sed -i $command ~/.config/kitty/kitty.conf
2024-01-06 11:35:43 +08:00
sed -i $command ~/.config/sway/conf.d/theme
2022-09-24 14:19:49 +08:00
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
2023-07-16 15:37:50 +08:00
# kitty config
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/light.conf" &
# zathura
mv ~/.config/zathura/zathurarc.light ~/.config/zathura/zathurarc
# qt5ct and qt6ct
cp ~/.config/qt5ct/light.conf ~/.config/qt5ct/qt5ct.conf
cp ~/.config/qt6ct/light.conf ~/.config/qt6ct/qt6ct.conf
# gtk2
cp ~/.config/gtk-2.0/light.conf ~/.gtkrc-2.0
# set wallpaper location
2024-01-10 11:38:39 +08:00
# unlink ~/.config/sway/Wallpaper
# ln -s ~/Pictures/wall/sway/light ~/.config/sway/Wallpaper
else
2023-07-16 15:37:50 +08:00
# kitty config
kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/dark.conf" &
# zathura
mv ~/.config/zathura/zathurarc.dark ~/.config/zathura/zathurarc
# qt5ct and qt6ct
cp ~/.config/qt5ct/dark.conf ~/.config/qt5ct/qt5ct.conf
cp ~/.config/qt6ct/dark.conf ~/.config/qt6ct/qt6ct.conf
# gtk2
cp ~/.config/gtk-2.0/dark.conf ~/.gtkrc-2.0
# set dark wallpaper
2024-01-10 11:38:39 +08:00
# unlink ~/.config/sway/Wallpaper
# ln -s ~/Pictures/wall/sway/dark ~/.config/sway/Wallpaper
fi
2024-01-10 11:38:39 +08:00
swaymsg reload
systemctl --user restart waybar.service