![]() Now we know how to issue a notification, the next step is displaying a notification in response to certain events. Your custom notification should now appear onscreen. Press the ‘Command + h + w’ keys on your keyboard.Select the ‘Hammerspoon’ icon from your Mac’s menu bar and then click ‘Reload Config.’.Select ‘File > Save’ from the menu bar.Let’s start with something simple that you can test straight away, by creating a keyboard shortcut that triggers a notification.Ĭopy/paste the following into the a window: hs.hotkey.bind(, "W", function() Your first Hammerspoon script: Displaying a notification This is where we’ll be creating our first script. Select ‘File > Open Config’ from the Hammerspoon menu bar. At this point, you should see Hamerspoon’s Lua console.Find the ‘Hammerspoon’ app, and give its accompanying checkbox a click.Click the little padlock in the bottom-left corner, and enter your admin password.Make sure the ‘Privacy’ tab is selected.When prompted, click ‘Open System Preferences.’ This should launch macOS’ regular ‘Security & Privacy’ window.You can select and deselect the various options, depending on your preferences, but you must enable accessibility in order to use Hammerspoon properly, so give the ‘Enable Accessibility’ button a click. The first time you launch Hammerspoon, it’ll present you with a preference pane. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |