From 2ccc21f007f9459f6014397124cba730e8e62a26 Mon Sep 17 00:00:00 2001 From: Brandon Cornejo Date: Mon, 6 Nov 2017 10:01:39 -0600 Subject: [PATCH] Add KWM files for OSX --- khdrc | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ kwmrc | 57 +++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 khdrc create mode 100644 kwmrc diff --git a/khdrc b/khdrc new file mode 100644 index 0000000..5343445 --- /dev/null +++ b/khdrc @@ -0,0 +1,116 @@ +# enable kwm compatibility mode +khd kwm on + +# suppress unregistered keybinds outside default mode +# enabled by default! must be explicitly set to 'off' +khd void_unlisted_bind off + + +# set border color for different modes +khd mode default color 0xddd5c4a1 +khd mode switcher color 0xddbdd322 +khd mode swap color 0xdd458588 + + +# toggle between modes +ctrl - f : khd -e "mode activate switcher" +switcher + ctrl - f : khd -e "mode activate default" +swap + ctrl - f : khd -e "mode activate default" +ytd + ctrl - f : khd -e "mode activate default" +space + ctrl - f : khd -e "mode activate default" +tree + ctrl - f : khd -e "mode activate default" +info + ctrl -f : khd -e "mode activate default" + +switcher - a : khd -e "mode activate swap" +#switcher - w : khd -e "mode activate ytd" +#switcher - s : khd -e "mode activate space" +#switcher - d : khd -e "mode activate tree" +#switcher - q : khd -e "mode activate info" + + +### MINE +# i3 style +lalt - up : kwmc window -f north +lalt - right : kwmc window -f east +lalt - down : kwmc window -f south +lalt - left : kwmc window -f west + +# move window +lalt + shift - up : kwmc window -m north +lalt + shift - right : kwmc window -m east +lalt + shift - down : kwmc window -m south +lalt + shift - left : kwmc window -m west + +#Move windows between spaces +lalt + ctrl - right : kwmc window -m space right;\ + kwmc space -fExperimental right +lalt + ctrl - left : kwmc window -m space left;\ + kwmc space -fExperimental left + +# Toggle float mode for window +lalt + cmd - f : kwmc window -t focused + +# Toggle tiling modes +lalt + cmd - a : kwmc space -t bsp +lalt + cmd - s : kwmc space -t monocle +lalt + cmd - d : kwmc space -t float + +### /MINE + + +# switcher mode +switcher - r : khd -e "reload" # reload config + +switcher - h : kwmc window -f west +switcher - l : kwmc window -f east +switcher - j : kwmc window -f south +switcher - k : kwmc window -f north +switcher - n : kwmc window -fm prev +switcher - m : kwmc window -fm next + +switcher - 1 : kwmc space -fExperimental 1 +switcher - 2 : kwmc space -fExperimental 2 +switcher - 3 : kwmc space -fExperimental 3 +switcher - 4 : kwmc space -fExperimental 4 +switcher - 5 : kwmc space -fExperimental 5 +switcher - 6 : kwmc space -fExperimental 6 + +switcher - z : kwmc space -fExperimental left +switcher - c : kwmc space -fExperimental right +switcher - f : kwmc space -fExperimental previous + +switcher + shift - z : kwmc window -m space left;\ + kwmc space -fExperimental left + +switcher + shift - c : kwmc window -m space right;\ + kwmc space -fExperimental right + +switcher + shift - 1 : kwmc display -f 0 +switcher + shift - 2 : kwmc display -f 1 +switcher + shift - 3 : kwmc display -f 2 + +switcher - return : osascript ~/bin/iterm.scpt + + +# swap mode +swap - h : kwmc window -s west +swap - j : kwmc window -s south +swap - k : kwmc window -s north +swap - l : kwmc window -s east +swap - m : kwmc window -s mark + +swap + shift - k : kwmc window -m north +swap + shift - l : kwmc window -m east +swap + shift - j : kwmc window -m south +swap + shift - h : kwmc window -m west +swap + shift - m : kwmc window -m mark + +swap - 1 : kwmc window -m space 1 +swap - 2 : kwmc window -m space 2 +swap - 3 : kwmc window -m space 3 +swap - 4 : kwmc window -m space 4 +swap - 5 : kwmc window -m space 5 + +swap - z : kwmc window -m space left +swap - c : kwmc window -m space right + diff --git a/kwmrc b/kwmrc new file mode 100644 index 0000000..47e6160 --- /dev/null +++ b/kwmrc @@ -0,0 +1,57 @@ +# Set default values for screen padding +kwmc config padding 40 20 20 20 + +# Set default values for container gaps +kwmc config gap 15 15 + +# Default tiling mode for Kwm (bsp | monocle | float) +kwmc config tiling bsp + +# Automatically float windows that fail to resize +kwmc config float-non-resizable on + +# Automatically resize the window to its container +kwmc config lock-to-container on + +# Set focus-follows-mouse-mode to autoraise +kwmc config focus-follows-mouse off + +kwmc config standby-on-float on + +# Center window when made floating +kwmc config center-on-float on + +kwmc config mouse-follows-focus on + +kwmc config mouse-drag on + +# The modifier keys to be held down to initiate mouse-drag +kwmc config mouse-drag mod shift+ctrl + +# Allow window focus to wrap-around +kwmc config cycle-focus on + +# Set default container split-ratio +kwmc config split-ratio 0.5 + +# New splits become the left leaf-node +kwmc config spawn left + +kwmc rule owner="iTerm2" properties={role="AXDialog"} +kwms rule owner="Visual Studio" properties={role="AXGroup"} + +kwmc rule owner="Dialpad" properties={float="true"} +kwmc rule owner="DB Browser for SQLLite" properties={float="true"} + + +# Enable border for focused window +kwmc config border focused on +kwmc config border focused size 2 +kwmc config border focused color 0xFFBDD322 +kwmc config border focused radius 6 + +# Enable border for marked window +kwmc config border marked on +kwmc config border marked size 2 +kwmc config border marked color 0xFFCC5577 +kwmc config border marked radius 6