Add role xbindkeys
This commit is contained in:
parent
ce29550ccd
commit
9da74a23cd
5 changed files with 67 additions and 11 deletions
|
@ -3,3 +3,4 @@ dependencies:
|
||||||
- role: check-sudo
|
- role: check-sudo
|
||||||
- role: git
|
- role: git
|
||||||
- role: fonts
|
- role: fonts
|
||||||
|
- role: xbindkeys
|
||||||
|
|
|
@ -40,17 +40,6 @@ bindsym $super+Shift+y exec passmenu-url
|
||||||
bindsym $super+Shift+v exec vlc
|
bindsym $super+Shift+v exec vlc
|
||||||
bindsym $super+Shift+m exec i3-sensible-terminal -e neomutt
|
bindsym $super+Shift+m exec i3-sensible-terminal -e neomutt
|
||||||
|
|
||||||
#change volume
|
|
||||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-mute 0 false; exec pactl set-sink-volume 0 +5%
|
|
||||||
bindsym XF86AudioLowerVolume exec pactl set-sink-mute 0 false; exec pactl set-sink-volume 0 -5%
|
|
||||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
|
||||||
|
|
||||||
# music control
|
|
||||||
bindsym XF86AudioNext exec mpc next
|
|
||||||
bindsym XF86AudioPrev exec mpc prev
|
|
||||||
bindsym XF86AudioPlay exec mpc toggle
|
|
||||||
bindsym XF86AudioStop exec mpc stop
|
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $super+c kill
|
bindsym $super+c kill
|
||||||
bindsym $alt+F4 kill
|
bindsym $alt+F4 kill
|
||||||
|
|
39
roles/xbindkeys/files/xbindkeysrc
Normal file
39
roles/xbindkeys/files/xbindkeysrc
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# Raise volume
|
||||||
|
"pactl set-sink-mute 0 false; pactl set-sink-volume 0 +5%"
|
||||||
|
XF86AudioRaiseVolume
|
||||||
|
|
||||||
|
# Lower volume
|
||||||
|
"pactl set-sink-mute 0 false; pactl set-sink-volume 0 -5%"
|
||||||
|
XF86AudioLowerVolume
|
||||||
|
|
||||||
|
# Mute volume
|
||||||
|
"pactl set-sink-mute 0 toggle"
|
||||||
|
XF86AudioMute
|
||||||
|
|
||||||
|
# Mute microphone
|
||||||
|
"pactl set-source-mute 0 toggle"
|
||||||
|
XF86AudioMicMute
|
||||||
|
|
||||||
|
# Music next track
|
||||||
|
"mpc next"
|
||||||
|
XF86AudioNext
|
||||||
|
|
||||||
|
# Music previous track
|
||||||
|
"mpc prev"
|
||||||
|
XF86AudioPrev
|
||||||
|
|
||||||
|
# Music pause/play
|
||||||
|
"mpc toggle"
|
||||||
|
XF86AudioPlay
|
||||||
|
|
||||||
|
# Music stop
|
||||||
|
"mpc stop"
|
||||||
|
XF86AudioStop
|
||||||
|
|
||||||
|
# Raise brightness
|
||||||
|
"brightnessctl set +5%"
|
||||||
|
XF86MonBrightnessUp
|
||||||
|
|
||||||
|
# Lower brightness
|
||||||
|
"brightnessctl set 5%-"
|
||||||
|
XF86MonBrightnessDown
|
3
roles/xbindkeys/meta/main.yml
Normal file
3
roles/xbindkeys/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: check-sudo
|
24
roles/xbindkeys/tasks/main.yml
Normal file
24
roles/xbindkeys/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Install xbindkeys (Archlinux)
|
||||||
|
become: true
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- xbindkeys
|
||||||
|
- brightnessctl
|
||||||
|
- pulseaudio
|
||||||
|
when: ansible_facts['distribution'] == 'Archlinux'
|
||||||
|
|
||||||
|
- name: Install xbindkeys (Debian)
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- xbindkeys
|
||||||
|
- brightnessctl
|
||||||
|
- pulseaudio
|
||||||
|
when: ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
|
- name: Copy xbindkeys config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: xbindkeysrc
|
||||||
|
dest: ~/.xbindkeysrc
|
||||||
|
mode: 0644
|
Loading…
Add table
Reference in a new issue