From 693aa2dfaaaa4231744f761752758b5f1bbd9b23 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 25 Jun 2013 16:00:26 -0700 Subject: [PATCH] Adding slate config from mitchellh and modifications --- .slate | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .slate diff --git a/.slate b/.slate new file mode 100644 index 0000000..7fe910c --- /dev/null +++ b/.slate @@ -0,0 +1,92 @@ +# 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 w,shift,cmd + +# 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 space:cmd,ctrl ${full} +bind h:cmd,ctrl ${left-half} +bind l:cmd,ctrl ${right-half} +bind j:cmd,ctrl ${bot-half} +bind k:cmd,ctrl ${top-half} +bind y:cmd,ctrl ${top-left-corner} +bind u:cmd,ctrl ${top-right-corner} +bind b:cmd,ctrl ${bot-left-corner} +bind n:cmd,ctrl ${bot-right-corner} + +# 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