2023-08-28 07:33:53 -04:00
|
|
|
#!/bin/sh
|
|
|
|
# ____ _ _ __ __ _
|
|
|
|
# / ___|| |_ __ _ _ __| |_ \ \ / /_ _ _ _| |__ __ _ _ __
|
|
|
|
# \___ \| __/ _` | '__| __| \ \ /\ / / _` | | | | '_ \ / _` | '__|
|
|
|
|
# ___) | || (_| | | | |_ \ V V / (_| | |_| | |_) | (_| | |
|
|
|
|
# |____/ \__\__,_|_| \__| \_/\_/ \__,_|\__, |_.__/ \__,_|_|
|
|
|
|
# |___/
|
|
|
|
# by Stephan Raabe (2023)
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Quit running waybar instances
|
|
|
|
# -----------------------------------------------------
|
|
|
|
killall waybar
|
|
|
|
|
2023-10-09 09:50:47 -04:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# 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
|
|
|
|
|
2023-08-28 07:33:53 -04:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# Loading the configuration based on the username
|
|
|
|
# -----------------------------------------------------
|
2023-09-14 08:34:08 -04:00
|
|
|
if [[ $USER = "raabe" ]]
|
2023-08-28 07:33:53 -04:00
|
|
|
then
|
2023-10-09 09:50:47 -04:00
|
|
|
waybar -c ~/dotfiles/waybar/myconfig -s ~/dotfiles/waybar/styles$themestyle/style.css &
|
2023-08-28 07:33:53 -04:00
|
|
|
else
|
2023-10-09 09:50:47 -04:00
|
|
|
waybar -s ~/dotfiles/waybar/styles$themestyle/style.css &
|
2023-08-28 07:33:53 -04:00
|
|
|
fi
|