Fix loading spoons
This commit is contained in:
parent
9a4c10442a
commit
ceabbe3c92
@ -1,15 +1,21 @@
|
|||||||
(function()
|
windowMove = function()
|
||||||
local hyper = { "ctrl", "alt", "cmd" }
|
|
||||||
|
|
||||||
-- move window to next screen
|
-- move window to next screen
|
||||||
hs.hotkey.bind(hyper, "N", function()
|
hs.hotkey.bind({ "ctrl", "alt", "cmd" }, "N", function()
|
||||||
local win = hs.window.focusedWindow()
|
local win = hs.window.focusedWindow()
|
||||||
win:moveToScreen(win:screen():next())
|
win:moveToScreen(win:screen():next())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, 3 do
|
|
||||||
hs.hotkey.bind(hyper, "pad" .. i, function()
|
-- Windows seem to be indexed by primary screen first
|
||||||
hs.window.focusedWindow():moveToScreen(i)
|
hs.hotkey.bind({ "ctrl", "alt", "cmd" }, "pad1", function()
|
||||||
|
hs.window.focusedWindow():moveToScreen(hs.screen.allScreens()[3])
|
||||||
end)
|
end)
|
||||||
end
|
hs.hotkey.bind({ "ctrl", "alt", "cmd" }, "pad2", function()
|
||||||
end)()
|
hs.window.focusedWindow():moveToScreen(hs.screen.allScreens()[1])
|
||||||
|
end)
|
||||||
|
hs.hotkey.bind({ "ctrl", "alt", "cmd" }, "pad3", function()
|
||||||
|
hs.window.focusedWindow():moveToScreen(hs.screen.allScreens()[2])
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
windowMove()
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
(function()
|
windowTiling =function()
|
||||||
hs.window.animationDuration = 0
|
hs.window.animationDuration = 0
|
||||||
hs.window.setShadows(false)
|
hs.window.setShadows(false)
|
||||||
local hyper = { "ctrl", "alt", "cmd" }
|
local hyper = { "ctrl", "alt", "cmd" }
|
||||||
@ -147,7 +147,6 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
wm:init()
|
wm:init()
|
||||||
|
end
|
||||||
|
|
||||||
hs.notify.show("Welcome to Hammerspoon", "Have fun!", "")
|
windowTiling()
|
||||||
|
|
||||||
end)()
|
|
||||||
|
|||||||
@ -43,6 +43,7 @@ in
|
|||||||
"${homedir}/.hammerspoon/init.lua" = {
|
"${homedir}/.hammerspoon/init.lua" = {
|
||||||
text = ''
|
text = ''
|
||||||
${builtins.readFile ./hammerspoon/window-tiling.lua}
|
${builtins.readFile ./hammerspoon/window-tiling.lua}
|
||||||
|
|
||||||
${builtins.readFile ./hammerspoon/window-move.lua}
|
${builtins.readFile ./hammerspoon/window-move.lua}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user