mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
add interception tools and caps2esc
Existing users who use xmodmap to rebind caps lock as control in X will probably want to disable xmodmap first.
This commit is contained in:
parent
0be4efe09a
commit
461d842645
5 changed files with 36 additions and 0 deletions
|
|
@ -10,6 +10,12 @@ user:
|
|||
|
||||
hostname: nous
|
||||
|
||||
interception:
|
||||
caps2esc:
|
||||
enabled: True
|
||||
mode: 1
|
||||
delay: 20000
|
||||
|
||||
dotfiles:
|
||||
url: git@github.com:pigmonkey/dotfiles.git
|
||||
destination: projects/dotfiles
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
- { role: ssh, tags: ['ssh'] }
|
||||
- { role: dotfiles, tags: ['dotfiles'] }
|
||||
- { role: ssd, tags: ['ssd'] }
|
||||
- { role: interception, tags: ['interception'] }
|
||||
- { role: fonts, tags: ['fonts'] }
|
||||
- { role: x, tags: ['x'] }
|
||||
- { role: lightdm, tags: ['lightdm'], when: "display_manager == 'lightdm'" }
|
||||
|
|
|
|||
5
roles/interception/handlers/main.yml
Normal file
5
roles/interception/handlers/main.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart udevmon
|
||||
service:
|
||||
name: udevmon.service
|
||||
state: restarted
|
||||
20
roles/interception/tasks/main.yml
Normal file
20
roles/interception/tasks/main.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: Install caps2esc
|
||||
pacman:
|
||||
name: interception-caps2esc
|
||||
state: present
|
||||
|
||||
- name: Push caps2esc udevmon config
|
||||
template:
|
||||
src: caps2esc.yaml.j2
|
||||
dest: /etc/interception/udevmon.d/caps2esc.yaml
|
||||
notify:
|
||||
- restart udevmon
|
||||
when: interception.caps2esc.enabled is defined and interception.caps2esc.enabled == True
|
||||
|
||||
- name: Enable and start udevmon
|
||||
service:
|
||||
name: udevmon.service
|
||||
enabled: yes
|
||||
state: started
|
||||
when: interception.caps2esc.enabled is defined and interception.caps2esc.enabled == True
|
||||
4
roles/interception/templates/caps2esc.yaml.j2
Normal file
4
roles/interception/templates/caps2esc.yaml.j2
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
- JOB: "intercept -g $DEVNODE | caps2esc -m {{ interception.caps2esc.mode }} -t {{ interception.caps2esc.delay }} | uinput -d $DEVNODE"
|
||||
DEVICE:
|
||||
EVENTS:
|
||||
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
|
||||
Loading…
Add table
Add a link
Reference in a new issue