diff --git a/autostart.h b/autostart.h index 6c10cec..0433e0e 100644 --- a/autostart.h +++ b/autostart.h @@ -26,7 +26,7 @@ static const char *autostart[] = { shell, "-c", NOTIFICATION "& > /tmp/notification-log", NULL, /* Run the defined status bar */ - shell, "-c", "speedwm_status", NULL, + shell, "-c", "speedwm_status &", NULL, NULL }; diff --git a/scripts/speedwm-audioctrl b/scripts/speedwm-audioctrl index 3a82601..610ca01 100755 --- a/scripts/speedwm-audioctrl +++ b/scripts/speedwm-audioctrl @@ -124,7 +124,7 @@ esac # Update status UPDATESTATUS() { - pkill status && status & + pkill -x status && status & } case "$1" in diff --git a/scripts/speedwm-core b/scripts/speedwm-core index 07780cb..aee00e3 100755 --- a/scripts/speedwm-core +++ b/scripts/speedwm-core @@ -154,11 +154,11 @@ echo USE case "$OPT" in "-start") $SYSTRAY --edge $EDGE --align right --SetDockType true --SetPartialStrut true --expand true --width $WIDTH --transparent $TRANSPARENT --alpha $ALPHA --tint 0x${TINT} --height $HEIGHT & - touch /tmp/systray-started ; pgrep -x status && pkill status ; status & + touch /tmp/systray-started ; pgrep -x status && pkill -x status ; status & if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then xsetroot -name "fsignal:23" fi ;; - "-stop") rm -f /tmp/systray-started ; pkill $SYSTRAY ; pgrep -x status && pkill status ; status & + "-stop") rm -f /tmp/systray-started ; pkill -x $SYSTRAY ; pgrep -x status && pkill -x status ; status & if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then xsetroot -name "fsignal:23" fi ;; diff --git a/scripts/speedwm-dfmpeg b/scripts/speedwm-dfmpeg index 7ecb6f6..3206277 100755 --- a/scripts/speedwm-dfmpeg +++ b/scripts/speedwm-dfmpeg @@ -171,12 +171,12 @@ MORE_OPTIONS() { case "$(printf 'Start\nStop\nStart without audio\nPlay last\n------\nMore options\nAbout\nExit' | $RUNLAUNCHER -l 40 -p 'Record your screen:')" in "Exit") STATUS=idle && exit 0 ;; "Start") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording - pgrep -x status && pkill status && status & + pgrep -x status && pkill -x status && status & $startrec && exit 0 ;; - "Stop") pkill ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle - pgrep -x status && pkill status && status & ;; + "Stop") pkill -x ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle + pgrep -x status && pkill -x status && status & ;; "Start without audio") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording - pgrep -x status && pkill status && status & + pgrep -x status && pkill -x status && status & $startrec_no_audio && exit 0 ;; "Play last") DFMPEG_STATUS=idle && $MEDIA_PLAYER $(cat /tmp/outputfilename) && exit 0 ;; "More options") MORE_OPTIONS && exit 0 ;; diff --git a/scripts/speedwm-swal b/scripts/speedwm-swal index d8fadd5..be957ea 100755 --- a/scripts/speedwm-swal +++ b/scripts/speedwm-swal @@ -318,8 +318,8 @@ SWAL_EXPORT_SCRIPT_WAL() command -v speedwm_run > /dev/null && speedwm_run -loadconfig # For speedie.gq/speedwm command -v speedwm_run > /dev/null && speedwm_run -rnoload # For speedie.gq/speedwm - pgrep -x status && pkill status ; status & # For speedie.gq/speedwm - pgrep -x stellar && pkill stellar ; stellar & # For speedie.gq/stellar + pgrep -x status && pkill -x status ; status & # For speedie.gq/speedwm + pgrep -x stellar && pkill -x stellar ; stellar & # For speedie.gq/stellar } # Send notification diff --git a/scripts/speedwm_run b/scripts/speedwm_run index 789b6c7..b2d2a2c 100755 --- a/scripts/speedwm_run +++ b/scripts/speedwm_run @@ -38,7 +38,7 @@ fi # Load .Xresources if available XRESOURCES() { - pgrep -x status > /dev/null && pkill status + pgrep -x status > /dev/null && pkill -x status if [ -e "$HOME/.Xresources" ]; then if [ -e "${BINDIR}xrdb" ]; then xrdb $HOME/.Xresources @@ -194,7 +194,7 @@ case "$ARGS" in "-unloadconfig") UNLOADCONFIG ; RESET ; exit 0 ;; "-deleteconfig") DELETECONFIG ; RESET ; exit 0 ;; "-noxrdb") START_SPEEDWM ; exit 0 ;; -"-stop") pgrep -x speedwm && pkill speedwm ; echo "speedwm has been stopped." ; exit 0 +"-stop") pgrep -x speedwm && pkill -x speedwm ; echo "speedwm has been stopped." ; exit 0 echo "speedwm is not running, cannot stop it." ; exit 1 ;; "-nomkconfig") CHECKEXISTINGWM ; XRESOURCES ; AUTOSTART ; LOADSWAL ; RESET ; START_SPEEDWM ; exit 0 ;; esac