Skip to content

Instantly share code, notes, and snippets.

@confluencepoint
Forked from knu/kill_menu.lua
Created March 11, 2022 14:31
Show Gist options
  • Save confluencepoint/21c5c91950c7c572297e2ee2b8d6c351 to your computer and use it in GitHub Desktop.
Save confluencepoint/21c5c91950c7c572297e2ee2b8d6c351 to your computer and use it in GitHub Desktop.
Add a "Kill" menu bar item using Hammerspoon
do
killMenu = hs.menubar.new()
local killer = function (appName)
return function ()
hs.execute("killall " .. appName)
end
end
killMenu:setTitle("☠️")
killMenu:setMenu{
{ title = "Rambox", fn = killer("Rambox") },
{ title = "ATOK", fn = killer("ATOK30") }
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment