blob: 39757bf507db5971a1703da20d3106e111e3d2fe (
plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
WindowMode.spoon
================
A Hammerspoon_ Spoon that provides a keyboard mode for manipulating windows.
Upon activating the mode, the following shortcuts are available:
+-------+----------------------------+
| ``h`` | Move window left 20 units |
+-------+----------------------------+
| ``j`` | Move window down 20 units |
+-------+----------------------------+
| ``k`` | Move window up 20 units |
+-------+----------------------------+
| ``l`` | Move window right 20 units |
+-------+----------------------------+
+-------------+----------------------------+
| ``Shift-h`` | Move window left 5 units |
+-------------+----------------------------+
| ``Shift-j`` | Move window down 5 units |
+-------------+----------------------------+
| ``Shift-k`` | Move window up 5 units |
+-------------+----------------------------+
| ``Shift-l`` | Move window right 5 units |
+-------------+----------------------------+
+-------+------------------------------+
| ``[`` | Move window left one screen |
+-------+------------------------------+
| ``]`` | Move window right one screen |
+-------+------------------------------+
+-------+---------------------------------+
| ``e`` | Reduce window height 20 units |
+-------+---------------------------------+
| ``s`` | Reduce window width 20 units |
+-------+---------------------------------+
| ``d`` | Increase window height 20 units |
+-------+---------------------------------+
| ``f`` | Increase window width 20 units |
+-------+---------------------------------+
+-------------+--------------------------------+
| ``Shift-e`` | Reduce window height 5 units |
+-------------+--------------------------------+
| ``Shift-s`` | Reduce window width 5 units |
+-------------+--------------------------------+
| ``Shift-d`` | Increase window height 5 units |
+-------------+--------------------------------+
| ``Shift-f`` | Increase window width 5 units |
+-------------+--------------------------------+
Install
-------
::
$ cd ~/.hammerspoon/Spoons
$ git clone https://github.com/teddywing/WindowMode.spoon.git
Add the following to your Hammerspoon config, using your preferred hotkey to
activate & deactivate the mode::
hs.loadSpoon('WindowMode')
spoon.WindowMode:bindHotkeys({ mode = {{'ctrl', 'option'}, 'w'} })
License
-------
Copyright © 2019 Teddy Wing. Licensed under the GNU GPLv3+ (see the included
COPYING file).
.. _Hammerspoon: https://www.hammerspoon.org/
|