dotfiles

Author: Kyle Fuller <kyle@fuller.li> 2018-07-31 20:17:07 +0100 +0100
Committer: Kyle Fuller <kyle@fuller.li> 2018-07-31 20:17:07 +0100 +0100
Commit: f25ae8c8951bd8ebf78aa361b237aa3d3b84342a
Parent: bcfc79ca802e3b065f975f26723a1b86c0df86ea


refactor: Move to skhd from khd
diff --git a/.khdrc b/.khdrc
deleted file mode 100644
index 77aa8696370dc0ffa775c15a6c7b57caf58d8110..0000000000000000000000000000000000000000
--- a/.khdrc
+++ /dev/null
@@ -1,7 +0,0 @@
-cmd + shift - r : khd -e reload; brew services restart chunkwm
-
-cmd - l : chunkc tiling::window --toggle fullscreen
-cmd + shift - f : chunkc tiling::desktop --toggle offset
-
-cmd - b : open -a Safari
-cmd - return : open -a Terminal
diff --git a/.skhdrc b/.skhdrc
new file mode 100644
index 0000000000000000000000000000000000000000..936d65e825c4c2db5374eef576bac1fface12453
--- /dev/null
+++ b/.skhdrc
@@ -0,0 +1,103 @@
+# General
+
+meh - 0 : brew services restart chunkwm
+hyper - return : osascript -e 'tell application "iTerm2" to make create window with default profile'
+
+# Current Window (hyper)
+
+# swap window
+hyper - left : chunkc tiling::window --swap west
+hyper - down : chunkc tiling::window --swap south
+hyper - up : chunkc tiling::window --swap north
+hyper - right : chunkc tiling::window --swap east
+
+# toggle window fullscreen
+hyper - f : chunkc tiling::window --toggle fullscreen
+
+# float / unfloat window (detach)
+hyper - d : chunkc tiling::window --toggle float
+
+# send window to desktop
+hyper - 1 : chunkc tiling::window --send-to-desktop 1
+hyper - 2 : chunkc tiling::window --send-to-desktop 2
+hyper - 3 : chunkc tiling::window --send-to-desktop 3
+hyper - 4 : chunkc tiling::window --send-to-desktop 4
+hyper - 5 : chunkc tiling::window --send-to-desktop 5
+
+# send window to monitor and follow focus
+hyper - 6  : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1
+hyper - 7  : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2
+hyper - 8  : chunkc tiling::window --send-to-monitor 3; chunkc tiling::monitor -f 3
+
+# Resize mode
+:: resize @ : chunkc border::color 0xff24ccaa
+
+# enter resize mode
+hyper - r ; resize
+
+# leave resize mode
+resize < escape ; default
+resize < return ; default
+
+resize < up : chunkc tiling:window --use-temporary-ratio 0.1 --adjust-window-edge north
+resize < down : chunkc tiling:window --use-temporary-ratio 0.1 --adjust-window-edge south
+resize < left : chunkc tiling:window --use-temporary-ratio 0.1 --adjust-window-edge west
+resize < right : chunkc tiling:window --use-temporary-ratio 0.1 --adjust-window-edge east
+
+resize < shift - up : chunkc tiling:window --use-temporary-ratio -0.1 --adjust-window-edge south
+resize < shift - down : chunkc tiling:window --use-temporary-ratio -0.1 --adjust-window-edge north
+resize < shift - left : chunkc tiling:window --use-temporary-ratio -0.1 --adjust-window-edge east
+resize < shift - right : chunkc tiling:window --use-temporary-ratio -0.1 --adjust-window-edge west
+
+# Current Desktop (meh)
+
+# focus window
+meh - left : chunkc tiling::window --focus west
+meh - down : chunkc tiling::window --focus south
+meh - up : chunkc tiling::window --focus north
+meh - right : chunkc tiling::window --focus east
+
+# rotate tree
+meh - r : chunkc tiling::desktop --rotate 90
+
+# mirror tree y-axis
+meh - y : chunkc tiling::desktop --mirror vertical
+
+# mirror tree x-axis
+meh - x : chunkc tiling::desktop --mirror horizontal
+
+# toggle desktop offset (gaps)
+meh - g : chunkc tiling::desktop --toggle offset
+
+# toggle window native fullscreen
+meh - f : chunkc tiling::window --toggle native-fullscreen
+
+# toggle window split type
+meh - s : chunkc tiling::window --toggle split
+
+# equalize size of windows
+meh - e : chunkc tiling::desktop --equalize
+
+# change layout of desktop
+meh - b : chunkc tiling::desktop --layout bsp
+meh - m : chunkc tiling::desktop --layout monocle
+meh - d : chunkc tiling::desktop --layout float
+
+# move to desktop
+meh - 1 : chunkc tiling::desktop --focus 1
+meh - 2 : chunkc tiling::desktop --focus 2
+meh - 3 : chunkc tiling::desktop --focus 3
+meh - 4 : chunkc tiling::desktop --focus 4
+meh - 5 : chunkc tiling::desktop --focus 5
+
+# focus monitor
+meh - 6  : chunkc tiling::monitor -f 1
+meh - 7  : chunkc tiling::monitor -f 2
+meh - 8  : chunkc tiling::monitor -f 3
+
+# set insertion point for focused container
+ctrl + alt - f : chunkc tiling::window --use-insertion-point cancel
+ctrl + alt - h : chunkc tiling::window --use-insertion-point west
+ctrl + alt - j : chunkc tiling::window --use-insertion-point south
+ctrl + alt - k : chunkc tiling::window --use-insertion-point north
+ctrl + alt - l : chunkc tiling::window --use-insertion-point east
diff --git a/README.md b/README.md
index 19c64e28a97e08680e8f6864f5a1b7d7b421e628..a3ab3daf88b22b6a480dbc30cd469b647aa2f9fe 100644
--- a/README.md
+++ b/README.md
@@ -20,3 +20,74 @@ ```shell
 $ make
 ```
 
+## Usage
+
+### Keyboard Shortcuts
+
+| Shortcut       | Action                |
+|----------------|-----------------------|
+| hyper - return | New Terminal          |
+
+#### Focussed Window
+
+Actions that affect the focussed window.
+
+| Shortcut      | Action                |
+|---------------|-----------------------|
+| hyper - f     | Toggle fullscreen     |
+| hyper - d     | Toggle Float          |
+| hyper - r     | Enter resize mode     |
+| hyper - up    | Swap up window        |
+| hyper - right | Swap right window     |
+| hyper - down  | Swap down window      |
+| hyper - left  | Swap left window      |
+| hyper - 1     | Send to Desktop 1     |
+| hyper - 2     | Send to Desktop 2     |
+| hyper - 3     | Send to Desktop 3     |
+| hyper - 4     | Send to Desktop 4     |
+| hyper - 5     | Send to Desktop 5     |
+| hyper - 6     | Send to Monitor 1     |
+| hyper - 7     | Send to Monitor 2     |
+| hyper - 8     | Send to Monitor 3     |
+
+##### Resize Mode
+
+| Shortcut      | Action    |
+|---------------|-----------|
+| up            |           |
+| right         |           |
+| down          |           |
+| left          |           |
+| shift - up    |           |
+| shift - right |           |
+| shift - down  |           |
+| shift - left  |           |
+| esc           | Exit Mode |
+| return        | Exit Mode |
+
+#### Current Desktop
+
+| Shortcut      | Action                |
+|---------------|-----------------------|
+| meh - r       | Rotate 90             |
+| meh - x       | Flip X-axis           |
+| meh - y       | Flip Y-axis           |
+| meh - e       | Equalise Window Sizes |
+| meh - g       | Toggle Gaps           |
+| meh - b       | BSP Mode              |
+| meh - m       | Monocle Mode          |
+| meh - d       | Floating Mode         |
+| meh - s       | Toggle split |
+| meh - f       | Toggle native fullscreen |
+| meh - up      | Focus up window       |
+| meh - right   | Focus right window    |
+| meh - down    | Focus down window     |
+| meh - left    | Focus left window     |
+| meh - 1       | Move to Desktop 1     |
+| meh - 2       | Move to Desktop 2     |
+| meh - 3       | Move to Desktop 3     |
+| meh - 4       | Move to Desktop 4     |
+| meh - 5       | Move to Desktop 5     |
+| meh - 6       | Focus Monitor 1       |
+| meh - 7       | Focus Monitor 2       |
+| meh - 8       | Focus Monitor 3       |