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
defaultBrowser = "<your browser>" -- Replace with "Google Chrome", "Firefox", "Vivaldi", or your favorite browser | |
function wait(seconds) | |
local start = os.time() | |
repeat until os.time() > start + seconds | |
end | |
urlOpenedByVpn = "<url opened by your vpn oges here>" | |
function closeTabOpenedByVpn(appName, eventType, appObject) | |
if (eventType == hs.application.watcher.activated) then |
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
-- Shortcuts to launch or switch focus to specific apps | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "i", function() | |
hs.application.launchOrFocus("IntelliJ IDEA") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "b", function() | |
hs.application.launchOrFocus("Vivaldi") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "t", function() |