7fa9927893
git-svn-id: https://svn.neo-layout.org@852 b9310e46-f624-0410-8ea1-cfbb3a30dc96
48 lines
1.1 KiB
Bash
Executable file
48 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
NEO_X_VARIANTE="xkbmap" # xkbmap, xmoadmap, xprog, alternative, evdev
|
|
|
|
CONSOLE_KEYMAP="/usr/share/kbd/keymaps/i386/neo/neo.map"
|
|
XMODMAP="$HOME/neo/neo_de.xmodmap"
|
|
XMODMAP_XPROG="$HOME/neo/neo_de_x-prog.xmodmap"
|
|
XMODMAP_ALTERNATIVE="$HOME/neo/neo_de_alternative.xmodmap"
|
|
XMODMAP_EVDEV="$HOME/neo/neo_de_evdev.xmodmap"
|
|
|
|
if [ -n "$SSH_CONNECTION" ]; then
|
|
echo "Dude, du bist in einer SSH-Session. Wie soll ich das Tastaturlayout hier ändern?"
|
|
exit 1
|
|
fi
|
|
if [ -z "$DISPLAY" ]; then
|
|
echo "Um das Tastaturlayout auf der Textkonsole zu ändern, muss man root-Rechte besitzen!"
|
|
sudo loadkeys $CONSOLE_KEYMAP
|
|
setleds +num
|
|
else
|
|
numlockx off
|
|
xset -r 51; xset -r 94 # Modifier
|
|
xset -r 21; xset -r 35; xset -r 49 # tote Tasten (dead keys)
|
|
|
|
case $NEO_X_VARIANTE in
|
|
xkbmap)
|
|
setxkbmap de neo
|
|
;;
|
|
xmodmap)
|
|
setxkbmap ie
|
|
xmodmap $XMODMAP
|
|
;;
|
|
xprog)
|
|
setxkbmap ie
|
|
xmodmap $XMODMAP_XPROG
|
|
;;
|
|
alternative)
|
|
setxkbmap ie
|
|
xmodmap $XMODMAP_ALTERNATIVE
|
|
;;
|
|
evdev)
|
|
setxkbmap ie
|
|
xmodmap $XMODMAP_EVDEV
|
|
;;
|
|
*)
|
|
echo "Die Variante "$NEO_X_VARIANTE "ist keine bekannte X-Variante des NEO-Layouts"
|
|
exit 1
|
|
;;
|
|
esac
|
|
fi
|