Add Waybar Theme switcher
This commit is contained in:
@@ -13,12 +13,26 @@
|
||||
# -----------------------------------------------------
|
||||
killall waybar
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Get current theme information
|
||||
# -----------------------------------------------------
|
||||
themestyle="/default/light"
|
||||
if [ -f ~/.cache/.themestyle.sh ]; then
|
||||
themestyle=$(cat ~/.cache/.themestyle.sh)
|
||||
else
|
||||
touch ~/.cache/.themestyle.sh
|
||||
echo "$themestyle" > ~/.cache/.themestyle.sh
|
||||
fi
|
||||
if [ ! -f ~/dotfiles/waybar/styles$themestyle/style.css ]; then
|
||||
themestyle="/default/light"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Loading the configuration based on the username
|
||||
# -----------------------------------------------------
|
||||
if [[ $USER = "raabe" ]]
|
||||
then
|
||||
waybar -c ~/dotfiles/waybar/myconfig & -s ~/dotfiles/waybar/style.css
|
||||
waybar -c ~/dotfiles/waybar/myconfig -s ~/dotfiles/waybar/styles$themestyle/style.css &
|
||||
else
|
||||
waybar &
|
||||
waybar -s ~/dotfiles/waybar/styles$themestyle/style.css &
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user