[Linux] Setup Hyper/Use xkb instead of xmodmap

This commit is contained in:
Ivan Malison 2016-10-03 16:49:42 -07:00
parent 4131761550
commit 1ddf67fca8
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
8 changed files with 31 additions and 7 deletions

View File

@ -1,5 +0,0 @@
keycode 66 = Control_L
clear Lock
add Control = Control_L
keycode 117 = Caps_Lock
add Lock = Caps_Lock

View File

@ -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

View File

@ -1,5 +1,4 @@
# -*- mode: sh -*- # -*- mode: sh -*-
setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps
xrdb -merge "$HOME/.Xresources" xrdb -merge "$HOME/.Xresources"
# Disable screensaver # Disable screensaver

View File

@ -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)" };
};

View File

@ -0,0 +1,5 @@
partial modifier_keys
xkb_symbols "rwin" {
key <RWIN> { [ Hyper_R ] };
modifier_map Mod3 { <HYPR>, Hyper_R };
};

View File

@ -0,0 +1,5 @@
partial modifier_keys
xkb_symbols "rwin_as_hyper" {
replace key <RWIN> { [ Hyper_L ] };
modifier_map Mod3 { <RWIN>, Hyper_L, Hyper_R };
};

View File

@ -1,2 +1,3 @@
# -*- mode: sh; -*- # -*- mode: sh; -*-
source "$HOME/.lib/shellenv.sh" source "$HOME/.lib/shellenv.sh"
load_xkb_map.sh

View File

@ -25,7 +25,7 @@ PACKAGES = [
"android-sdk-platform-tools", "android-sdk", "keepassx-http", "global", "android-sdk-platform-tools", "android-sdk", "keepassx-http", "global",
"screencloud", "mopidy-spotify", "rcm", "xsettingsd-git", "aspell-en", "screencloud", "mopidy-spotify", "rcm", "xsettingsd-git", "aspell-en",
"festival", "festival-freebsoft-utils", "hsetroot", "imwheel", "remmina", "festival", "festival-freebsoft-utils", "hsetroot", "imwheel", "remmina",
"racket", "racket", "xorg-utils",
] ]