]> git.madduck.net Git - etc/xsession.git/blobdiff - .xsession.d/01-xkb

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

use keymap files instead of rules
[etc/xsession.git] / .xsession.d / 01-xkb
index 7ff8667f36badaa84e016b66138a520f208270f3..6d19628ee7764172377cb30fbcbac731b3bad4d6 100644 (file)
@@ -1,5 +1,14 @@
 # load the keyboard definitions
-# DISABLED in favour of 01-xmodmap for now, until
-# http://lists.freedesktop.org/archives/xorg/2008-June/036340.html
-# is answered
-#xkbcomp $HOME/.xkb ${DISPLAY%%.*}
+
+XKBDIR="$HOME/.xkb"
+#XKBMAPFILE="$XKBDIR/keymap/${(%):-%M}"
+XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)"
+[[ -r "$XKBMAPFILE" ]] || XKBMAPFILE="${XKBMAPFILE%/*}/defaul"
+
+info "loading keymap from $XKBMAPFILE"
+
+xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}"
+
+unset XKBDIR XKBMAPFILE
+
+# vim:ft=zsh