diff --git a/.i3/config b/.i3/config index 8b84dbf..135fe0e 100644 --- a/.i3/config +++ b/.i3/config @@ -54,7 +54,7 @@ bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu' bindsym $mod+F12 exec xscreensaver-command -lock bindsym $mod+Shift+y exec xinput-toggle -r yubikey -n -e -t 10 -bindsym $mod+Shift+f exec --no-startup-id xmodmap ~/.Xmodmap +bindsym $mod+Control+Shift+f exec fixkeyboard # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. diff --git a/bin/fixkeyboard b/bin/fixkeyboard new file mode 100755 index 0000000..859a509 --- /dev/null +++ b/bin/fixkeyboard @@ -0,0 +1,8 @@ +#!/bin/bash +#python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)' + +setxkbmap -option ctrl:nocaps + +if which notify-send >/dev/null; then + notify-send -t 1500 -a fixkeyboard "Fixed" "CapsLock Disbled" +fi