From 57577be6d5585ac11d8ecf786e848441e77da3e9 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Wed, 3 Feb 2016 18:04:51 -0800 Subject: [PATCH] hammerspoon tilin', rvm fixin' --- bash-files/bash_profile | 2 ++ bash-files/bashrc | 2 ++ mac-files/.hammerspoon/hs/tiling | 1 + mac-files/.hammerspoon/init.lua | 18 +++++++++++++++++- zsh-files/zshrc | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 160000 mac-files/.hammerspoon/hs/tiling diff --git a/bash-files/bash_profile b/bash-files/bash_profile index 2f98d77..76af7e3 100644 --- a/bash-files/bash_profile +++ b/bash-files/bash_profile @@ -1,3 +1,5 @@ if [ -L ~/.bashrc ] || [ -f ~/.bashrc ]; then source ~/.bashrc; fi + +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* diff --git a/bash-files/bashrc b/bash-files/bashrc index 71d68e2..6b02ef5 100644 --- a/bash-files/bashrc +++ b/bash-files/bashrc @@ -102,3 +102,5 @@ prompt_func() { PS1=$PS1"> " } PROMPT_COMMAND=prompt_func + +export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting diff --git a/mac-files/.hammerspoon/hs/tiling b/mac-files/.hammerspoon/hs/tiling new file mode 160000 index 0000000..7609ad7 --- /dev/null +++ b/mac-files/.hammerspoon/hs/tiling @@ -0,0 +1 @@ +Subproject commit 7609ad7802e24e453088aecf984126f6d5d6a593 diff --git a/mac-files/.hammerspoon/init.lua b/mac-files/.hammerspoon/init.lua index 558175c..5eb2b0b 100644 --- a/mac-files/.hammerspoon/init.lua +++ b/mac-files/.hammerspoon/init.lua @@ -1,11 +1,27 @@ --------------------------------------------- +----------------------------------------------- -- Set up ----------------------------------------------- +local tiling = require "hs.tiling" +local hotkey = require "hs.hotkey" local hyper = {"shift", "cmd", "alt", "ctrl"} +local mash = {"ctrl", "cmd"} hs.window.animationDuration = 0 + +----------------------------------------------- +-- auto-tile commands +----------------------------------------------- + +hotkey.bind(mash, "j", function() tiling.cycle(1) end) +hotkey.bind(mash, "k", function() tiling.cycle(-1) end) +hotkey.bind(mash, "space", function() tiling.promote() end) +hotkey.bind(mash, "f", function() tiling.goToLayout("fullscreen") end) +hotkey.bind(mash, "f", function() tiling.goToLayout("fullscreen") end) +hotkey.bind(mash, "r", function() tiling.goToLayout("main-vertical") end) +hotkey.bind(mash, "c", function() tiling.goToLayout("columns") end) + ----------------------------------------------- -- hyper d for left one half window ----------------------------------------------- diff --git a/zsh-files/zshrc b/zsh-files/zshrc index 03b1402..ab6ea64 100644 --- a/zsh-files/zshrc +++ b/zsh-files/zshrc @@ -36,3 +36,5 @@ eval "$(direnv hook zsh)" # load RVM if it exists [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" + +export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting