Configurations for Hammerspoon
Copy the config.lua.dist
to config.lua
and adapt to your needs.
The base hotkeys are always the same, configured in the file config.lua
.
config.hyper = {'ctrl', 'alt', 'cmd'}
The menu contains an "extended" version that creates items for the window movement and applications.
Move and resize windows with hotkeys.
Hotkey | Direction |
---|---|
hyper + ← | left |
hyper + ← + ← | left_half |
hyper + → | right |
hyper + → + → | right_half |
hyper + ↑ | top |
hyper + ↑ + ↑ | maximize |
hyper + ↓ | down |
hyper + ↓ + ↓ | center |
Menu click | top_right |
Menu click | top_left |
Menu click | down_right |
Menu click | down_left |
Set hotkeys to open applications.
Configurable in the config.lua
.
config.applications = {
I = 'iTerm',
P = 'PhpStorm',
L = 'Sublime Text',
}
A menu item (and submenu) that allows to prevent the system from going to sleep with a timer or indefinitely.
Configurable in the config.lua
.
config.menu.caffeine = {
{title = '10 minutes', seconds = 600},
{title = '30 minutes', seconds = 1800},
{title = '1 hour', seconds = 3600},
{title = '3 hours', seconds = 10800},
}
Menu items that shows and allows copying when clicked the Wifi name, External IP and Internal IP addresses.
A menu item that shows the connected displays.
When a .lua
file is changed the configurations will be reloaded.
Hotkey: hyper + R
Force specific input device to be always used.
Mute automatically when the computer wakes up.
Configurable in the config.lua
.
config.audio.forceInputDevices = {
{
from = 'Anker SoundCore',
to = 'MacBook Pro Microphone',
}
}
config.audio.muteOnAwake = true
Get notified when:
- Using an unknown charger (connect the charger and run
hs.battery.psuSerialString()
to check the current serial). - Battery state is not Good.
Configurable in the config.lua
.
config.battery.serial = ''
config.battery.state = true
From Time to Date, type: 1577865600
From Date to Time, type: 2020-01-01 09:00:00
Translate text directly on Seal/Spotlight.
This plugin requires a Google API key
and is configurable in the config.lua
.
config.Seal.key = 'SOME-KEY'
The Usage: Type tr
following the langcode to which you want to translate the text,
and the text to be translate
tr [to] [text to translate]
Run the script update-spoons.sh
.
This will clone the Spoons repo into a
temporary folder, apply the patches and copy the result into the
Spoons
folder.
All the un-used Spoons are ignored in the .gitignore
.