1
0
Fork 0

Install keyd for gpd pocket

and create umlaut shortcuts
This commit is contained in:
J. Elfring (g) 2024-11-08 14:50:56 +01:00
parent f3cc43d3df
commit 2e288fbf8c
4 changed files with 120 additions and 89 deletions

View file

@ -13,15 +13,5 @@ test -x ~/.screenlayout/.default && ~/.screenlayout/.default
test -x ~/.fehbg && ~/.fehbg
## Setup Keyboard
case $HOSTNAME in
*"gpd"*)
xmodmap -e 'keycode 49 = Multi_key' # Kanji-key
xmodmap -e 'keycode 132 = grave asciitilde' # grave-key
xmodmap -e 'keycode 29 = z Z z Z' # y-z
xmodmap -e 'keycode 52 = y Y y Y' # z-y
;;
*)
xmodmap -e 'keycode 135 = Multi_key' # remaps context-menu-key to Compose
;;
esac
xmodmap -e 'keycode 135 = Multi_key' # remaps context-menu-key to Compose

View file

@ -41,17 +41,6 @@
content: |
KEYMAP=de-latin1-nodeadkeys
- name: "Console settings (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/vconsole.conf
owner: root
group: root
mode: 0644
content: |
KEYMAP=de-latin1-nodeadkeys
FONT=latarcyrheb-sun32
- name: "Localization: Set papersize"
ansible.builtin.copy:
dest: /etc/papersize

View file

@ -249,52 +249,6 @@
group: root
mode: 0644
- name: "X11: Keyboard (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Intel Graphics (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/20-intel.conf
src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Monitor (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/30-display.conf
src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Touchscreen (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/99-touchscreen.conf
src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Xresources (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/X11/Xresources
src: ./lib/etc/X11/Xresources.gpdp2
owner: root
group: root
mode: 0644
## Notbook Specials
- name: "Install Notebook packages"
when: ansible_facts['form_factor'] == "Notebook"
@ -321,27 +275,6 @@
state: started
enabled: yes
## GPD Pocket Specials
- name: "GPD fan module"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/modules-load.d/gpd-pocket-fan.conf
owner: root
group: root
mode: 0644
content: |
gpd-pocket-fan
- name: "GPD fan module config"
when: "'gpd' in ansible_hostname"
ansible.builtin.copy:
dest: /etc/modprobe.d/gpd-pocket-fan.conf
owner: root
group: root
mode: 0644
content: |
options gpd-pocket-fan temp_limits=40000,40001,40002
- name: "Set Xbacklight permissions by udev"
ansible.builtin.copy:
dest: /etc/udev/rules.d/90-backlight.rules

View file

@ -0,0 +1,119 @@
- name: "Specials only for GPD Pocket 2"
hosts: localhost
connection: local
tasks:
- name: "Console settings (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/vconsole.conf
owner: root
group: root
mode: 0644
content: |
KEYMAP=us
FONT=latarcyrheb-sun32
- name: "Update pacman cache"
community.general.pacman:
update_cache: True
- name: "Install packages"
ansible.builtin.package:
name: '{{ item }}'
state: present
update_cache: False
with_items:
- keyd
- name: "Keyd config for gpdp2"
ansible.builtin.copy:
dest: /etc/keyd/defaul.conf
owner: root
group: root
mode: 0644
content: |
[ids]
*
[main]
y = z
z = y
` = compose
yen = `
[alt]
a = macro(compose " a)
u = macro(compose " u)
o = macro(compose " o)
s = macro(compose s s)
[alt+shift]
a = macro(compose " A)
u = macro(compose " U)
o = macro(compose " O)
# ẞ works w/o extra definition
- name: "Service: Keyd"
ansible.builtin.service:
name: keyd.service
state: started
enabled: yes
- name: "X11: Keyboard (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Intel Graphics (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/20-intel.conf
src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Monitor (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/30-display.conf
src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Touchscreen (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/99-touchscreen.conf
src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2
owner: root
group: root
mode: 0644
- name: "X11: Xresources (GPD Pocket 2)"
ansible.builtin.copy:
dest: /etc/X11/Xresources
src: ./lib/etc/X11/Xresources.gpdp2
owner: root
group: root
mode: 0644
- name: "GPD fan module"
ansible.builtin.copy:
dest: /etc/modules-load.d/gpd-pocket-fan.conf
owner: root
group: root
mode: 0644
content: |
gpd-pocket-fan
- name: "GPD fan module config"
ansible.builtin.copy:
dest: /etc/modprobe.d/gpd-pocket-fan.conf
owner: root
group: root
mode: 0644
content: |
options gpd-pocket-fan temp_limits=40000,40001,40002