From a5bcfbbcfa8ff129e73e9143502c2416b2307e8b Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sun, 14 Dec 2014 09:31:26 -0800 Subject: [PATCH] [meta] Add Hammerspoon config, move linked .gitignore --- .hammerspoon/init.lua | 18 ++++++++++++++++++ ansible/roles/dotfiles/tasks/dotfiles.yml | 4 ++-- ansible/roles/dotfiles/vars/main.yml | 3 ++- git/.gitignore => gitignore | 0 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .hammerspoon/init.lua rename git/.gitignore => gitignore (100%) diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua new file mode 100644 index 0000000..64bfc62 --- /dev/null +++ b/.hammerspoon/init.lua @@ -0,0 +1,18 @@ +hs.hotkey.bind({"cmd", "shift"}, "{", function() + current_app():selectMenuItem({"Window", "Select Previous Tab"}) +end) + +hs.hotkey.bind({"cmd", "shift"}, "}", function() + current_app():selectMenuItem({"Window", "Select Previous Tab"}) +end) + +function current_app() + return hs.window.application() +end + +function reload_config(files) + hs.reload() +end + +hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reload_config):start() +hs.alert.show("Config loaded") diff --git a/ansible/roles/dotfiles/tasks/dotfiles.yml b/ansible/roles/dotfiles/tasks/dotfiles.yml index 9a07c91..1f252e5 100644 --- a/ansible/roles/dotfiles/tasks/dotfiles.yml +++ b/ansible/roles/dotfiles/tasks/dotfiles.yml @@ -19,7 +19,7 @@ with_items: stow tags: stow - file: - src: "{{ ansible_env.HOME }}/.dotfiles/{{ item.key }}" - dest: "{{ ansible_env.HOME}}/{{ item.value }}" + src: ~/.dotfiles/{{ item.key }} + dest: "{{ item.value }}" state: link with_dict: ln diff --git a/ansible/roles/dotfiles/vars/main.yml b/ansible/roles/dotfiles/vars/main.yml index ee70ba5..d199c6a 100644 --- a/ansible/roles/dotfiles/vars/main.yml +++ b/ansible/roles/dotfiles/vars/main.yml @@ -6,4 +6,5 @@ stow: - tmux - vim ln: - git/.gitignore: .gitignore + gitignore: ~/.gitignore + .hammerspoon: ~/.hammerspoon diff --git a/git/.gitignore b/gitignore similarity index 100% rename from git/.gitignore rename to gitignore