Enable xremap on Debian/Ubuntu
This commit is contained in:
parent
cba3f6ce2a
commit
afa680c4d1
@ -5,4 +5,9 @@
|
||||
roles:
|
||||
- role: kitty
|
||||
- role: xremap
|
||||
when: ansible_os_family == "RedHat"
|
||||
when: >
|
||||
'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and
|
||||
ansible_env.XDG_SESSION_TYPE == 'wayland' and (
|
||||
ansible_os_family == "RedHat" or
|
||||
ansible_os_family == "Debian"
|
||||
)
|
||||
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_env.XDG_CURRENT_DESKTOP == "GNOME" and
|
||||
ansible_env.XDG_SESSION_TYPE == "wayland"
|
||||
that: >
|
||||
'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and
|
||||
ansible_env.XDG_SESSION_TYPE == 'wayland'
|
||||
|
||||
- set_fact:
|
||||
install_dir: '{{ansible_env.HOME}}/.local/bin'
|
||||
@ -35,12 +36,14 @@
|
||||
set_fact:
|
||||
needs_installed:
|
||||
'{{not executable.stat.exists or installed_version != latest.json.name}}'
|
||||
xdg_current_desktop:
|
||||
"{{ansible_env.XDG_CURRENT_DESKTOP | regex_replace('(.*:)?(.*)', '\\2')}}"
|
||||
|
||||
- name: construct asset query
|
||||
set_fact:
|
||||
asset_query: >
|
||||
[?contains(name, `xremap-linux-{{ansible_architecture}}-{{
|
||||
ansible_env.XDG_CURRENT_DESKTOP | lower}}.zip`)] | [0]
|
||||
xdg_current_desktop | lower}}.zip`)] | [0]
|
||||
- name: get release asset
|
||||
set_fact:
|
||||
asset: '{{latest.json.assets | to_json | from_json | json_query(asset_query)}}'
|
||||
@ -81,6 +84,14 @@
|
||||
append: true
|
||||
groups: input
|
||||
|
||||
- name: load the uinput kernel module
|
||||
when: ansible_os_family == 'Debian'
|
||||
become: true
|
||||
copy:
|
||||
content: |
|
||||
uinput
|
||||
dest: /etc/modules-load.d/uinput.conf
|
||||
|
||||
# TODO: This works for on Fedora, author uses it on Ubuntu so I assume Debian
|
||||
# will work too. Arch and other distros are potentially different see the docs
|
||||
# https://github.com/k0kubun/xremap
|
||||
|
Loading…
x
Reference in New Issue
Block a user