blob: 87af0fa5437a31ac139cf9a15368fef0169b1073 (
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
50
51
52
53
|
#!/bin/bash
CONFIG="$HOME/.config/waybar/configs"
WCONFIG="$HOME/.config/waybar/config"
menu() {
cat <<EOF
default
Top(gnome)
Bottom(plasma)
simple-long
simple-short
Top-&-Bottom
Left
Right
Top-Left
Top-Right
Bottom-Left
Bottom-Right
all-sides
no panel
EOF
}
apply_config() {
ln -sf "$CONFIG/config-$1" "$WCONFIG"
}
main() {
choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi)
case $choice in
"no panel")
if pgrep -x "waybar" >/dev/null; then
pkill waybar
exit
fi
;;
*)
apply_config "$choice"
;;
esac
}
# Check if rofi is already running
if pidof rofi >/dev/null; then
pkill rofi
exit 0
else
main
fi
exec ~/.config/hypr/scripts/Refresh.sh &
|