From 834f127ef8d3952bfe0deaa2abc31075d0d45de4 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 9 May 2026 17:42:30 +0200 Subject: Add shortcut for fixing keyboard --- .config/dwm/config.h | 1 + .xinitrc | 3 +-- scripts/xkfix | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 scripts/xkfix diff --git a/.config/dwm/config.h b/.config/dwm/config.h index 9249699..4577f64 100644 --- a/.config/dwm/config.h +++ b/.config/dwm/config.h @@ -189,6 +189,7 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_v, spawn, SHCMD("popup-terminal pulsemixer") }, { MODKEY|ShiftMask, XK_b, spawn, SHCMD("popup-terminal bluetoothctl") }, { MODKEY|ShiftMask, XK_p, spawn, SHCMD("popup-terminal top") }, + { MODKEY, XK_space, spawn, SHCMD("xkfix") }, /* Multimedia */ { 0, XK_Print, spawn, SHCMD("dmenu-screenshot") }, diff --git a/.xinitrc b/.xinitrc index d460f09..dce9c8d 100644 --- a/.xinitrc +++ b/.xinitrc @@ -18,8 +18,7 @@ while true; do done & # Extra settings -setxkbmap -option compose:ralt -setxkbmap -option caps:swapescape +xkfix # From scripts brightnessctl set 30% xset s off -dpms xrdb -merge ~/.Xresources diff --git a/scripts/xkfix b/scripts/xkfix new file mode 100755 index 0000000..8697362 --- /dev/null +++ b/scripts/xkfix @@ -0,0 +1,7 @@ +#!/bin/sh + +# Swap Esc and Caps Lock and set compose key to Right Alt +# Requires: setxkbmap + +setxkbmap -option caps:swapescape +setxkbmap -option compose:ralt -- cgit v1.3