Add Linux configuration for global keybindings

This commit is contained in:
Scott Wallace 2019-03-02 16:47:59 +00:00
parent b64a2711b2
commit 2a9b241bda
2 changed files with 37 additions and 0 deletions

View file

@ -59,3 +59,29 @@
copy:
dest: '~/.config'
src: files/albert
- name: 'Gnome: Custom key bindings: Add'
tags:
- config
- keybindings
block:
- name: 'Gnome: Custom key bindings: Set facts'
set_fact:
customkbpath: '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings'
kblist: []
- name: 'Gnome: Custom key bindings: Build list'
set_fact:
kblist: "{{ kblist + [ ( customkbpath + '/custom' + index | string + '/' ) | to_json ] }}"
loop: "{{ gnome_custom_keybindings }}"
loop_control:
index_var: index
label: "{{ item.name }}"
- name: 'Gnome: Custom key bindings: Configure list'
command: "dconf write {{ customkbpath }} [{{ kblist | join(',') | quote }}]"
- include: includes/keybindings.yaml
loop: "{{ gnome_custom_keybindings }}"
loop_control:
index_var: index

View file

@ -63,3 +63,14 @@ gnome_extension_ids:
- 28 # gtile
- 1386 # notification counter
- 19 # user themes
gnome_custom_keybindings:
- name: 'Show clipboards in Albert'
binding: '<Primary><Alt>c'
command: >
'albert show \'pb \''
- name: 'Show CopyQ clipboards'
binding: '<Primary><Alt>x'
command: >
'copyq show'