This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
forked from wyne/awesome-hammerspoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
61 lines (46 loc) · 1.56 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-- Grid
hs.window.animationDuration=0.0
local hotkey = require "hs.hotkey"
local grid = require "hs.grid"
grid.MARGINX = 20
grid.MARGINY = 20
grid.GRIDHEIGHT = 4
grid.GRIDWIDTH = 6
local mod_resize = { "ctrl", "cmd" }
local mod_move = { "ctrl", "alt" }
-- Move Window
hotkey.bind(mod_move, 'j', grid.pushWindowDown)
hotkey.bind(mod_move, 'k', grid.pushWindowUp)
hotkey.bind(mod_move, 'h', grid.pushWindowLeft)
hotkey.bind(mod_move, 'l', grid.pushWindowRight)
-- Resize Window
hotkey.bind(mod_resize, 'k', grid.resizeWindowShorter)
hotkey.bind(mod_resize, 'j', grid.resizeWindowTaller)
hotkey.bind(mod_resize, 'l', grid.resizeWindowWider)
hotkey.bind(mod_resize, 'h', grid.resizeWindowThinner)
-- SPOONS
-- Vim Bindings
hs.loadSpoon("VimBindings")
-- OSX Notification Clicker
hs.loadSpoon("NotiClicker")
spoon.NotiClicker:bindHotkeys({
top = { "ctrl", ";" },
bottom = { "ctrl", "'" },
})
-- App Specific Bindings
hs.loadSpoon("AppBindings")
spoon.AppBindings:bind('Telegram', {
{ { 'cmd', 'shift' }, ']', { 'alt' }, 'down' }, -- Next chat window
{ { 'cmd', 'shift' }, '[', { 'alt' }, 'up' }, -- Prev chat window
{ 'ctrl', 'n', {}, 'pagedown' }, -- Scroll message window
{ 'ctrl', 'p', {}, 'pageup' }, -- Scroll message window
})
spoon.AppBindings:bind('Notion', {
{ { 'cmd', 'shift' }, ']', { 'cmd' }, ']' },
{ { 'cmd', 'shift' }, '[', { 'cmd' }, '[' },
{ 'cmd', 'o', 'cmd', 'k' }, -- Open search
})
spoon.AppBindings:bind('Slack', {
{ 'ctrl', 'n', {}, 'pagedown' }, -- Scroll message window
{ 'ctrl', 'p', {}, 'pageup' }, -- Scroll message window
})