The cookie is used to store the user consent for the cookies in the category "Analytics". This cookie is set by GDPR Cookie Consent plugin. These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly. lua file and then reference this file from your main ‘a’ file. Whenever you find a script that you want to use, simply save it as a. The great thing about Hammerspoon, is that you don’t have to write your own scripts, as there’s countless ready-made scripts available online. Disconnect from the Wi-Fi, and you should get a notification warning you about the lost connection.Press the ‘Command + h + w’ keys – this should trigger the ‘Hello from Hammerspoon’ notification.Select the ‘Hammerspoon icon from your Mac’s menu bar, and then click ‘Reload config.’. You can now put these three scripts to the test: Reference ‘a’ and ‘a’,’ by copy/pasting the following script into ‘a.’.Select ‘File > Open config.’ This launches the default ‘a’ file – at last, this is the file we actually need!.We now need to reference both of these files, from a. Copy/paste your Wi-Fi script into this window.Īt this point, we have a separate ‘a’ and ‘a’ file.Select ‘File > Rename…’ and give this file the name ‘a.’.Select ‘File > Open config.’ Once again this launches the ‘a’ file.Copy/paste your ‘Hello from Hammerspoon’ script into this file.Select ‘File > Open config.’ This launches the default ‘a’ file.lua files, and then reference each script from that all-important a file. In this final section, we’re going to create our scripts as separate. We may have pasted our Wi-Fi script over our original ‘Hello from Hammerspoon’ script, but it is possible to run multiple Hammerspoon scripts side by side. Reconnect to your network, and it should trigger another notification, complete with the name of the network that you’ve just connected to. Try disconnecting from your Wi-Fi network, by selecting the ‘Wi-Fi’ icon in your Mac’s menu bar and choosing ‘Turn off Wi-Fi.’ You should see a notification warning you that the Internet is disconnected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |