aboutsummaryrefslogtreecommitdiffstats
path: root/init.lua
AgeCommit message (Collapse)Author
2019-06-15Add mouse hotkeysTeddy Wing
Proof of concept of shortcuts to move the mouse around.
2019-06-15Add <F8> shotcut to invert screen coloursTeddy Wing
Makes it a bit quicker with a single key instead of a two-handed shortcut with modifiers. Allows me to keep the existing shortcut.
2019-06-15Add window movement hotkeysTeddy Wing
Create a new mode activated with <C-M-S-w> that activates hotkeys to do window management. Add hotkeys to move windows up, down, left, and right. One set of hotkeys to move by small increments and another set to move by slightly larger increments. Based on code from 'derekwyatt' (https://github.com/derekwyatt): https://github.com/fikovnik/ShiftIt/issues/296#issuecomment-438386501 > units = { > right30 = { x = 0.70, y = 0.00, w = 0.30, h = 1.00 }, > right70 = { x = 0.30, y = 0.00, w = 0.70, h = 1.00 }, > left70 = { x = 0.00, y = 0.00, w = 0.70, h = 1.00 }, > left30 = { x = 0.00, y = 0.00, w = 0.30, h = 1.00 }, > top50 = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 }, > bot50 = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 }, > upright30 = { x = 0.70, y = 0.00, w = 0.30, h = 0.50 }, > botright30 = { x = 0.70, y = 0.50, w = 0.30, h = 0.50 }, > upleft70 = { x = 0.00, y = 0.00, w = 0.70, h = 0.50 }, > botleft70 = { x = 0.00, y = 0.50, w = 0.70, h = 0.50 }, > maximum = { x = 0.00, y = 0.00, w = 1.00, h = 1.00 } > } > > mash = { 'shift', 'ctrl', 'cmd' } > hs.hotkey.bind(mash, 'l', function() hs.window.focusedWindow():move(units.right30, nil, true) end) > hs.hotkey.bind(mash, 'h', function() hs.window.focusedWindow():move(units.left70, nil, true) end) > hs.hotkey.bind(mash, 'k', function() hs.window.focusedWindow():move(units.top50, nil, true) end) > hs.hotkey.bind(mash, 'j', function() hs.window.focusedWindow():move(units.bot50, nil, true) end) > hs.hotkey.bind(mash, ']', function() hs.window.focusedWindow():move(units.upright30, nil, true) end) > hs.hotkey.bind(mash, '[', function() hs.window.focusedWindow():move(units.upleft70, nil, true) end) > hs.hotkey.bind(mash, ';', function() hs.window.focusedWindow():move(units.botleft70, nil, true) end) > hs.hotkey.bind(mash, "'", function() hs.window.focusedWindow():move(units.botright30, nil, true) end) > hs.hotkey.bind(mash, 'm', function() hs.window.focusedWindow():move(units.maximum, nil, true) end)
2019-06-15init.lua: Add hotkey to extend window height to bottomTeddy Wing
Makes it easier to maximise windows. Want this to embiggen browser windows to full height when I connect to an external monitor.
2019-06-15Add Hammerspoon configTeddy Wing
Add shortcuts to focus tabs 1-10 in the frontmost Terminal window.