Browse Source

small correction on waybar layout

pull/18/head
JaKooLit 2 years ago
parent
commit
faa4037c2e
  1. 15
      config/hypr/scripts/WaybarLayout.sh

15
config/hypr/scripts/WaybarLayout.sh

@ -29,12 +29,17 @@ apply_config() {
main() { main() {
choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi) choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi)
if [[ -z "$choice" ]]; then
echo "No option selected. Exiting."
exit 0
fi
case $choice in case $choice in
"no panel") "no panel")
if pgrep -x "waybar" >/dev/null; then if pgrep -x "waybar" >/dev/null; then
pkill waybar pkill waybar
exit
fi fi
exit 0
;; ;;
*) *)
apply_config "$choice" apply_config "$choice"
@ -43,11 +48,11 @@ main() {
} }
# Check if rofi is already running # Check if rofi is already running
if pidof rofi >/dev/null; then if pgrep -x "rofi" >/dev/null; then
pkill rofi pkill rofi
exit 0 exit 0
else
main
fi fi
exec ~/.config/hypr/scripts/Refresh.sh & main
~/.config/hypr/scripts/Refresh.sh &

Loading…
Cancel
Save