The macOS equivalent of Linux's xkill: run it, click a window, and that app is gone.
Run xkill and the cursor turns into an ✕ on every screen and Desktop.
The window under the pointer is highlighted in red with its app's name, so you see what you're about to kill.
Click it and the app is killed on the spot (SIGKILL, the same as kill -9), and a notification says what died.
Esc or right-click cancels.
brew install simion/tap/xkillUpdates come with brew upgrade.
Warning: this is the hard kill. The app gets no chance to save, so unsaved work is lost.
Same workflow, adapted to how macOS works:
- It kills the whole app. X11
xkillcloses one client's X connection; macOS has no equivalent, so this sendsSIGKILLto the process that owns the window. All of that app's windows go with it. - No flags.
-id,-button,-frameand-allaren't implemented. Click-to-kill is the whole tool. - Extras: the red highlight before you click, and a notification after.
- Only regular app windows can be picked, so a stray click can't kill the Dock, the menu bar or WindowServer.
- No special permissions needed.
- The notification is posted through
osascript, so macOS lists it under Script Editor. If you don't see it, turn on System Settings → Notifications → Script Editor. - If you have XQuartz, it ships its own X11
xkillin/opt/X11/bin; whichever comes first in yourPATHwins.
swiftc -O xkill.swift -o xkill
./xkill --selftest # prints "ok"Push a vX.Y.Z tag. The release workflow publishes a GitHub release and bumps the formula in
simion/homebrew-tap, so brew upgrade picks it up.
MIT
