Skip to content

Instantly share code, notes, and snippets.

@spadino
Created February 23, 2016 01:13
Show Gist options
  • Save spadino/fb18a51bb30d5315a716 to your computer and use it in GitHub Desktop.
Save spadino/fb18a51bb30d5315a716 to your computer and use it in GitHub Desktop.
KWM Golden Section setup
##################
# Golden Section #
##################
# Set default values for screen padding
kwmc config padding top 33
kwmc config padding bottom 10
kwmc config padding left 10
kwmc config padding right 10
# Set default values for container gaps
kwmc config gap vertical 10
kwmc config gap horizontal 10
# Allow Kwm to tile windows
kwmc config tiling enable
# Let Kwm listen for hotkeys
kwmc config hotkeys enable
# Set prefix for Kwms hotkeys
kwmc config prefix ctrl-x
# Prefix is not applied globally
kwmc config prefix-global disable
# Time in seconds, before prefix must be re-activated
kwmc config prefix-timeout 0.75
# Automatically float windows that fail to resize
kwmc config float-non-resizable enable
# Float a window if moved using the mouse
kwmc config dragndrop disable
##### Focus #####
kwmc config focus enable
kwmc config focus mouse-follows enable
kwmc config focus autoraise enable
# Set focus-follows-mouse-mode to autoraise
#kwmc config focus autoraise
# Focus-follows-mouse is temporarily disabled when
# a floating window has focus
#kwmc config focus standby-on-float enable
# The mouse will automatically move to the center
# of the focused window
#kwmc config focus mouse-follows enable
# Allow window focus to wrap-around
kwmc config cycle-focus screen # all | disabled
# Default tiling mode for new spaces
kwmc config space bsp
# Set default container split-ratio
kwmc config split-ratio 0.618
# New splits become the left leaf-node
kwmc config spawn left
# Add custom tiling rules for applications that
# does not get tiled by Kwm by default.
# This is because some applications do not have the
# AXWindowRole and AXStandardWindowSubRole
#kwmc config add-role AXDialog iTerm2
# The following command blacklists a specific application
# from Kwms tiling (PS: The app name is case-sensitive)
# If the name consist of multiple words, the command
# looks like: kwmc config float Google Chrome
#kwmc config float Steam
#kwmc config float Photoshop
# The following command captures an application to the
# given screen, if the screen exists. By doing this
# the application can no longer be moved to other screens
# kwmc config capture 1 iTunes
# Enable border for focused window
kwmc config focused-border disable
kwmc config focused-border size 2
kwmc config focused-border color FFBDD322
# Enable border for marked window
kwmc config marked-border enable
kwmc config marked-border size 2
kwmc config marked-border color FFCC5577
####### Custom Keybinds #######
# Quit Kwm
kwmc bind cmd+alt+ctrl-q quit
# Reload configuration
kwmc bind cmd+ctrl+alt-r config reload
# Switch windows
kwmc config cycle-focus all
kwmc bind cmd+ctrl+alt-left window -f prev
kwmc bind cmd+ctrl+alt-right window -f next
# Set the split mode
kwmc bind cmd+ctrl+alt-h screen -s horizontal
kwmc bind cmd+ctrl+alt-v screen -s vertical
kwmc bind cmd+ctrl+alt-o screen -s optimal
# Set Space Tiling Mode To BSP
kwmc bind cmd+ctrl-a space -t bsp
# Set Space Tiling Mode To Monocle
kwmc bind cmd+ctrl-s space -t monocle
# Set Space Tiling Mode To Floating
kwmc bind cmd+ctrl-d space -t float
# Rotate Window-Tree By 90* (Clockwise)
kwmc bind cmd+ctrl-r tree -r 90
#### Container Modifiers ####
#
# Modify Container
kwmc bind cmd+ctrl+alt-/ window -c split
kwmc bind cmd+ctrl+alt-, window -c reduce 0.05
kwmc bind cmd+ctrl+alt-. window -c expand 0.05
# Set Temporary Window Container
kwmc bind prefix-s window -t fullscreen
kwmc bind prefix-a window -t parent
kwmc bind cmd+ctrl+alt-space window -t parent
#### Window Movements ####
#
# Give Focus To Window
kwmc bind cmd+alt-left window -f west
kwmc bind cmd+alt-right window -f east
kwmc bind cmd+alt-down window -f south
kwmc bind cmd+alt-up window -f north
# Move Focused Window
kwmc bind ctrl+alt-left window -s west
kwmc bind ctrl+alt-down window -s south
kwmc bind ctrl+alt-up window -s north
kwmc bind ctrl+alt-right window -s east
# Detach Focused Window And Reinsert In Direction
kwmc bind ctrl+shift-up window -x north
kwmc bind ctrl+shift-right window -x east
kwmc bind ctrl+shift-down window -x south
kwmc bind ctrl+shift-left window -x west
##### Operations with marked windows #####
# Mark Window
kwmc bind cmd+ctrl-down mark -w focused
# Swap With Marked Window
kwmc bind cmd+ctrl-up window -s mark
# Detach Marked Window And Reinsert At Focused Window
kwmc bind cmd+ctrl+alt-down window -x mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment