add new change colorscheme script

update it so i can use more than one theme
This commit is contained in:
Lucas Barbieri 2024-02-14 08:43:25 -03:00
parent ec7a3578a0
commit d8e9682999

View File

@ -1,5 +1,4 @@
#!/bin/bash
CURRENT_THEME=$(readlink ~/.config/tmux/theme.conf)
WHITE_WIDE_WPP=~/pics/wallpapers/sl3.jpg
WHITE_NORMAL_WPP=~/pics/wallpapers/sl2.png
@ -7,42 +6,26 @@ WHITE_NORMAL_WPP=~/pics/wallpapers/sl2.png
RED_WIDE_WPP=~/pics/wallpapers/bm5.jpg
RED_NORMAL_WPP=~/pics/wallpapers/bm3.png
if [[ $CURRENT_THEME == *tmux-white.conf ]]; then
# change wallpaper
~/scripts/swww.sh $RED_WIDE_WPP $RED_NORMAL_WPP
CHOICE=$(tofi <$HOME/scripts/choices)
# change tmux theme and reload
ln -sf ~/.config/tmux/tmux-red.conf ~/.config/tmux/theme.conf
case "$CHOICE" in
melange)
ln -sf ~/.config/tmux/tmux-melange.conf ~/.config/tmux/theme.conf
tmux source-file ~/.config/tmux/tmux.conf
# waybar white css
killall waybar; waybar -s ~/.config/waybar/style-solarized.css > /dev/null &
# change wezterm theme
sed -i 's/Solarized Light (Gogh)/Fahrenheit/g' ~/.config/wezterm/wezterm.lua
# change nvim theme
sed -i 's/zed = true/zed = false/g' ~/.config/nvim/lua/custom/plugins/colorscheme.lua
sed -i 's/-- h/h/g' ~/.config/nvim/lua/custom/plugins/bufferline.lua
# change neofetch pic (yes lmao)
sed -i 's/rh.jpg/red.jpg/g' ~/.config/neofetch/config.conf
sed -i '0,/cl11/{s/cl11/cl3/}' ~/.config/neofetch/config.conf
# waybar black css
killall waybar; waybar > /dev/null &
else
# change wpp
~/scripts/swww.sh $WHITE_WIDE_WPP $WHITE_NORMAL_WPP
# change tmux theme and reload
sed -i 's/color_scheme = .*/color_scheme = "Gruvbox light, medium (base16)"/g' ~/.config/wezterm/wezterm.lua
;;
white)
ln -sf ~/.config/tmux/tmux-white.conf ~/.config/tmux/theme.conf
tmux source-file ~/.config/tmux/tmux.conf
# change wezterm theme
sed -i 's/Fahrenheit/Solarized Light (Gogh)/g' ~/.config/wezterm/wezterm.lua
# change nvim theme
sed -i 's/zed = false/zed = true/g' ~/.config/nvim/lua/custom/plugins/colorscheme.lua
sed -i 's/highlights/-- highlights/g' ~/.config/nvim/lua/custom/plugins/bufferline.lua
# neofetch
sed -i 's/red.jpg/rh.jpg/g' ~/.config/neofetch/config.conf
@ -50,4 +33,25 @@ else
# waybar white css
killall waybar; waybar -s ~/.config/waybar/style-solarized.css > /dev/null &
fi
;;
red)
# change tmux theme and reload
ln -sf ~/.config/tmux/tmux-red.conf ~/.config/tmux/theme.conf
tmux source-file ~/.config/tmux/tmux.conf
# change wezterm theme
sed -i 's/Solarized Light (Gogh)/Fahrenheit/g' ~/.config/wezterm/wezterm.lua
# change neofetch pic (yes lmao)
sed -i 's/rh.jpg/red.jpg/g' ~/.config/neofetch/config.conf
sed -i '0,/cl11/{s/cl11/cl3/}' ~/.config/neofetch/config.conf
# waybar black css
killall waybar; waybar > /dev/null &
;;
*)
exit 0
;;
esac
echo $CHOICE > ~/colorscheme