Skip to content

Instantly share code, notes, and snippets.

@pbt001
Forked from dslaw/.skhdrc
Last active January 15, 2019 10:15
Show Gist options
  • Save pbt001/3494c9d3a72a0ab912ed7ef5e7bc0b49 to your computer and use it in GitHub Desktop.
Save pbt001/3494c9d3a72a0ab912ed7ef5e7bc0b49 to your computer and use it in GitHub Desktop.
[Setup for macOS] #cfg
#!/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
chunkc core::unload tiling.so
chunkc core::unload ffm.so
chunkc core::unload border.so
#
# NOTE: the following are config variables for the chunkwm-tiling plugin.
#
chunkc set global_desktop_mode bsp
#chunkc set 2_desktop_mode monocle
#chunkc set 5_desktop_mode float
chunkc set global_desktop_offset_top 10
chunkc set global_desktop_offset_bottom 10
chunkc set global_desktop_offset_left 10
chunkc set global_desktop_offset_right 10
chunkc set global_desktop_offset_gap 10
chunkc set desktop_padding_step_size 10.0
chunkc set desktop_gap_step_size 5.0
chunkc set bsp_spawn_left 0
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 all
chunkc set mouse_follows_focus 1
chunkc set window_float_next 0
chunkc set window_float_center 1
chunkc set window_region_locked 1
chunkc set mouse_modifier fn
chunkc set preselect_border_color 0xffd75f5f
chunkc set preselect_border_width 2
chunkc set preselect_border_radius 0
chunkc set focused_border_color 0xff0f6288
chunkc set focused_border_width 2
chunkc set focused_border_radius 2
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
# open terminal
cmd - return : osascript -e 'tell application "iTerm" to create window with default profile'
# enter fullscreen mode for the focused container
#cmd - f : chunkc tiling::window --toggle fullscreen
# cmd + f clobbers text search in firefox.
shift + cmd - f : chunkc tiling::window --toggle fullscreen
# change focus between tiling / floating windows
#shift + alt - space : chunkc tiling::window --toggle float
# change layout of desktop
cmd - e : chunkc tiling::desktop --layout bsp
cmd - s : chunkc tiling::desktop --layout monocle
# kill focused window
shift + cmd - q : chunkc tiling::window --close
# change focus
cmd - j : chunkc tiling::window --focus west
cmd - l : chunkc tiling::window --focus south
cmd - k : chunkc tiling::window --focus north
cmd - 0x29 : chunkc tiling::window --focus east
#alt - p : chunkc tiling::window --focus prev
#alt - n : chunkc tiling::window --focus next
# move focused window
shift + cmd - j : chunkc tiling::window --warp west
shift + cmd - l : chunkc tiling::window --warp south
shift + cmd - k : chunkc tiling::window --warp north
shift + cmd - 0x29 : chunkc tiling::window --warp east
cmd - r : chunkc tiling::desktop --rotate 90
# 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 + cmd - 1 : chunkc tiling::window --send-to-desktop 1
shift + cmd - 2 : chunkc tiling::window --send-to-desktop 2
shift + cmd - 3 : chunkc tiling::window --send-to-desktop 3
shift + cmd - 4 : chunkc tiling::window --send-to-desktop 4
shift + cmd - 6 : chunkc tiling::window --send-to-desktop 6
shift + cmd - 7 : chunkc tiling::window --send-to-desktop 7
shift + cmd - 0 : chunkc tiling::window --send-to-desktop 5
  1. Create workspaces via Mission Control
  • Activate Mission Control (swipe three fingers on track pad up)
  • Add workspaces via the plus sign (hover mouse over RHS to bring it up)
  1. Add keyboard shortcuts to switch to created workspaces
  • System Preferences -> Keyboard -> Mission Control
  • Check the box next to relevant boxes. The shortcut can be edited by double clicking on it
  1. Remap Caps Lock to Escape when pressed and Control when held
  • Using Karabiner-Elements
  • There's a guide on the internet somewhere
  1. Remap Option to CMD
  • Using Karabiner-Elements
  • Add a simple rule to map left_option to left_command
  • As option is in the place where super (Mod4) is, this maps to a "windows keyboard" better
  1. Install chunkwm and skhd
  • Using left CMD/Option as super
  • No idea what alt maps to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment