From 3e48e52705172e15f8b82c965913b1e85b2c3fab Mon Sep 17 00:00:00 2001 From: pascal Date: Fri, 9 Jan 2009 11:30:38 +0000 Subject: Skripte vereinfacht, alle Ausgaben auf deutsch, Farben angepasst git-svn-id: https://svn.neo-layout.org@1411 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- linux/bin/asdf | 10 ++++---- linux/bin/uiae | 67 ++++++++++++++++++++++++++++++++++++++++++------------ linux/etc/neo.conf | 22 +++++++++++------- 3 files changed, 71 insertions(+), 28 deletions(-) diff --git a/linux/bin/asdf b/linux/bin/asdf index c29fb06..0b0d817 100755 --- a/linux/bin/asdf +++ b/linux/bin/asdf @@ -6,7 +6,7 @@ # Distributed under the terms of the GNU General Public License v3 #prevent CapsLock while ›asdf‹ is running -#xmodmap -e "clear Lock" 2> /dev/null +xmodmap -e "clear Lock" 2> /dev/null # colours in the Bash normal="\033[0m" @@ -80,12 +80,12 @@ set_xmodmap() { set_xkbmap lv xmodmap "$@" || die2 $@ else - die "Die Xmodmap-Datei $@ gibt es nicht." + die "Die Xmodmap-Datei ${orange}$@${red} gibt es nicht." fi } set_xkbmap() { - setxkbmap "$@" || die "Die xkbmap $@ wurde nicht gefunden." + setxkbmap "$@" || die "Die xkbmap ${orange}$@${red} wurde nicht gefunden." } set_keymap() { @@ -130,10 +130,10 @@ else numlockx off || numlock_manually "Fehler beim setzen des Status von NumLock." aus for modifier in 51 94; do - xset -r ${modifier} || echo "Fehler beim Ausschalten von Autorepeat beim Modifier ${modifier}." >&2 + xset -r ${modifier} || echo -e "${orange}Fehler beim Ausschalten von Autorepeat beim Modifier ${modifier}.${normal}" >&2 done for deadkey in 21 35 49; do - xset -r ${deadkey} || echo "Fehler beim Ausschalten von Autorepead bei der toten Taste ${deakey}." >&2 + xset -r ${deadkey} || echo -e "${orange}Fehler beim Ausschalten von Autorepead bei der toten Taste ${deakey}.${normal}" >&2 done case "${NEO_X_VARIANTE}" in diff --git a/linux/bin/uiae b/linux/bin/uiae index ae9792a..4015e1c 100755 --- a/linux/bin/uiae +++ b/linux/bin/uiae @@ -13,13 +13,13 @@ orange="\033[33m" green="\033[32m" if [ -f "${NEO_CONFIG}" ]; then - . "${NEO_CONFIG}" || die "Failed to source ${NEO_CONFIG}" + . "${NEO_CONFIG}" || die "Fehler beim Verwenden der Konfigurationsdatei ${NEO_CONFIG}" elif [ -f "${HOME}"/.neorc ]; then - . "${HOME}"/.neorc || die "Failed to source ${HOME}/.neorc" + . "${HOME}"/.neorc || die "Fehler beim Verwenden der Konfigurationsdatei ${HOME}/.neorc" elif [ -f /etc/neo.conf ]; then - . /etc/neo.conf || die "Failed to source /etc/neo.conf" + . /etc/neo.conf || die "Fehler beim Verwenden der Konfigurationsdatei /etc/neo.conf" else - echo "No configuration file found. Using default values, this might fail!" + echo "${red}Keine Konfigurationsdatei für NEO gefunden. Das Verwenden der Standardwerte kann fehlschlagen!${normal}" fi @@ -27,14 +27,22 @@ fi STD_X_VARIANTE=${STD_X_VARIANTE:-xkbmap} STD_XKBMAP=${STD_XKBMAP:-de} STD_XKBVARIANT=${STD_XKBVARIANT:-nodeadkeys} +STD_XMODMAP=${STD_XMODMAP:-""} STD_CONSOLE_KEYMAP="${STD_CONSOLE_KEYMAP:-de-latin1-nodeadkeys}" NUM_LOCK_STATUS=${NUM_LOCK_STATUS:-on} help() { cat <&2 + xset r ${modifier} || echo -e "${orange}Fehler beim Wiederherstellen von Autorepeat beim Modifier ${modifier}.${normal}" >&2 done for deadkey in 21 35 49; do - xset r ${deadkey} || echo "Failed to set repeat for deadkey ${deakey}." >&2 + xset r ${deadkey} || echo -e "${orange}Fehler beim Wiederherstellen von Autorepead bei der toten Taste ${deakey}.${normal}" >&2 done case "${STD_X_VARIANTE}" in xkbmap) + [ $quiet ] || echo "Die Standardbelegung wird geladen…" set_xkbmap "${STD_XKBMAP}" "${STD_XKBVARIANT}" ;; xmodmap) - set_xkbmap de - set_xmodmap "${STD_XMODMAP}" + if [ "${STD_XMODMAP}" ]; then + [ $quiet ] || echo "Die Standard-Xmodmap wird geladen…" + set_xmodmap "${STD_XMODMAP}" + else + echo -e "${red}Es wurde keine Standard-Xmodmap definiert." >&2 + die "${red}In der Regel ist ${green}uiae${red} ohne weitere Angaben erfolgreich." + fi ;; *) - die "Unknown standard X variant ${STD_X_VARIANTE}." + die "${orange}${STD_X_VARIANTE}${red} ist eine unbekannte X-Variante der NEO-Belegung." ;; esac if [ "${NUM_LOCK_STATUS}" = "on" ]; then - numlockx on || die "Failed to set num lock status to on." + numlockx on || echo -e "${orange}Fehler beim setzen des Status von NumLock." >&2 else - numlockx off || die "Failed to set num lock status to off." + numlockx off || echo -e "${orange}Fehler beim setzen des Status von NumLock." >&2 fi fi +if [ ! "$quiet" ]; then + echo + echo "Die Tastaturbelegung wurde auf die Standardbelegung geändert." + echo -e "Durch ${green}asdf${normal} kehrt man wieder zur NEO-Belegung zurück." +fi \ No newline at end of file diff --git a/linux/etc/neo.conf b/linux/etc/neo.conf index 8816291..1bae1f5 100644 --- a/linux/etc/neo.conf +++ b/linux/etc/neo.conf @@ -11,16 +11,16 @@ NEO_REFERENCE="$HOME/neo/neo20.txt" NEO_X_VARIANTE="xmodmap" -# When using xkbmap, you may specify which xkbmap should be used, the default +# When using Xkbmap, you may specify which Xkbmap should be used, the default # is "de" (This is useful if you installed the symbols file under a different # name): #NEO_XKBMAP=de -# You can also specify the xkbmap variant to be used, the default is "neo": +# You can also specify the Xkbmap variant to be used, the default is "neo": #NEO_XKBVARIANT=neo -# When using a xmodmap, you may specify the full path to the xmodmap to be used. +# When using a Xmodmap, you may specify the full path to the Xmodmap to be used. # Default: #NEO_XMODMAP="$HOME/neo/neo_de.xmodmap" #NEO_XMODMAP_XPROG="$HOME/neo/neo_de_x-prog.xmodmap" @@ -28,15 +28,21 @@ NEO_X_VARIANTE="xmodmap" #NEO_XMODMAP_EVDEV="$HOME/neo/neo_de_evdev.xmodmap" -# Standard keyboard layout to switch back to when executing "uiae": +# Numlock status when switching to standard keyboard layout using ›uiae‹, +# values are ›on‹ and ›off‹: +#NUM_LOCK_STATUS=on + + +# Standard keyboard layout to switch back to when executing ›uiae‹: #STD_XKBMAP=de -# Standard layout variant to switch back to when executing "uiae": +# Standard layout variant to switch back to when executing ›uiae‹: #STD_XKBVARIANT=nodeadkeys -# Numlock status when switching to standard keyboard layout using "uiae", -# values are "on" and "off": -#NUM_LOCK_STATUS=on + +# If you use an own Xmodmap as standard keyboard layout you may specify the full +# path to this file +#STD_XMODMAP="" # For Neo without an X System set the path to the console keymap -- cgit v1.2.3