#!/bin/sh XKBDIR="${XDG_CONFIG_HOME:-$HOME/.config}/X11/xkb" XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)" [ -r "$XKBMAPFILE" ] || XKBMAPFILE="$XKBDIR/keymap/default" xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" unset XKBDIR XKBMAPFILE xset r rate 300 50 xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock killall xcape 2>/dev/null xcape -e 'Super_L=Escape' sleep 0.03 [ "$1" != "-n" ] && pkill -RTMIN+15 dwmblocks