Update to kwm and khd, ditch seil/karabiner
parent
5b02eb6a6c
commit
09d10a5047
@ -0,0 +1,91 @@
|
||||
# a short keypress on the left ctrl is esc
|
||||
khd mod_trigger_timeout 0.2
|
||||
lctrl: khd -p "0x35"
|
||||
|
||||
# enable kwm compatibility mode
|
||||
khd kwm on
|
||||
|
||||
# shortcuts for moving focus with kwmc
|
||||
ctrl+cmd - h: kwmc window -f west
|
||||
ctrl+cmd - l: kwmc window -f east
|
||||
ctrl+cmd - j: kwmc window -f south
|
||||
ctrl+cmd - k: kwmc window -f north
|
||||
|
||||
# use [ and ] to switch focus of displays with kwmc
|
||||
ctrl+cmd - 0x21: kwmc display -f 0
|
||||
ctrl+cmd - 0x1E: kwmc display -f 1
|
||||
|
||||
# moving windows around with kwmc
|
||||
ralt - h: kwmc window -s west
|
||||
ralt - j: kwmc window -s south
|
||||
ralt - k: kwmc window -s north
|
||||
ralt - l: kwmc window -s east
|
||||
ralt - 0x21: kwmc window -m display 0
|
||||
ralt - 0x1E: kwmc window -m display 1
|
||||
|
||||
# rotate and fullscreen and switch modes
|
||||
ralt - f: kwmc window -z fullscreen
|
||||
ralt - r: kwmc tree rotate 90
|
||||
ralt - 1: kwmc space -t bsp
|
||||
ralt - 2: kwmc space -t monocle
|
||||
ralt - 3: kwmc space -t float
|
||||
|
||||
# set border color for different modes
|
||||
khd mode resizer color 0xffde935f
|
||||
khd mode vimmode color 0xffa54242
|
||||
khd mode launcher color 0xff5e8d87
|
||||
|
||||
# toggle between modes
|
||||
ralt - a: khd -e "mode activate resizer"; kwmc config border focused on;
|
||||
ralt - s: khd -e "mode activate vimmode"; kwmc config border focused on;
|
||||
ralt - x: khd -e "mode activate launcher"; kwmc config border focused on;
|
||||
resizer + ralt - a: khd -e "mode activate default"; kwmc config border focused off;
|
||||
vimmode + ralt - s: khd -e "mode activate default"; kwmc config border focused off;
|
||||
launcher + ralt - x: khd -e "mode activate default"; kwmc config border focused off;
|
||||
|
||||
# resizer mode
|
||||
resizer - 1: kwmc window -c type bsp
|
||||
resizer - 2: kwmc window -c type monocle
|
||||
resizer - 3: kwmc window -c type float
|
||||
resizer - h: kwmc window -c expand 0.02 west
|
||||
resizer - l: kwmc window -c expand 0.02 east
|
||||
resizer - j: kwmc window -c expand 0.02 south
|
||||
resizer - k: kwmc window -c expand 0.02 north
|
||||
resizer - a: kwmc window -c reduce 0.02 east
|
||||
resizer - d: kwmc window -c reduce 0.02 west
|
||||
resizer - w: kwmc window -c reduce 0.02 south
|
||||
resizer - s: kwmc window -c reduce 0.02 north
|
||||
resizer - p: kwmc window -z parent
|
||||
resizer - f: kwmc window -t focused
|
||||
resizer - t: kwmc window -c split-mode toggle
|
||||
resizer - 0x35: khd -e "mode activate default"; kwmc config border focused off;
|
||||
|
||||
# basic vim movements + commands
|
||||
vimmode - h: khd -p "- left"
|
||||
vimmode - l: khd -p "- right"
|
||||
vimmode - j: khd -p "- down"
|
||||
vimmode - k: khd -p "- up"
|
||||
vimmode - b: khd -p "lalt - left"
|
||||
vimmode - w: khd -p "lalt - right"
|
||||
vimmode+shift - 6: khd -p "cmd - left"
|
||||
vimmode+shift - 4: khd -p "cmd - right"
|
||||
vimmode - g: khd -p "alt - up"
|
||||
vimmode+shift - g: khd -p "alt - down"
|
||||
vimmode - x: khd -p "cmd - w"
|
||||
vimmode - q: khd -p "cmd - q"
|
||||
vimmode - 0x35: khd -e "mode activate default"; kwmc config border focused off;
|
||||
|
||||
# basic launcher shortcuts
|
||||
launcher - q: khd -p "cmd - q"
|
||||
launcher - x: open -a /Applications/Firefox.app
|
||||
launcher - g: open -a /Applications/Google\ Chrome.app
|
||||
launcher - m: open -a /Applications/Mail.app
|
||||
launcher - 1: open -a /Applications/1Password.app
|
||||
launcher - d: open -a /Applications/Dash.app
|
||||
launcher - f: open -a /Applications/ForkLift.app
|
||||
launcher - v: open -a /Applications/MacVim.app
|
||||
launcher - i: open -a /Applications/iTunes.app
|
||||
launcher - t: open -a /Applications/Utilities/Terminal.app
|
||||
launcher - h: open -a /Applications/Hyper.app
|
||||
launcher - space: open -a /Applications/Hyper.app
|
||||
launcher - 0x35: khd -e "mode activate default"; kwmc config border focused off;
|
@ -1,42 +0,0 @@
|
||||
// global hyper shortcut
|
||||
define HYPER ctrl+cmd+alt+shift
|
||||
|
||||
// Activate prefix mode
|
||||
kwmc bindsym HYPER-a mode activate prefix
|
||||
|
||||
// hyper key bindings with prefix mode for less used commands
|
||||
kwmc bindsym prefix-1 window -c type bsp
|
||||
kwmc bindsym prefix-2 window -c type float
|
||||
kwmc bindsym prefix-h window -c reduce 0.02 east
|
||||
kwmc bindsym prefix-l window -c expand 0.02 east
|
||||
kwmc bindsym prefix-j window -c expand 0.02 south
|
||||
kwmc bindsym prefix-k window -c reduce 0.02 south
|
||||
kwmc bindsym prefix-p window -z parent
|
||||
kwmc bindsym prefix-f window -t focused
|
||||
kwmc bindsym prefix-s window -c split-mode toggle
|
||||
|
||||
// moving around with cmd+ctrl
|
||||
kwmc bindsym cmd+ctrl-h window -f west
|
||||
kwmc bindsym cmd+ctrl-l window -f east
|
||||
kwmc bindsym cmd+ctrl-j window -f south
|
||||
kwmc bindsym cmd+ctrl-k window -f north
|
||||
kwmc bindsym cmd+ctrl-[ display -f 0
|
||||
kwmc bindsym cmd+ctrl-] display -f 1
|
||||
|
||||
// hyper key bindings for fullscreen, displays etc.
|
||||
kwmc bindsym HYPER-h window -s west
|
||||
kwmc bindsym HYPER-j window -s south
|
||||
kwmc bindsym HYPER-k window -s north
|
||||
kwmc bindsym HYPER-l window -s east
|
||||
kwmc bindsym HYPER-[ window -m display 0
|
||||
kwmc bindsym HYPER-] window -m display 1
|
||||
|
||||
// rotate and fullscreen
|
||||
kwmc bindsym HYPER-f window -z fullscreen
|
||||
kwmc bindsym HYPER-r tree rotate 90
|
||||
|
||||
// tiling modes
|
||||
kwmc bindsym HYPER-1 space -t bsp
|
||||
kwmc bindsym HYPER-2 space -t monocle
|
||||
kwmc bindsym HYPER-3 space -t float
|
||||
|
@ -1,41 +1,60 @@
|
||||
// define global vars
|
||||
define PADDING 3
|
||||
|
||||
// default tiling is bsp
|
||||
kwmc config tiling bsp
|
||||
# default config
|
||||
kwmc config optimal-ratio 1.618
|
||||
kwmc config spawn right
|
||||
kwmc config float-non-resizable on
|
||||
kwmc config lock-to-container on
|
||||
kwmc config focus-follows-mouse off
|
||||
kwmc config standby-on-float off
|
||||
kwmc config center-on-float on
|
||||
kwmc config cycle-focus on
|
||||
kwmc config mouse-follows-focus on
|
||||
kwmc config mouse-drag off
|
||||
kwmc config mouse-drag mod ctrl+cmd+alt+shift
|
||||
kwmc config hotkeys on
|
||||
kwmc config split-ratio 0.5
|
||||
|
||||
// default style
|
||||
kwmc config padding PADDING PADDING PADDING PADDING
|
||||
kwmc config gap PADDING PADDING
|
||||
kwmc config border focused on
|
||||
# no border, use hazeover instead
|
||||
kwmc config border focused off
|
||||
kwmc config border focused size 2
|
||||
kwmc config border focused color 0xFF5E8D87
|
||||
kwmc config border focused radius 6
|
||||
|
||||
kwmc config hotkeys on
|
||||
kwmc config cycle-focus on
|
||||
kwmc config focus-follows-mouse on
|
||||
kwmc config mouse-follows-focus on
|
||||
kwmc config float-non-resizable on
|
||||
kwmc config lock-to-container on
|
||||
kwmc config standby-on-float on
|
||||
kwmc config mouse-drag off
|
||||
# default is bsp with a padding of 6
|
||||
kwmc config tiling bsp
|
||||
kwmc config padding 2 2 2 2
|
||||
kwmc config gap 2 2
|
||||
|
||||
// override if there are two displays, smaller one monocle always
|
||||
# override displays, if there are two
|
||||
kwmc config display 0 mode bsp
|
||||
kwmc config display 0 float-dim 1200 800
|
||||
kwmc config display 1 mode monocle
|
||||
kwmc config display 1 float-dim 1200 800
|
||||
|
||||
// Enable the prefix mode
|
||||
kwmc mode prefix prefix on
|
||||
kwmc mode prefix timeout 1
|
||||
kwmc mode prefix restore default
|
||||
kwmc mode prefix color 0xFFA54242
|
||||
# add rules to apps that dont have tileable state by default
|
||||
# kwmc rule owner="iTerm2" properties={role="AXDialog"}
|
||||
|
||||
# blacklist applications from kwms tiling
|
||||
kwmc rule owner="1Password" properties={float="true"}
|
||||
kwmc rule owner="CleanMyMac 3" properties={float="true"}
|
||||
kwmc rule owner="Finder" properties={float="true"}
|
||||
kwmc rule owner="Harvest" properties={float="true"}
|
||||
kwmc rule owner="System Preferences" properties={float="true"}
|
||||
kwmc rule owner="TogglDesktop" properties={float="true"}
|
||||
kwmc rule owner="VOX" properties={float="true"}
|
||||
|
||||
# those apps should always be on the main display
|
||||
kwmc rule owner="Firefox" properties={display="0"}
|
||||
kwmc rule owner="Google Chrome" properties={display="0"}
|
||||
kwmc rule owner="HyperTerm" properties={display="0"}
|
||||
kwmc rule owner="MacVim" properties={display="0"}
|
||||
kwmc rule owner="Safari" properties={display="0"}
|
||||
kwmc rule owner="Terminal" properties={display="0"}
|
||||
|
||||
// include binds, space and other config + rules
|
||||
include rules
|
||||
include binds
|
||||
# and those should be on the secondary display
|
||||
kwmc rule owner="Calendar" properties={display="1"}
|
||||
kwmc rule owner="Dash" properties={display="1"}
|
||||
kwmc rule owner="ForkLift" properties={display="1"}
|
||||
kwmc rule owner="Mail" properties={display="1"}
|
||||
kwmc rule owner="Messages" properties={display="1"}
|
||||
kwmc rule owner="Skype" properties={display="1"}
|
||||
kwmc rule owner="Slack" properties={display="1"}
|
||||
kwmc rule owner="Telegram" properties={display="1"}
|
||||
|
@ -1,28 +0,0 @@
|
||||
// add rules to apps that dont have tileable state by default
|
||||
// kwmc rule owner="iTerm2" properties={role="AXDialog"}
|
||||
|
||||
// The following commands create rules that blacklists an application from Kwms tiling
|
||||
kwmc rule owner="1Password" properties={float="true"}
|
||||
kwmc rule owner="CleanMyMac 3" properties={float="true"}
|
||||
kwmc rule owner="Finder" properties={float="true"}
|
||||
kwmc rule owner="Harvest" properties={float="true"}
|
||||
kwmc rule owner="System Preferences" properties={float="true"}
|
||||
kwmc rule owner="TogglDesktop" properties={float="true"}
|
||||
kwmc rule owner="VOX" properties={float="true"}
|
||||
|
||||
// The following command creates a rule that captures an application to the given screen, if the screen exists.
|
||||
kwmc rule owner="Firefox" properties={display="0"}
|
||||
kwmc rule owner="Google Chrome" properties={display="0"}
|
||||
kwmc rule owner="HyperTerm" properties={display="0"}
|
||||
kwmc rule owner="MacVim" properties={display="0"}
|
||||
kwmc rule owner="Safari" properties={display="0"}
|
||||
kwmc rule owner="Terminal" properties={display="0"}
|
||||
|
||||
kwmc rule owner="Calendar" properties={display="1"}
|
||||
kwmc rule owner="Dash" properties={display="1"}
|
||||
kwmc rule owner="ForkLift" properties={display="1"}
|
||||
kwmc rule owner="Mail" properties={display="1"}
|
||||
kwmc rule owner="Messages" properties={display="1"}
|
||||
kwmc rule owner="Skype" properties={display="1"}
|
||||
kwmc rule owner="Slack" properties={display="1"}
|
||||
kwmc rule owner="Telegram" properties={display="1"}
|
Loading…
Reference in New Issue