mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-25 05:35:38 +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()
|
function drawSwitcher()
|
||||||
-- Drawing
|
-- 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] = {
|
canv[#canv + 1] = {
|
||||||
action = "build",
|
action = "build",
|
||||||
type = "rectangle",
|
type = "rectangle",
|
||||||
@ -66,6 +73,9 @@ function obj:init()
|
|||||||
self.launcher:bind("", "F", function()
|
self.launcher:bind("", "F", function()
|
||||||
self:switch("Firefox.app")
|
self:switch("Firefox.app")
|
||||||
end)
|
end)
|
||||||
|
self.launcher:bind("", "H", function()
|
||||||
|
self:switch("Hammerspoon.app")
|
||||||
|
end)
|
||||||
self.launcher:bind("", "G", function()
|
self.launcher:bind("", "G", function()
|
||||||
self:switch("Mimestream.app")
|
self:switch("Mimestream.app")
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user