Skip to content

Instantly share code, notes, and snippets.

@amirrajan
Created April 16, 2025 14:18
Show Gist options
  • Save amirrajan/5c256e4eb5390f11586a90685873c9d8 to your computer and use it in GitHub Desktop.
Save amirrajan/5c256e4eb5390f11586a90685873c9d8 to your computer and use it in GitHub Desktop.
hammer spoon ctrl+t to swap bettween windows
require("hs.ipc")
hs.hotkey.bind({'ctrl'}, "t", function()
app_name = hs.application.frontmostApplication():name()
if app_name == 'Alacritty' then
hs.osascript.applescript('tell application "Chrome" to activate')
else
hs.osascript.applescript('tell application "Alacritty" to activate')
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment