diff --git a/dotfiles/Xmodmap b/dotfiles/Xmodmap index 5f97ea5d..e69de29b 100644 --- a/dotfiles/Xmodmap +++ b/dotfiles/Xmodmap @@ -1,5 +0,0 @@ -keycode 66 = Control_L -clear Lock -add Control = Control_L -keycode 117 = Caps_Lock -add Lock = Caps_Lock \ No newline at end of file diff --git a/dotfiles/lib/bin/load_xkb_map.sh b/dotfiles/lib/bin/load_xkb_map.sh new file mode 100755 index 00000000..3e4c1d17 --- /dev/null +++ b/dotfiles/lib/bin/load_xkb_map.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +XKBDIR="$HOME/.xkb" +XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)" +[[ -r "$XKBMAPFILE" ]] || XKBMAPFILE="${XKBMAPFILE%/*}/default" + +echo "loading keymap from $XKBMAPFILE" + +xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" + +unset XKBDIR XKBMAPFILE diff --git a/dotfiles/xinitrc b/dotfiles/xinitrc index 9078e01a..26a72900 100644 --- a/dotfiles/xinitrc +++ b/dotfiles/xinitrc @@ -1,5 +1,4 @@ # -*- mode: sh -*- -setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps xrdb -merge "$HOME/.Xresources" # Disable screensaver diff --git a/dotfiles/xkb/keymap/default b/dotfiles/xkb/keymap/default new file mode 100644 index 00000000..c5c68422 --- /dev/null +++ b/dotfiles/xkb/keymap/default @@ -0,0 +1,8 @@ +xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)+imalison(rwin_as_hyper)" }; + xkb_geometry { include "pc(pc105)" }; +}; + diff --git a/dotfiles/xkb/symbols/hyper b/dotfiles/xkb/symbols/hyper new file mode 100644 index 00000000..b1730b98 --- /dev/null +++ b/dotfiles/xkb/symbols/hyper @@ -0,0 +1,5 @@ +partial modifier_keys +xkb_symbols "rwin" { + key { [ Hyper_R ] }; + modifier_map Mod3 { , Hyper_R }; +}; diff --git a/dotfiles/xkb/symbols/imalison b/dotfiles/xkb/symbols/imalison new file mode 100644 index 00000000..5e9be33a --- /dev/null +++ b/dotfiles/xkb/symbols/imalison @@ -0,0 +1,5 @@ +partial modifier_keys +xkb_symbols "rwin_as_hyper" { + replace key { [ Hyper_L ] }; + modifier_map Mod3 { , Hyper_L, Hyper_R }; +}; diff --git a/dotfiles/xprofile b/dotfiles/xprofile index 8f1a9fb7..4b2c66c4 100644 --- a/dotfiles/xprofile +++ b/dotfiles/xprofile @@ -1,2 +1,3 @@ # -*- mode: sh; -*- source "$HOME/.lib/shellenv.sh" +load_xkb_map.sh diff --git a/tasks/arch.py b/tasks/arch.py index a8062945..e79068e8 100644 --- a/tasks/arch.py +++ b/tasks/arch.py @@ -25,7 +25,7 @@ PACKAGES = [ "android-sdk-platform-tools", "android-sdk", "keepassx-http", "global", "screencloud", "mopidy-spotify", "rcm", "xsettingsd-git", "aspell-en", "festival", "festival-freebsoft-utils", "hsetroot", "imwheel", "remmina", - "racket", + "racket", "xorg-utils", ]