blob: b6819ed50e40245f0ac7d4bf6a6512746db9793d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/bash
# Check which waybar theme is set
THEMEIS=$(realpath ~/.config/waybar/style.css | sed 's/.*-\(.*\)\.css/\1/')
# Change theme
if [ "$THEMEIS" == "default" ]; then
SWITCHTO="-b&w"
elif [ "$THEMEIS" == "b&w" ]; then
SWITCHTO="-rgb"
elif [ "$THEMEIS" == "rgb" ]; then
SWITCHTO="-default_alter"
elif [ "$THEMEIS" == "default_alter" ]; then
SWITCHTO="-mauve"
elif [ "$THEMEIS" == "mauve" ]; then
SWITCHTO="-light"
elif [ "$THEMEIS" == "light" ]; then
SWITCHTO="-dark"
elif [ "$THEMEIS" == "dark" ]; then
SWITCHTO="-uline"
elif [ "$THEMEIS" == "uline" ]; then
SWITCHTO="-pywal"
else
SWITCHTO="-default"
fi
# Set the waybar theme
THEMEFILE="$HOME/.config/waybar/style/style${SWITCHTO}.css"
if [ -f "$THEMEFILE" ]; then
ln -sf "$THEMEFILE" "$HOME/.config/waybar/style.css"
else
echo "Error: $THEMEFILE not found"
exit 1
fi
# Restart waybar
# Kill already running process
_ps=(waybar mako dunst)
for _prs in "${_ps[@]}"; do
if [[ $(pidof ${_prs}) ]]; then
pkill ${_prs}
fi
done
exec ~/.config/hypr/scripts/Refresh.sh
|