108 lines
3.7 KiB
Text
108 lines
3.7 KiB
Text
# Configuration options
|
|
config keyboardLayout dvorak
|
|
config defaultToCurrentScreen true
|
|
config modalEscapeKey esc
|
|
config nudgePercentOf screenSize
|
|
config resizePercentOf screenSize
|
|
config windowHintsShowIcons true
|
|
config windowHintsIgnoreHiddenWindows false
|
|
config windowHintsSpread true
|
|
config windowHintsSpreadSearchWidth 200
|
|
config windowHintsSpreadSearchHeight 200
|
|
|
|
#--------------------------------------------------------------------
|
|
# Aliases
|
|
#--------------------------------------------------------------------
|
|
# Modal key
|
|
alias modal-key cmd,space
|
|
|
|
# Some apps
|
|
alias app-browser 'Google Chrome'
|
|
alias app-editor 'MacVim'
|
|
alias app-irc 'Textual'
|
|
alias app-music 'Spotify'
|
|
alias app-terminal 'iTerm'
|
|
|
|
# Easy helpers for long variable names...
|
|
alias sox screenOriginX
|
|
alias soy screenOriginY
|
|
alias ssx screenSizeX
|
|
alias ssy screenSizeY
|
|
|
|
# Positioning aliases
|
|
alias full move ${sox};${soy} ${ssx};${ssy}
|
|
alias left-half move ${sox};${soy} ${ssx}/2+1;${ssy}
|
|
alias right-half move ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}
|
|
alias top-half move ${sox};${soy} ${ssx};${ssy}/2
|
|
alias bot-half move ${sox};${soy}+${ssy}/2 ${ssx};${ssy}/2
|
|
alias top-left-corner move ${sox};${soy} ${ssx}/2;${ssy}/2
|
|
alias top-right-corner move ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}/2
|
|
alias bot-left-corner move ${sox};${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
|
|
alias bot-right-corner move ${sox}+${ssx}/2;${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
|
|
|
|
#--------------------------------------------------------------------
|
|
# Layouts
|
|
#--------------------------------------------------------------------
|
|
# This layout is used with one screen
|
|
layout 1coding 'Google Chrome':REPEAT ${full}
|
|
layout 1coding 'iTerm':REPEAT ${full}
|
|
layout 1coding 'MacVim':REPEAT ${full}
|
|
layout 1coding 'Spotify':REPEAT ${full}
|
|
layout 1coding 'Textual':REPEAT move ${sox}+550;${soy}+75 800;575
|
|
layout 1coding 'Tweetbot' move ${ssx}-480-40;${soy} 480;${ssy}
|
|
|
|
# This layout is used with two screens
|
|
layout 2coding 'Google Chrome':REPEAT move ${sox}+387;${soy}+100 1800;1200 0
|
|
layout 2coding 'iTerm':REPEAT ${full} 0
|
|
layout 2coding 'MacVim':REPEAT ${full} 0
|
|
layout 2coding 'Spotify':REPEAT ${full} 1
|
|
layout 2coding 'Textual':REPEAT move ${sox}+1200;${soy}+20 800;575 0
|
|
layout 2coding 'Tweetbot' move ${ssx}-480-40;${soy}+20 480;1000 0
|
|
|
|
#--------------------------------------------------------------------
|
|
# Bindings
|
|
#--------------------------------------------------------------------
|
|
# Activate layouts, this is all done via modal-keys
|
|
bind 1:${modal-key} sequence layout 1coding
|
|
bind 2:${modal-key} sequence layout 2coding
|
|
|
|
# Focus windows in certain directions
|
|
bind h:cmd,alt focus left
|
|
bind l:cmd,alt focus right
|
|
bind j:cmd,alt focus down
|
|
bind k:cmd,alt focus up
|
|
|
|
# Move windows to certain locations on the screen
|
|
bind f:${modal-key}:toggle ${full}
|
|
bind h:${modal-key}:toggle ${left-half}
|
|
bind l:${modal-key}:toggle ${right-half}
|
|
bind j:${modal-key}:toggle ${bot-half}
|
|
bind k:${modal-key}:toggle ${top-half}
|
|
bind y:${modal-key}:toggle ${top-left-corner}
|
|
bind u:${modal-key}:toggle ${top-right-corner}
|
|
bind b:${modal-key}:toggle ${bot-left-corner}
|
|
bind n:${modal-key}:toggle ${bot-right-corner}
|
|
|
|
# Resize Bindings
|
|
bind right:alt resize +8% +0
|
|
bind left:alt resize -8% +0
|
|
bind up:alt resize +0 -8%
|
|
bind down:alt resize +0 +8%
|
|
bind right:ctrl;alt resize -8% +0 bottom-right
|
|
bind left:ctrl;alt resize +8% +0 bottom-right
|
|
bind up:ctrl;alt resize +0 +8% bottom-right
|
|
bind down:ctrl;alt resize +0 -8% bottom-right
|
|
|
|
# Nudge Bindings
|
|
bind right:shift;alt nudge +8% +0
|
|
bind left:shift;alt nudge -8% +0
|
|
bind up:shift;alt nudge +0 -8%
|
|
bind down:shift;alt nudge +0 +8%
|
|
|
|
# Focus helpers
|
|
bind b:e,cmd focus ${app-browser}
|
|
bind e:e,cmd focus ${app-editor}
|
|
bind i:e,cmd focus ${app-irc}
|
|
bind m:e,cmd focus ${app-music}
|
|
bind t:e,cmd focus ${app-terminal}
|
|
bind /:e,cmd hint
|