Add hammerspoon role
This commit is contained in:
parent
7823cfb683
commit
98ef24cff8
18
roles/hammerspoon/tasks/main.yaml
Normal file
18
roles/hammerspoon/tasks/main.yaml
Normal 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
|
||||
15
roles/hammerspoon/templates/init.lua
Normal file
15
roles/hammerspoon/templates/init.lua
Normal 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)
|
||||
Loading…
x
Reference in New Issue
Block a user