mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
make switcher visuals adaptive
This commit is contained in:
parent
2e737fd85c
commit
eb99ec48f7
@ -10,7 +10,14 @@ obj.license = "MIT - https://opensource.org/licenses/MIT"
|
||||
|
||||
function drawSwitcher()
|
||||
-- Drawing
|
||||
canv = hs.canvas.new({ x = 850, y = 1, h = 3, w = 120 })
|
||||
width = hs.screen.mainScreen():fullFrame().w
|
||||
switcherWidth = 500
|
||||
canv = hs.canvas.new({
|
||||
x = width / 2 - switcherWidth / 2,
|
||||
y = 1,
|
||||
h = 3,
|
||||
w = switcherWidth,
|
||||
})
|
||||
canv[#canv + 1] = {
|
||||
action = "build",
|
||||
type = "rectangle",
|
||||
@ -66,6 +73,9 @@ function obj:init()
|
||||
self.launcher:bind("", "F", function()
|
||||
self:switch("Firefox.app")
|
||||
end)
|
||||
self.launcher:bind("", "H", function()
|
||||
self:switch("Hammerspoon.app")
|
||||
end)
|
||||
self.launcher:bind("", "G", function()
|
||||
self:switch("Mimestream.app")
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user