From 446e901b20feaeb7072091e538e2fcdf42f1dc06 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sun, 22 Dec 2013 12:44:53 +0100 Subject: [PATCH] xmodmap_usex: fixed ctrl-lock swap --- .scripts/homeinit | 2 +- .xmodmap_usex | 6 ++++++ .xprofile | 8 ++------ .zshrc | 12 ++++-------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.scripts/homeinit b/.scripts/homeinit index 27b53e0b..1563632b 100755 --- a/.scripts/homeinit +++ b/.scripts/homeinit @@ -18,7 +18,7 @@ installkeymap () { if [ -f "$HOME/.xkb/symbols/$1" ] && ( [ ! -f "/usr/share/X11/xkb/symbols/$1" ] || \ [ ! "$(sha1sum "$HOME/.xkb/symbols/$1" | cut -f1 -d' ')" = "$(sha1sum /usr/share/X11/xkb/symbols/$1 | cut -f1 -d ' ')" ] ); then - echo "==> '$1' font (press Ctrl-D to skip)" + echo "==> '$1' keymap (press Ctrl-D to skip)" sudo sh -c "install -m644 $HOME/.xkb/symbols/$1 /usr/share/X11/xkb/symbols/" echo fi diff --git a/.xmodmap_usex b/.xmodmap_usex index 1febc45a..c008b2c6 100644 --- a/.xmodmap_usex +++ b/.xmodmap_usex @@ -1,3 +1,6 @@ +remove Lock = Caps_Lock +remove Control = Control_L +!! keycode 8 = keycode 9 = Escape NoSymbol Escape keycode 10 = 1 exclam 1 exclam onesuperior exclamdown onesuperior @@ -246,3 +249,6 @@ keycode 252 = keycode 253 = keycode 254 = keycode 255 = +!! +add Lock = Caps_Lock +add Control = Control_L diff --git a/.xprofile b/.xprofile index e0554ace..9c5a4577 100644 --- a/.xprofile +++ b/.xprofile @@ -1,14 +1,9 @@ #!/bin/sh ################################################################################ ## XPROFILE -## 2013-05-23 ################################################################################ ## This file is sourced by some DM and should not contain any desktop execution. -## Env vars and general config. The .profile file should be automatically -## sourced by the login manager. -# [ -f "$HOME/.profile" ] && . "$HOME/.profile" - ## X config (for URxvt, etc.) [ -f "${HOME}/.Xresources" ] && xrdb -merge "${HOME}/.Xresources" @@ -16,7 +11,8 @@ numlockx on ## Keymap. Only useful on multi-user environment where users have different -## keymaps. +## keymaps. The map file can be generated from current layout with +## xmodmap -pke > ~/.xmodmap if [ "$(setxkbmap -v 7 | awk '/^layout/ {print $2}')" != "usex" ]; then xmodmap ~/.xmodmap_usex fi diff --git a/.zshrc b/.zshrc index 58f963ba..808db76f 100644 --- a/.zshrc +++ b/.zshrc @@ -2,15 +2,11 @@ ## Shell Config -- Master File ################################################################################ -##============================================================================== -## Sourcing -##============================================================================== +readonly SHELL_CURRENT="$(ps -o command="" $$)" +readonly SHELL_DIR="$HOME/.shell.d" -SHELL_CURRENT="$(ps -o command="" $$)" -SHELL_DIR="$HOME/.shell.d" - -## .profile is sourced automatically when X is started, but we need to source it -## manually to TTY. +## .profile is sourced automatically by most login managers, but we need to +## source it manually to TTY. [ -z "$DISPLAY" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile" loadrc()