Add hammerspoon role

This commit is contained in:
Kenneth Benzie 2025-11-06 20:56:06 +00:00
parent 7823cfb683
commit 98ef24cff8
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,18 @@
---
- set_fact:
config_dir: '{{ansible_env.HOME}}/.hammerspoon'
- name: create config directory
file:
state: directory
path: '{{config_dir}}'
- name: install config file
template:
src: init.lua
dest: '{{config_dir}}/init.lua'
- name: install homebrew package
homebrew:
state: latest
name: hammerspoon

View File

@ -0,0 +1,15 @@
hs.hotkey.bind({'alt', 'cmd'}, 'F', function()
hs.application.launchOrFocus('Ferdium')
end)
hs.hotkey.bind({'alt', 'cmd'}, 'B', function()
hs.application.launchOrFocus('Firefox')
end)
hs.hotkey.bind({'alt', 'cmd'}, 'T', function()
hs.application.launchOrFocus('kitty')
end)
pcall(function()
require('local')
end)