Skip to content

Commit

Permalink
feat(hammerspoon): F12 to use Warp to replace Kitty
Browse files Browse the repository at this point in the history
  • Loading branch information
einverne committed Sep 6, 2024
1 parent 2a73553 commit 70b8605
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hammerspoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,19 @@ for _, v in pairs(hspoon_list) do
end

hs.hotkey.bind({}, "F12", function()
local app = hs.application.get("net.kovidgoyal.kitty")
local app = hs.application.get("dev.warp.Warp-Stable")
if app then
if not app:mainWindow() then
app:selectMenuItem({"kitty", "New OS window"})
app:selectMenuItem({"Warp", "New Window"})
elseif app:isFrontmost() then
app:hide()
else
app:activate()
end
app:mainWindow():moveToUnit'[100, 80, 0, 0]'
app:mainWindow():moveToUnit'[100, 80, 0, 0]'
else
hs.application.launchOrFocus("/Applications/kitty.app")
app = hs.application.get("net.kovidgoyal.kitty")
hs.application.launchOrFocus("/Applications/Warp.app")
app = hs.application.get("dev.warp.Warp-Stable")
end
end)

Expand Down

0 comments on commit 70b8605

Please sign in to comment.