Created
November 2, 2022 07:42
-
-
Save kiinoda/a11089ad8b14943298ba009f5ab01bcf to your computer and use it in GitHub Desktop.
Hammerspoon - simple menu
This file contains 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 characters
menubar = hs.menubar.new(true) | |
menubar:setTitle("Menu") | |
menubarCount = 0 | |
function menubarClicked() | |
menubar:setTitle("Updated! "..menubarCount) | |
menubarCount = menubarCount + 1 | |
-- menubar:removeFromMenuBar() | |
-- menubar:delete() | |
end | |
if menubar then | |
menubar:setClickCallback(menubarClicked) | |
else | |
print("menubar could not be created") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment