💾 Archived View for dots.omarpolo.com › bin › gamemode.gmi captured on 2024-08-24 at 23:42:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Switches the mice and keyboard back and forth from my custom setup to a 'normal' one.
#!/bin/sh set -e btn1=$(xmodmap -pp | awk '/ 1 / {print $2}') if [ "$btn1" = 3 ]; then # switch to dx mouse + us xmodmap -e 'pointer = 1 2 3' setxkbmap us else # switch to sx mouse + dvp-eu xmodmap -e 'pointer = 3 2 1' grep ^setxkbmap ~/.xsession | sh fi
cwm sometime needs an "encouragement" when switching keyboard layout.
pkill -HUP cwm || true