Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
Easier and less error-prone than the F13_f mapping I also have. Need a
shorter shortcut that isn't F1 while I work on trying to move from
Terminal to iTerm.
|
|
Using an index of 2 didn't guarantee that the window accessed would be
window #2. Turns out the order of windows in the list is not consistent.
In order to target window #2, look for the "2. " prefix in the window
title.
|
|
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).
|
|
Reloads the UFO Chrome extension and opens a file in a single one-button
mapping.
|
|
Was trying to get this to work a while ago and it's been sitting
uncommitted in my local repo. Commit it just to have it, and try to
figure out how to get it to work later.
|
|
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.
|
|
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.
|
|
Provides `c` shortcut increase window height to the bottom of the
screen.
|
|
|
|
|
|
Until live reloading is implemented, this compacts a bunch of repetitive
key presses into a modal shortcut.
|
|
|
|
Before doing anything, activate Chrome. Normally it should be active
anyway, but I just tried this with Finder active and no windows open,
not realising that Chrome wasn't the frontmost application.
|
|
Press a keyboard shortcut defined in a separate user script to open the
file using AODocs UFO.
|
|
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.
|
|
|
|
|
|
|
|
Since I overrode the F1 through F4 keys globally, there was no way to
access press a non-custom variant of these keys. Realised this when
trying to access the manual in Mutt, which is bound to F1.
Add Shift-F1–F4 bindings that map to F1–F4, in case we need access to
the original set of keys.
Needed to add a `doAfter` delay after disabling the binding because the
delay seems to take a bit to go through. Thanks to 'knu'
(https://github.com/knu) for the tip:
https://github.com/Hammerspoon/hammerspoon/issues/1252#issuecomment-290411701
Also gleaned it from:
https://stackoverflow.com/questions/40986242/key-repeats-are-delayed-in-my-hammerspoon-script
|
|
Since the `terminal_tab_hotkeys` table had both hotkey objects and
methods in it, the loops that enable and disable the hotkeys were also
looping over the functions, resulting in errors like this:
2019-06-19 23:30:09: ********
2019-06-19 23:30:09: 23:30:09 ERROR: LuaSkin: hs.application.watcher callback: $HOME/.hammerspoon/terminal_tab_hotkeys.lua:42: attempt to index a function value (local 'v') stack traceback:
$HOME/.hammerspoon/terminal_tab_hotkeys.lua:42: in method 'enable'
$HOME/.hammerspoon/terminal_tab_hotkeys.lua:55: in function <$HOME/.hammerspoon/terminal_tab_hotkeys.lua:52>
2019-06-19 23:30:09: ********
Go the easy route and just change the methods into functions so that we
only put hotkeys in the tables.
|
|
Now that there's a lot more code for this, extract it to a separate
file.
|
|
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.
|
|
Otherwise it will stay active until the next time I press a bound key,
forcibly switching applications when not intended.
|
|
Turns out you can't define a multi-key mapping. Not sure if there's a
way to define a dead key in Hammerspoon other than using a mode. Looks
like the way I originally wrote it is the way to do it.
|
|
Change mappings preceded by the F13 key to use easy to reach keys on the
left side of the keyboard. Since F13 requires moving the right hand, use
keys that don't require me to move my left hand, enabling me to activate
these without looking down at the keyboard.
|
|
Hide these under a mode switch as they're not as frequently used as the
others defined at the top of the file.
|
|
Scroll up, down, left, right using the number pad keys. Activate using
F14, or scroll lock.
|
|
Bind a few F<n> keys to activate frequently used applications.
|
|
|
|
Changed this to 'padclear', and the way the code is written, we can't
have two shortcuts to activate & deactivate the mode. Just keep one.
|
|
|
|
|
|
|
|
|
|
Reduce the number of modifiers needed to activate the mode. Makes it a
bit easier on the fingers. Didn't go with Ctrl-Shift because I thought
it might be easier to accidentally activate with Vim window shortcuts.
|
|
Send 'down' when pressing the key, and 'up' when releasing. This sort of
enables us to drag things, but I wasn't able to get an animation while
dragging a window to test this. Looks like I'll need to work out a way
to send mouse dragged events.
|
|
Add an additional mode switch with the num lock or 'clear' key.
|
|
Now we can move by large (100px) increments, as well as smaller 10px and
1px increments for more precision.
|
|
Proof of concept of shortcuts to move the mouse around.
|
|
Quickly move a window to the top of the screen.
|
|
Makes it a bit quicker with a single key instead of a two-handed
shortcut with modifiers. Allows me to keep the existing shortcut.
|
|
* Don't resize the window
* Don't animate window movement
|
|
New shortcuts to resize windows, again in medium and small increments.
|
|
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)
|
|
Makes it easier to maximise windows. Want this to embiggen browser
windows to full height when I connect to an external monitor.
|
|
Add shortcuts to focus tabs 1-10 in the frontmost Terminal window.
|