aboutsummaryrefslogtreecommitdiffstats
path: root/window.lua
diff options
context:
space:
mode:
Diffstat (limited to 'window.lua')
-rw-r--r--window.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/window.lua b/window.lua
index 42b05ad..3a43d60 100644
--- a/window.lua
+++ b/window.lua
@@ -115,6 +115,14 @@ function window.decrease_left_med()
end
+function window.move_to_top()
+ local position = hs.window.focusedWindow():topLeft()
+ position.y = 0
+
+ hs.window.focusedWindow():setTopLeft(position)
+end
+
+
window_mode = hs.hotkey.modal.new({'ctrl', 'option', 'shift'}, 'w', 'Window')
window_mode:bind({'ctrl', 'option', 'shift'}, 'w', 'Window Off', function()
window_mode:exit()
@@ -130,6 +138,8 @@ window_mode:bind({}, 'l', window.right_med, nil, window.right_med)
window_mode:bind({}, 'j', window.down_med, nil, window.down_med)
window_mode:bind({}, 'h', window.left_med, nil, window.left_med)
+window_mode:bind({}, 'i', window.move_to_top, nil, window.move_to_top)
+
window_mode:bind({}, ']', function() hs.window.focusedWindow():moveOneScreenEast(true, false, 0) end)
window_mode:bind({}, '[', function() hs.window.focusedWindow():moveOneScreenWest(true, false, 0) end)