Last active
June 3, 2020 04:29
-
-
Save dskindell/a36ed2a7bf9306634f16a2db87727555 to your computer and use it in GitHub Desktop.
OSX chunkwm/skhd configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# NOTE: any 'chunkc' command that is run from this config file | |
# that is NOT 'chunkc core::<..>' or 'chunkc set ..' | |
# MUST be put in the background using & | |
# | |
# e.g: | |
# chunkc tiling::rule --owner Finder --name Copy --state float & | |
# | |
# | |
# NOTE: specify the absolutepath of the file to use for logging. | |
# 'stdout' or 'stderr' can be used instead of an actual filepath. | |
# | |
chunkc core::log_file stdout | |
# | |
# NOTE: specify the desired level of logging. | |
# | |
# - none, debug, profile, warn, error | |
# | |
chunkc core::log_level warn | |
# | |
# NOTE: specify the absolutepath to the directory to use when loading a plugin. | |
# | |
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 0 | |
# | |
# NOTE: the following are config variables for the chunkwm-tiling plugin. | |
# | |
chunkc set custom_bar_enabled 0 | |
chunkc set custom_bar_all_monitors 0 | |
chunkc set custom_bar_offset_top 22 | |
chunkc set custom_bar_offset_bottom 0 | |
chunkc set custom_bar_offset_left 0 | |
chunkc set custom_bar_offset_right 0 | |
chunkc set global_desktop_mode bsp | |
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 | |
# | |
# NOTE: syntax for desktop-specific settings | |
# | |
# chunkc set 2_desktop_mode monocle | |
# chunkc set 5_desktop_mode float | |
# chunkc set 3_desktop_offset_top 190 | |
# chunkc set 3_desktop_offset_bottom 190 | |
# chunkc set 3_desktop_offset_left 190 | |
# chunkc set 3_desktop_offset_right 190 | |
# chunkc set 3_desktop_offset_gap 30 | |
# | |
chunkc set desktop_padding_step_size 10.0 | |
chunkc set desktop_gap_step_size 5.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 monitor_focus_cycle 1 | |
chunkc set window_focus_cycle monitor | |
chunkc set mouse_follows_focus intrinsic | |
chunkc set window_float_next 0 | |
chunkc set window_region_locked 1 | |
chunkc set mouse_move_window \"fn 1\" | |
chunkc set mouse_resize_window \"fn 2\" | |
chunkc set mouse_motion_interval 35 | |
chunkc set preselect_border_color 0xffd75f5f | |
chunkc set preselect_border_width 5 | |
chunkc set preselect_border_outline 0 | |
# | |
# 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.25 | |
chunkc set window_use_cgs_move 0 | |
# | |
# NOTE: the following are config variables for the chunkwm-border plugin. | |
# | |
# NOTE: syntax for `focused_border_outline` setting | |
# 0 = false, inline border | |
# 1 = true, outline border | |
# | |
chunkc set focused_border_color 0xff0f6288 | |
chunkc set focused_border_width 5 | |
chunkc set focused_border_radius 0 | |
chunkc set focused_border_outline 0 | |
chunkc set focused_border_skip_floating 0 | |
chunkc set focused_border_skip_monocle 0 | |
# | |
# NOTE: the following are config variables for the chunkwm-ffm plugin. | |
# | |
chunkc set ffm_bypass_modifier fn | |
chunkc set ffm_standby_on_float 1 | |
chunkc set ffm_disable_autoraise 0 | |
# | |
# NOTE: specify plugins to load when chunkwm starts. | |
# | |
chunkc core::load border.so | |
chunkc core::load tiling.so | |
chunkc core::load ffm.so | |
# | |
# NOTE: sample rules for the tiling plugin | |
# | |
chunkc tiling::rule --owner Finder --name Copy --state float & | |
chunkc tiling::rule --owner \"App Store\" --state float & | |
chunkc tiling::rule --owner Emacs --except "^$" --state tile & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# enter fullscreen mode for the focused container | |
alt - f : chunkc tiling::window --toggle fullscreen | |
# change focus between tiling / floating windows | |
shift + alt - space : chunkc tiling::window --toggle float | |
# change layout of desktop | |
alt - e : chunkc tiling::desktop --layout bsp | |
alt - s : chunkc tiling::desktop --layout monocle | |
shift + alt - f : chunkc tiling::desktop --layout float | |
# kill focused window | |
shift + alt - q : chunkc tiling::window --close | |
# change focus | |
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 | |
# (alt) change focus (using arrow keys) | |
alt - left : chunkc tiling::window --focus west | |
alt - down : chunkc tiling::window --focus south | |
alt - up : chunkc tiling::window --focus north | |
alt - right : chunkc tiling::window --focus east | |
alt - p : chunkc tiling::window --focus prev | |
alt - n : chunkc tiling::window --focus next | |
# move focused window | |
shift + alt - h : chunkc tiling::window --warp west | |
shift + alt - j : chunkc tiling::window --warp south | |
shift + alt - k : chunkc tiling::window --warp north | |
shift + alt - l : chunkc tiling::window --warp east | |
# (alt) move focused window (using arrow keys) | |
shift + alt - left : chunkc tiling::window --warp west | |
shift + alt - down : chunkc tiling::window --warp south | |
shift + alt - up : chunkc tiling::window --warp north | |
shift + alt - right : chunkc tiling::window --warp east | |
# rotate windows clockwise and counter-clockwise | |
alt - r : chunkc tiling::desktop --rotate 90 | |
shift + alt - r : chunkc tiling::desktop --rotate 270 | |
# rotate on X and Y Axis | |
shift + alt - x : chunkc tiling::desktop --mirror horizontal | |
shift + alt - y : chunkc tiling::desktop --mirror vertical | |
# focus monitor | |
cmd + alt - z : chunkc tiling::monitor -f prev | |
cmd + alt - c : chunkc tiling::monitor -f next | |
cmd + alt - 1 : chunkc tiling::monitor -f 1 | |
cmd + alt - 2 : chunkc tiling::monitor -f 2 | |
# move focused container to workspace | |
shift + alt - m : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop) | |
shift + alt - p : chunkc tiling::window --send-to-desktop prev | |
shift + alt - n : 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 | |
# send window to monitor and follow focus | |
shift + cmd - z : chunkc tiling::window --send-to-monitor prev; chunkc tiling::monitor -f prev | |
shift + cmd - c : chunkc tiling::window --send-to-monitor next; chunkc tiling::monitor -f next | |
shift + cmd - 1 : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1 | |
shift + cmd - 2 : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2 | |
shift + cmd - 3 : chunkc tiling::window --send-to-monitor 3; chunkc tiling::monitor -f 3 | |
# open iterm2 | |
cmd + alt - return : osascript -e 'tell application "iTerm2" to create window with default profile' | |
# Resize windows | |
lctrl + alt - h : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge west; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge east | |
lctrl + alt - left : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge west; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge east | |
lctrl + alt - j : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge south; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge north | |
lctrl + alt - down : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge south; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge north | |
lctrl + alt - k : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge north; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge south | |
lctrl + alt - up : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge north; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge south | |
lctrl + alt - l : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge east; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge west | |
lctrl + alt - right : \ | |
chunkc tiling::window --use-temporary-ratio 0.01 --adjust-window-edge east; \ | |
chunkc tiling::window --use-temporary-ratio -0.01 --adjust-window-edge west | |
# Float and center window | |
shift + alt - c : \ | |
if (("$(chunkc tiling::query --window float)" == 0)); then \ | |
chunkc tiling::window --toggle float; \ | |
chunkc tiling::window --grid-layout 6:6:1:1:4:4; \ | |
else \ | |
chunkc tiling::window --toggle float; \ | |
fi | |
# Equalize size of windows | |
lctrl + alt - 0 : chunkc tiling::desktop --equalize | |
# Enable / Disable gaps in current workspace | |
lctrl + alt - g : chunkc tiling::desktop --toggle offset | |
# restart Chunkwm | |
shift + lctrl + alt - r : \ | |
/usr/bin/env osascript <<< \ | |
"display notification \"Restarting Chunkwm\" with title \"Chunkwm\""; \ | |
brew services restart chunkwm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment