Skip to content

Instantly share code, notes, and snippets.

@gkatev
Created August 12, 2023 02:23
Show Gist options
  • Save gkatev/099eaf87b309dcd427af3d70758c0e45 to your computer and use it in GitHub Desktop.
Save gkatev/099eaf87b309dcd427af3d70758c0e45 to your computer and use it in GitHub Desktop.
Pacman hook: Modify XKeyboard Map, restore Ctrl + Alt + Keypad Add/Sub, reserved by default for XF86_Next/Prev_VMode (contributions welcome)
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = xkeyboard-config
[Action]
Description = Restore Ctrl+Alt+KP_{Add,Subtract} (instead of XF86 VMode)
When = PostTransaction
Depends = sed
Exec = /usr/bin/sed -i.bak -r 's|(symbols\[Group1\]\s*=.*,\s*)XF86_Next_VMode(\s*\])|\1KP_Add\2|;s|(symbols\[Group1\]\s*=.*,\s*)XF86_Prev_VMode(\s*\])|\1KP_Subtract\2|' /usr/share/X11/xkb/symbols/keypad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment