Skip to content

Instantly share code, notes, and snippets.

@jaawerth
Forked from emjayoh/init.lua
Created October 7, 2022 16:39
Show Gist options
  • Save jaawerth/1779d2c82e924c221610c9b2e64e3084 to your computer and use it in GitHub Desktop.
Save jaawerth/1779d2c82e924c221610c9b2e64e3084 to your computer and use it in GitHub Desktop.

Revisions

  1. @emjayoh emjayoh created this gist May 8, 2020.
    19 changes: 19 additions & 0 deletions init.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    hs.hotkey.bind({}, "F15", function()
    local app = hs.application.get("kitty")

    if app then
    if not app:mainWindow() then
    app:selectMenuItem({"kitty", "New OS window"})
    elseif app:isFrontmost() then
    app:hide()
    else
    app:activate()
    end
    else
    hs.application.launchOrFocus("kitty")
    app = hs.application.get("kitty")
    end

    app:mainWindow():moveToUnit'[100,50,0,0]'
    app:mainWindow().setShadows(false)
    end)