My collection of lua scripts for [Hammerspoon](http://www.hammerspoon.org/). It has highly modal-based, vim-styled key bindings, provides some functionality like desktop widgets, window management, application launcher, dictionary translation, cheatsheets... etc.
Add private dir for personal use Model hotkeys mapping and AppLaunchers.
caffeinator -- Prevent computer fall asleep, controlled by bar icon.
AppLauncher -- custom launcher
AClock -- custom transparent green Digital Clock show on top left of every space.
Cheatsheet -- showavailableHotkey (you don't need to remember lots of keybindings, just call cheatsheet.)
CountDownNumber -- custom plugin to display countdown number, complete alert sound, with a chooser
Window Resize -- using keys to control window size
SpoonInstall -- thirdparty Plugin manager
WindowGrid -- thirdparty window manager plugin
Emojis -- thirdparty Emoji plugin
DeepLTranslate -- thirdparty translate plugin
Cherry -- thirdparty pomodoro plugin, just change some picture/time
Reload Plugins-- thirdparty reload plugin
Custom commands -- send 'exit' hotkey; hide desktop hotkey; show desktop hotkey
Clipboard -- show clipboard content
Mouse control key -- move mouse through keyboard
- Install Hammerspoon first.
git clone https://github.com/zzuse/hammerspoon.git ~/.hammerspoon
- Reload the configutation.
and you're set.
cd ~/.hammerspoon && git pull
init.lua
==> private config (awesomeconfig.lua
) ==> modalmgr(call basicmode.lua
) ==> loadSpoon plugins
2. The modalmgr controls entering appMode, clipboardMode, cheatsheetMode, resizeMode, viewMode, a sign on the bottom right will show mode.
Key bindings | Movement |
---|---|
⌥ + M | Mode on/off |
⌥ + A | Enter app mode |
⌥ + C | Enter clipboard mode |
⌥ + R | Enter resize mode |
⌥ + S | Enter cheatsheet mode |
⌥ + T | Count down number |
⌥ + P | Count down number pause |
⌥ + V | Enter view mode |
⌥ + I | Windows Hint |
⌥ + Z | Toggle Hammerspoon console |
⌥ + G | Plugin Window grid |
⌥ + E | Plugin Emojis |
⇧ ^ + E | send EXIT to terminal |
⇧ ^ + H | hide desktop file |
⌘ ⇧ ^ + H | show desktop file |
^ ⌥ ⌘ + C | spoon.ReloadConfigure |
^ ⌥ ⌘ + D | DeepL Translate |
^ ⌥ ⌘ + S | pomodoro timer tart |
^ ⌥ ⌘ + P | pomodoro timer pause |
^ ⌥ ⌘ + R | pomodoro timer resume |
^ ⌥ ⌘ + T | toggle current time |
Key bindings | Movement |
---|---|
H | Scroll Leftward |
L | Scroll Rightward |
J | Scroll Downward |
K | Scroll Upward |
^ + H | Move Mouse Leftward by 50px |
^ + L | Move Mouse Rightward by 50px |
^ + J | Move Mouse Downward by 50px |
^ + K | Move Mouse Upward by 50px |
⇧ + H | Move Mouse Leftward by 10px |
⇧ + L | Move Mouse Rightward by 10px |
⇧ + K | Move Mouse Upward by 10px |
⇧ + J | Move Mouse Downward by 10px |
^ ⇧ + H | Move Mouse Leftward by 1px |
^ ⇧ + L | Move Mouse Rightward by 1px |
^ ⇧ + K | Move Mouse Upward by 1px |
^ ⇧ + J | Move Mouse Downward by 1px |
, | Left Mouse Click |
. | Right Mouse Click |
Q | EXIT |
Key bindings | Movement |
---|---|
⇧ + Y | 'Shrink Leftward' |
⇧ + O | 'Stretch Rightward' |
⇧ + M | 'Stretch Downward' |
⇧ + I | 'Shrink Upward' |
F | 'Fullscreen' |
C | 'Center Window' |
⇧ + C | 'Resize & Center' |
H | 'Lefthalf of Screen' |
J | 'Downhalf of Screen' |
K | 'Uphalf of Screen' |
L | 'Righthalf of Screen' |
Y | 'NorthWest Corner' |
N | 'SouthWest Corner' |
M | 'SouthEast Corner', |
O | 'NorthEast Corner', |
= | 'Stretch Outward', |
- | 'Shrink Inward', |
⇧ + H | 'Move Leftward', |
⇧ + L | 'Move Rightward', |
⇧ + J | 'Move Downward', |
⇧ + K | 'Move Upward', |
[ | 'Focus Westward', |
] | 'Focus Eastward', |
up | 'Move to monitor above' |
down | 'Move to monitor below' |
right | 'Move to monitor right' |
left | 'Move to monitor left', |
space | 'Move to next monitor' |
Q | EXIT |
More details
As you may have noticed, there are two clean, nice-looking desktop widgets, analogclock and calendar. Usually we don't interact with them, but I do hope you like them.
UPDATE: Add new widget hcalendar
and make it default module. The design comes from here.
More details
https://github.com/zzamboni/oh-my-hammerspoon
https://github.com/scottcs/dot_hammerspoon
https://github.com/dharmapoudel/hammerspoon-config
Share your scripts and thoughts.
: )