diff --git a/emacs/init.el b/emacs/init.el index afa6f8c..fc9266e 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -2,7 +2,7 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) -;; (package-refresh-contents) +(package-refresh-contents) (custom-set-variables ;; custom-set-variables was added by Custom. diff --git a/hammerspoon/init.lua b/hammerspoon/init.lua new file mode 100644 index 0000000..f845962 --- /dev/null +++ b/hammerspoon/init.lua @@ -0,0 +1,13 @@ +hs.loadSpoon("SpoonInstall") +spoon.SpoonInstall.use_syncinstall = true +spoon.SpoonInstall:andUse("WindowScreenLeftAndRight") +spoon.SpoonInstall:andUse("WindowHalfsAndThirds") +spoon.SpoonInstall:andUse("Commander") + +spoon.WindowScreenLeftAndRight:bindHotkeys(spoon.WindowScreenLeftAndRight.defaultHotkeys) + +spoon.WindowHalfsAndThirds:bindHotkeys(spoon.WindowHalfsAndThirds.defaultHotkeys) + +hs.hotkey.bind({"cmd", "alt", "ctrl"}, "SPACE", function () + spoon.Commander.show() +end) \ No newline at end of file diff --git a/playbooks/roles/macos/tasks/main.yml b/playbooks/roles/macos/tasks/main.yml index ece33e4..d51ac08 100644 --- a/playbooks/roles/macos/tasks/main.yml +++ b/playbooks/roles/macos/tasks/main.yml @@ -15,3 +15,28 @@ name: zsh install_options: with-gdbm with-pcre with-unicode9 +- name: Homebrew - Install Hammerspoon + homebrew_cask: + name: Hammerspoon + +- name: Hammerspoon - Create Directory + file: + path: ~/.hammerspoon/Spoons + state: directory + +- name: Hammerspoon - Symlink init.lua + file: + src: ~/.dotfiles/hammerspoon/init.lua + dest: ~/.hammerspoon/init.lua + state: link + +- name: Hammerspoon - Get SpoonInstall + get_url: + url: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpoonInstall.spoon.zip + dest: /tmp/SpoonInstall.spoon.zip + +- name: Hammerspoon - Unzip SpoonInstall + unarchive: + src: /tmp/SpoonInstall.spoon.zip + dest: ~/.hammerspoon/Spoons/ + creates: ~/.hammerspoon/Spoons/SpoonInstall.spoon