aboutsummaryrefslogtreecommitdiffstats
path: root/init.lua
AgeCommit message (Collapse)Author
2023-11-08keyboard_layout_select: Add shortcuts to select keyboard layoutTeddy Wing
I had to upgrade to Mac OS 14 Sonoma, which in addition to adding a useless software Caps Lock indicator, also royally screwed up the way that changing keyboard layouts used to work (it worked perfectly fine). I decided to make a unique keyboard shortcut to switch to each keyboard layout to put some order to the madness.
2021-11-29Add a way to set output volume from a Google Meet videoconferenceTeddy Wing
I'm planning to make a Greasemonkey script that loads on Google Meet videoconference pages and make an HTTP request to this Hammerspoon server to set the output volume to a predetermined level.
2021-09-13Add keyboard_layout.luaTeddy Wing
Change the keyboard layout depending on whether my external keyboard is connected or not.
2021-03-07init: Update copyright yearTeddy Wing
2021-03-07init: Remove F8 key bindingTeddy Wing
This binding is no longer needed because I've replaced screen colour inversion with https://github.com/teddywing/Re-Good-Catalina-Invert-Colours, which includes built-in support for the shortcut. Not sure about the monitor check as I haven't been able to test it. If I still need to correct for that, I can add it back in later.
2021-03-07Revert "Try correcting Catalina invert screen colours"Teddy Wing
This reverts commit 3135531426cfc2abc057ad085e39022617cd8689. Didn't work.
2021-03-07Try correcting Catalina invert screen coloursTeddy Wing
Tried setting up a correction for Mac OS X 10.15 Catalina's invert screen colours bug on February 7, 2020. I never committed it because I never got it working. Committing the work here for reference. It's supposed to reactivate inverted colours using the Accessibility Options panel.
2019-11-15init: Fix condition in F8 mappingTeddy Wing
We want to restore the brightness when the external monitor is connected. Probably wrote the inverse condition in order to test it without the monitor connected and forgot to inverse it.
2019-10-31init: Reset brightness in F8 invert screen colours bindingTeddy Wing
Mac OS X 10.15 Catalina sometimes (but not always) causes the internal display's brightness to change to the maximum when connected to an external monitor after inverting screen colours. In our F8 shortcut which inverts screen colours, reset the screen brightness to correct this idiocy.
2019-10-16Add brightness correction for OS X 10.15 CatalinaTeddy Wing
Since upgrading to 10.15 Catalina, when my external monitor is plugged in and I wake up my machine, for some unexplained reason the internal display resets to maximum brightness. Fix Catalina's nonsense on wake by resetting to the brightness from before sleep.
2019-08-06Remove F5 Chrome extension reloader, replace with iTerm app switchTeddy Wing
Remove the Chrome extension reload binding on F5. I'm not using it currently and it was just messing me up when I pressed it accidentally. Move the iTerm application switching binding from F6 to F5 now that it's free, as F5 is easier to find without looking.
2019-07-25Automatically reposition iTerm window 2 when external monitor connectedTeddy Wing
When my external monitor is connected, ensure that iTerm's window #2 is in the proper position. iTerm has a habit of getting its window layout screwed up when switching monitors (or just not remembering window layouts between monitors).
2019-07-25init: New F5 mapping to reload UFO Chrome extensionTeddy Wing
Reloads the UFO Chrome extension and opens a file in a single one-button mapping.
2019-07-11init: Add temporary F5 binding to reload a browser extensionTeddy Wing
Working on a Chrome extension that displays an HTML interface through an extension-scoped URL. When I reload the extension, the page gets closed automatically. This mapping clicks the extension's button in the Chrome toolbar (the rightmost extension icon) to reopen the page.
2019-07-06init.lua: Remove Ctrl-Option-z shortcutTeddy Wing
Now that WindowMode has the `c` shortcut which does the same thing, we no longer need this shortcut. It was also shadowing a Ctrl-Option-Shift-z shortcut I have attached to the "Zoom" menu item in iTerm2. Now the Zoom shortcut works there.
2019-06-28Add hotkey to reload AODocs UFO browser extensionTeddy Wing
Until live reloading is implemented, this compacts a bunch of repetitive key presses into a modal shortcut.
2019-06-22Add gdrive_mouseover_item modeTeddy Wing
A mode that selects a file row in Google Drive by its ID using keyboard shortcuts 1–0 and q–p. Makes it possible to select a file without using the mouse.
2019-06-19init: Move Terminal tab shortcuts to a new fileTeddy Wing
Now that there's a lot more code for this, extract it to a separate file.
2019-06-19init: Deactivate Terminal tab switching hotkeys outside of TerminalTeddy Wing
The bindings I created to switch tabs in Terminal shadowed shortcuts in all other applications, preventing them from performing their normal function. To get the bindings only in Terminal, add an application watcher that enables and disables them when Terminal is activated and deactivated.
2019-06-17Add application switching shortcutsTeddy Wing
Bind a few F<n> keys to activate frequently used applications.
2019-06-17Extract `window.lua` to `WindowMode.spoon`Teddy Wing
2019-06-15Add license (GNU GPLv3+)Teddy Wing
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.