diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-11-11 13:19:57 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-11-11 13:19:57 +0900 |
| commit | faa4037c2e44e1a94919bee5790d4fd479e3ba6e (patch) | |
| tree | c1fb32c0396cb825781824cfde2a6534ab133432 | |
| parent | 391e4762befd0cbd0c7db8bb43a8b5871898c462 (diff) | |
small correction on waybar layout
| -rwxr-xr-x | config/hypr/scripts/WaybarLayout.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index 87af0fa5..672a2039 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -29,12 +29,17 @@ apply_config() { main() { 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 "no panel") if pgrep -x "waybar" >/dev/null; then pkill waybar - exit fi + exit 0 ;; *) apply_config "$choice" @@ -43,11 +48,11 @@ main() { } # Check if rofi is already running -if pidof rofi >/dev/null; then +if pgrep -x "rofi" >/dev/null; then pkill rofi exit 0 -else - main fi -exec ~/.config/hypr/scripts/Refresh.sh & +main + +~/.config/hypr/scripts/Refresh.sh & |
