Created
October 3, 2025 00:57
-
-
Save bscott/32a9a5aa6381b98fc86b2ccfde1d21b4 to your computer and use it in GitHub Desktop.
Revisions
-
bscott created this gist
Oct 3, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ #!/usr/bin/env bash # # Walker Service Restart Script # Addresses: https://github.com/basecamp/omarchy/issues/2089 # # This script kills and restarts the Walker service which powers # the Omarchy application launcher when it becomes unresponsive. set -e echo "π Checking for Walker process..." # Find Walker process ID WALKER_PID=$(pgrep -x walker || true) if [ -z "$WALKER_PID" ]; then echo "β οΈ Walker is not running" echo "π Starting Walker..." /usr/bin/walker --gapplication-service & echo "β Walker started successfully (PID: $!)" exit 0 fi echo "π Found Walker process (PID: $WALKER_PID)" echo "π Killing Walker process..." # Kill the process gracefully first kill "$WALKER_PID" 2>/dev/null || true # Wait up to 5 seconds for graceful shutdown for i in {1..5}; do if ! ps -p "$WALKER_PID" > /dev/null 2>&1; then echo "β Walker stopped gracefully" break fi sleep 1 done # Force kill if still running if ps -p "$WALKER_PID" > /dev/null 2>&1; then echo "β‘ Force killing Walker..." kill -9 "$WALKER_PID" 2>/dev/null || true sleep 1 fi echo "π Restarting Walker..." /usr/bin/walker --gapplication-service & NEW_PID=$! sleep 1 if ps -p "$NEW_PID" > /dev/null 2>&1; then echo "β Walker restarted successfully (PID: $NEW_PID)" else echo "β Failed to restart Walker" exit 1 fi