mikedmcfarland / DropDownWindows.spoon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This spoon provides hotkeys for accessing apps, making dropdown (quake style) windows out of your apps. You can also configure arbitrary windows as needed as quake style dropdowns.

Example Configuration

hs.spoons.use(
    "DropDownWindows",
    {
        hotkeys = {
            toggleWindow = {{"cmd", "shift"}, "a"}, -- toggle the app shortcut for the current window such that it becomes a quake style drop down window
            cycle = {{"cmd"}, "`"} -- replace ment for cmd `, works across spaces and skips your configured and app dropdowns (since they already have dedicated keys)
        },
        fn = function(spoon)
            spoon:start(
                {
                    -- launch or focus application
                    apps = {
                        ["Alacritty"] = {
                            {"cmd"},
                            "1"
                        },
                        ["Emacs"] = {
                            {"cmd"},
                            "2"
                        },
                        ["Google Chrome"] = {
                            {"cmd"},
                            "3"
                        }
                    },
                    -- configure shortcuts that assign and select dropdown windows
                    configurableWindows = {
                        {
                            assign = {{"cmd", "shift"}, "0"},
                            select = {{"cmd"}, "0"}
                        },
                        {
                            assign = {{"cmd", "shift"}, "9"},
                            select = {{"cmd"}, "9"}
                        },
                        {
                            assign = {{"cmd", "shift"}, "8"},
                            select = {{"cmd"}, "8"}
                        },
                        {
                            assign = {{"cmd", "shift"}, "7"},
                            select = {{"cmd"}, "7"}
                        }
                    }
                }
            )
        end,
        loglevel = "error"
    }
)

Ideas

serialize settings

persist configurations across reloads, (then everything could be configured) Hammerspoon docs: hs.settings

sepearate window state into module

consider serpating window state completely, maybe using Hammerspoon docs: hs.watchable

About


Languages

Language:Lua 100.0%