diff options
Diffstat (limited to 'config/hypr/UserScripts')
| -rwxr-xr-x | config/hypr/UserScripts/QuickEdit.sh | 5 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/RofiBeats.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/RofiCalc.sh | 1 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 1 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 1 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/ZshChangeTheme.sh | 5 |
6 files changed, 16 insertions, 3 deletions
diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index ed5a4e1c..29ce3506 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -51,4 +51,9 @@ main() { $tty -e $edit "$file" } +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + main diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index cde7eccf..e615aadb 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -94,6 +94,12 @@ play_online_music() { # Check if an online music process is running and send a notification, otherwise run the main function pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + + # Prompt the user to choose between local and online music user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh index 355130de..cef80b81 100755 --- a/config/hypr/UserScripts/RofiCalc.sh +++ b/config/hypr/UserScripts/RofiCalc.sh @@ -8,7 +8,6 @@ rofi_config="$HOME/.config/rofi/config-calc.rasi" # Kill Rofi if already running before execution if pgrep -x "rofi" >/dev/null; then pkill rofi - exit 0 fi # main function diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 9c872457..9a9d289c 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -95,7 +95,6 @@ main() { # Check if rofi is already running and kill it if pidof rofi > /dev/null; then pkill rofi - exit 0 fi main diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index d74933a3..8daa4f28 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -97,7 +97,6 @@ main() { # Check if rofi is already running if pidof rofi > /dev/null; then pkill rofi - sleep 1 # Allow some time for rofi to close fi main diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index 57fbf37d..662a36bb 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -48,4 +48,9 @@ main() { fi } +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + main |
