![]() Hammerspoon is a powerful tool allowing you to have powerful effects on your system by writing Lua scripts. SetCaffeineDisplay(hs.caffeinate.get( " displayIdle ")) SetCaffeineDisplay(hs.caffeinate.toggle( " displayIdle "))Ĭaffeine:setClickCallback(caffeineClicked) But now I can create a menubar by the following config: I used to type caffeinate -t 99999 to make OS awake. Hs.wifi.associate(studySSID, " myPassPhrase ") Hs.hotkey.bind(hyperShift, ' 8 ', function() Hs.wifi.associate(bedroomSSID, " myPassPhrase ") Hs.hotkey.bind(hyperShift, ' 9 ', function() So I can config like this to make sure I can connect to the stronger one. ![]() In some rooms, the signal of router A is stronger, while in other rooms, router B is better. HyperShift = )ĪppWatcher = hs.(applicationWatcher) Now we can dive into a more complex task: windows manager. Then try to press cmd+option+t, the clock should appear again. Hs.hotkey.bind(hyper, ' t ', function() spoon.AClock:toggleShow() end) Now let’s start your first config script, edit the a file: You can see the clock display on the screen. Then launch the hammerspoon console and inputīingo! We just finish the hammerspoon version of “hello world” :) Let’s getting started.įirst, install hammerspoon, you can easily install it using homebrew:Īnd make sure these files and folders exists:ĭownload it and double click to unzip and install it, it will be installed in the Spoons folder. I hope this post can help beginners to get started with hammerspoon (and spoons). So I deceided to rewrite my hammerspoon config file with spoons. I have used hammerspoon for a long time, recently I found that the new version of hammerspoon supported Lua plugins called “Spoons”. Teddy Ma's Homepage | Powerful Hammerspoon
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |