Skip to content

Instantly share code, notes, and snippets.

@danryan
Created November 7, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danryan/8e0b6ec76ed3750ef264c1bc4f25a861 to your computer and use it in GitHub Desktop.
Save danryan/8e0b6ec76ed3750ef264c1bc4f25a861 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
# NOTE: if enabled, chunkwm will monitor the specified plugin_dir
# and automatically reload any '.so' file that is changed.
#
chunkc core::hotload 1
#
# NOTE: the following are config variables for the chunkwm-tiling plugin.
#
chunkc set global_desktop_mode bsp
chunkc set 1_desktop_tree ~/.chunkwm_layouts/dev_1
chunkc set global_desktop_offset_top 5
chunkc set global_desktop_offset_bottom 5
chunkc set global_desktop_offset_left 5
chunkc set global_desktop_offset_right 5
chunkc set global_desktop_offset_gap 5
chunkc set 1_desktop_offset_top 5
chunkc set 1_desktop_offset_bottom 5
chunkc set 1_desktop_offset_left 5
chunkc set 1_desktop_offset_right 5
chunkc set 1_desktop_offset_gap 5
chunkc set desktop_padding_step_size 5.0
chunkc set desktop_gap_step_size 2.0
chunkc set bsp_spawn_left 1
chunkc set bsp_optimal_ratio 1.618
chunkc set bsp_split_mode optimal
chunkc set bsp_split_ratio 0.5
chunkc set window_focus_cycle monitor
chunkc set mouse_follows_focus 1
chunkc set window_float_next 0
chunkc set window_float_center 1
chunkc set window_region_locked 1
#
# NOTE: shell commands require escaped quotes
# to pass value containing a whitespace.
#
# chunkc set mouse_modifier \"cmd shift\"
chunkc set mouse_modifier fn
chunkc set preselect_border_color 0xffffff00
chunkc set preselect_border_width 4
chunkc set preselect_border_radius 5
#
# NOTE: these settings require chwm-sa.
# (https://github.com/koekeishiya/chwm-sa)
#
chunkc set window_float_topmost 0
chunkc set window_fade_inactive 0
chunkc set window_fade_alpha 0.85
chunkc set window_fade_duration 0.5
#
# NOTE: the following are config variables for the chunkwm-border plugin.
#
chunkc set focused_border_color 0xffc0b18b
chunkc set focused_border_width 4
chunkc set focused_border_radius 5
chunkc set focused_border_skip_floating 0
#
# NOTE: specify plugins to load when chunkwm starts.
# if chunkc plugin_dir is not set, the absolutepath is necessary.
#
chunkc core::load border.so
chunkc core::load tiling.so
chunkc core::load ffm.so
#
# NOTE: shell commands require escaped quotes
# to pass value containing a whitespace.
#
chunkc tiling::rule --owner Finder --name Copy --state float
chunkc tiling::rule --owner \"App Store\" --state float
chunkc tiling::rule --owner Keybase --name Keybase --state tile
chunkc tiling::rule --owner AirServer --name AirServer --state float
chunkc tiling::rule --owner Alfred --state float
# reload config
cmd + alt + ctrl + shift - r : brew services restart chunkwm
ctrl + alt + cmd - r : launchctl stop homebrew.mxcl.chunkwm \
&& launchctl stop homebrew.mxcl.skhd
# open terminal, blazingly fast compared to iTerm/Hyper
cmd - return : open -na /Applications/Kitty.app
# focus window
alt - h : chunkc tiling::window --focus west
alt - j : chunkc tiling::window --focus south
alt - k : chunkc tiling::window --focus north
alt - l : chunkc tiling::window --focus east
#cmd - alt - j : chunkc tiling::window --focus prev
#cmd - alt - k : chunkc tiling::window --focus next
# equalize size of windows
shift + alt - 0 : chunkc tiling::desktop --equalize
# swap window
shift + alt - h : chunkc tiling::window --swap west
shift + alt - j : chunkc tiling::window --swap south
shift + alt - k : chunkc tiling::window --swap north
shift + alt - l : chunkc tiling::window --swap east
# move window
ctrl + cmd - h : chunkc tiling::window --warp west
ctrl + cmd - j : chunkc tiling::window --warp south
ctrl + cmd - k : chunkc tiling::window --warp north
ctrl + cmd - l : chunkc tiling::window --warp east
# move floating windows / windows on a floating space
shift + alt - up : chunkc tiling::window --warp-floating fullscreen
shift + alt - left : chunkc tiling::window --warp-floating left
shift + alt - right : chunkc tiling::window --warp-floating right
shift + cmd - left : chunkc tiling::window --warp-floating top-left
shift + cmd - right : chunkc tiling::window --warp-floating top-right
shift + ctrl - left : chunkc tiling::window --warp-floating bottom-left
shift + ctrl - right : chunkc tiling::window --warp-floating bottom-right
# send window to desktop
shift + alt - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop)
shift + alt - z : chunkc tiling::window --send-to-desktop prev
shift + alt - c : chunkc tiling::window --send-to-desktop next
shift + alt - 1 : chunkc tiling::window --send-to-desktop 1
shift + alt - 2 : chunkc tiling::window --send-to-desktop 2
shift + alt - 3 : chunkc tiling::window --send-to-desktop 3
shift + alt - 4 : chunkc tiling::window --send-to-desktop 4
shift + alt - 5 : chunkc tiling::window --send-to-desktop 5
shift + alt - 6 : chunkc tiling::window --send-to-desktop 6
# switch to last active desktop
#cmd + alt - x : `id=$(chunkc get _last_active_desktop); khd -p "cmd + alt - $id" &> /dev/null`
# focus monitor
ctrl + alt - z : chunkc tiling::monitor -f prev
ctrl + alt - c : chunkc tiling::monitor -f next
ctrl + alt - 1 : chunkc tiling::monitor -f 1
ctrl + alt - 2 : chunkc tiling::monitor -f 2
ctrl + alt - 3 : chunkc tiling::monitor -f 3
# send window to monitor and follow focus
ctrl + cmd - z : chunkc tiling::window --send-to-monitor prev; chunkc tiling::monitor -f prev
ctrl + cmd - c : chunkc tiling::window --send-to-monitor next; chunkc tiling::monitor -f next
ctrl + cmd - 1 : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1
ctrl + cmd - 2 : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2
ctrl + cmd - 3 : chunkc tiling::window --send-to-monitor 3; chunkc tiling::monitor -f 3
# increase region size
shift + alt - a : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge west
shift + alt - s : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
shift + alt - w : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
shift + alt - d : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
# decrease region size
shift + cmd - a : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
shift + cmd - s : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
shift + cmd - w : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
shift + cmd - d : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
# 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
# rotate tree
alt - r : chunkc tiling::desktop --rotate 90
# mirror tree y-axis
alt - y : chunkc tiling::desktop --mirror vertical
# mirror tree x-axis
alt - x : chunkc tiling::desktop --mirror horizontal
# toggle desktop offset
alt - a : chunkc tiling::desktop --toggle offset
# toggle window fullscreen
alt - f : chunkc tiling::window --toggle fullscreen
# toggle window native fullscreen
shift + alt - f : chunkc tiling::window --toggle native-fullscreen
# toggle window parent zoom
alt - d : chunkc tiling::window --toggle parent
# toggle window split type
alt - e : chunkc tiling::window --toggle split
# float / unfloat window
alt - t : chunkc tiling::window --toggle float
# toggle sticky, float and resize to picture-in-picture size
alt - s : chunkc tiling::window --toggle sticky;\
chunkc tiling::window --warp-floating pip-right
# float next window to be tiled
shift + alt - t : chunkc set window_float_next 1
# change layout of desktop
ctrl + alt - a : chunkc tiling::desktop --layout bsp
ctrl + alt - s : chunkc tiling::desktop --layout monocle
ctrl + alt - d : chunkc tiling::desktop --layout float
ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment