blob: e8beeb97a170744d88c3ecec3f64203070bef79d (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
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 100 units |
+-------+-----------------------------+
| ``j`` | Move window down 100 units |
+-------+-----------------------------+
| ``k`` | Move window up 100 units |
+-------+-----------------------------+
| ``l`` | Move window right 100 units |
+-------+-----------------------------+
+-------------+-----------------------------+
| ``Shift-h`` | Move window left 20 units |
+-------------+-----------------------------+
| ``Shift-j`` | Move window down 20 units |
+-------------+-----------------------------+
| ``Shift-k`` | Move window up 20 units |
+-------------+-----------------------------+
| ``Shift-l`` | Move window right 20 units |
+-------------+-----------------------------+
+--------------+----------------------------+
| ``Option-h`` | Move window left 5 units |
+--------------+----------------------------+
| ``Option-j`` | Move window down 5 units |
+--------------+----------------------------+
| ``Option-k`` | Move window up 5 units |
+--------------+----------------------------+
| ``Option-l`` | Move window right 5 units |
+--------------+----------------------------+
+-------+---------------------+
| ``i`` | Move window to top |
+-------+---------------------+
+-------+------------------------------+
| ``[`` | Move window left one screen |
+-------+------------------------------+
| ``]`` | Move window right one screen |
+-------+------------------------------+
+-------+----------------------------------+
| ``e`` | Reduce window height 100 units |
+-------+----------------------------------+
| ``s`` | Reduce window width 100 units |
+-------+----------------------------------+
| ``d`` | Increase window height 100 units |
+-------+----------------------------------+
| ``f`` | Increase window width 100 units |
+-------+----------------------------------+
+-------------+---------------------------------+
| ``Shift-e`` | Reduce window height 20 units |
+-------------+---------------------------------+
| ``Shift-s`` | Reduce window width 20 units |
+-------------+---------------------------------+
| ``Shift-d`` | Increase window height 20 units |
+-------------+---------------------------------+
| ``Shift-f`` | Increase window width 20 units |
+-------------+---------------------------------+
+--------------+--------------------------------+
| ``Option-e`` | Reduce window height 5 units |
+--------------+--------------------------------+
| ``Option-s`` | Reduce window width 5 units |
+--------------+--------------------------------+
| ``Option-d`` | Increase window height 5 units |
+--------------+--------------------------------+
| ``Option-f`` | Increase window width 5 units |
+--------------+--------------------------------+
+-------+----------------------------------+
| ``c`` | Increase window height to bottom |
+-------+----------------------------------+
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/
|