From bc9410c557506fa9f497c4e7d5c0b3a87e5002ae Mon Sep 17 00:00:00 2001 From: knittl Date: Fri, 3 Oct 2008 11:01:39 +0000 Subject: =?UTF-8?q?neo.conf=20ins=20(richtige)=20verzeichnis=20etc=20versc?= =?UTF-8?q?hoben=20patch=20von=20bernd=20f=C3=BCr=20num=20und=20neo=20eing?= =?UTF-8?q?espielt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@931 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- linux/bin/neo | 17 +++++++++++++---- linux/bin/neo.conf | 49 ------------------------------------------------- linux/bin/num | 17 +++++++++++++---- linux/etc/neo.conf | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 57 deletions(-) delete mode 100644 linux/bin/neo.conf create mode 100644 linux/etc/neo.conf diff --git a/linux/bin/neo b/linux/bin/neo index 8923706..2753971 100755 --- a/linux/bin/neo +++ b/linux/bin/neo @@ -1,14 +1,23 @@ #!/bin/sh -# Verzeichnis muss eventuell an den Ort der neo20.txt angepasst werden: -NEO_TXT=$HOME/neo/A-REFERENZ-A/neo20.txt +if [ -f "${NEO_CONFIG}" ]; then + . "${NEO_CONFIG}" || die "Failed to source ${NEO_CONFIG}" +elif [ -f "${HOME}"/.neorc ]; then + . "${HOME}"/.neorc || die "Failed to source ${HOME}/.neorc" +elif [ -f /etc/neo.conf ]; then + . /etc/neo.conf || die "Failed to source /etc/neo.conf" +else + echo "No configuration file found. Using default values, this might fail!" +fi + +NEO_REFERENCE=${NEO_REFERENCE:-/usr/share/neo-layout/neo20-reference.txt} if [ 0 = $# ]; then - grep -m 1 -B 15 "┴──────┘" $NEO_TXT + grep -m 1 -B 15 "┴──────┘" "${NEO_REFERENCE}" else for NUM in $@; do if [ $(($NUM)) -ge 1 -a $(($NUM)) -le 6 ]; then - grep -B 11 -m "$NUM" "└───┴──┴──┴───────────┴──┴──┴──┴───┘" $NEO_TXT | tail -n 12 + grep -B 11 -m "$NUM" "└───┴──┴──┴───────────┴──┴──┴──┴───┘" "${NEO_REFERENCE}" | tail -n 12 else echo "Benutzung: `basename $0` [1-6]" echo " Wenn der Aufruf ohne Zahl erfolgt, werden alle Ebenen ausgegeben." diff --git a/linux/bin/neo.conf b/linux/bin/neo.conf deleted file mode 100644 index 23959f6..0000000 --- a/linux/bin/neo.conf +++ /dev/null @@ -1,49 +0,0 @@ -# This files contains the configuration for the Neo scripts - -# Select the neo Variant to be used when using an X Server -# Values are "xkbmap" and "xmodmap", default is xkbmap, this variable should -# always be set -NEO_X_VARIANTE="xkbmap" - -# 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": -#NEO_XKBVARIANT=neo - -# When using xmodmap, you may specify the full path to the xmodmap to be used. -# Default: -#NEO_XMODMAP="/usr/share/neo-layout/xmodmap/neo_de.xmodmap" -# Other examples might be: -#NEO_XMODMAP="path/to/xmodmap/neo_de_x-prog.xmodmap" -#NEO_XMODMAP="path/to/xmodmap/neo_de_evdev.xmodmap" -#NEO_XMODMAP="path/to/xmodmap/neo_de_alternative.xmodmap" - -# Standard keyboard layout to switch back to when executing "uiae": -#STD_XKBMAP=de - -# 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 - -# For Neo without an X System set the path to the console keymap -#NEO_CONSOLE_KEYMAP="/usr/share/keymaps/i386/neo/neo.map" - -# Set the standard console keymap to switch back to -#STD_CONSOLE_KEYMAP="/usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz" - -# If you installed one of these programs in a non-standard path you may, -# uncomment the variable and change the path to the executable: -#PATH_XMODMAP=/usr/bin/xmodmap -#PATH_SETXKBMAP=/usr/bin/setxkbmap -#PATH_LOADKEYS=/usr/bin/loadkeys -#PATH_SUDO=/usr/bin/sudo -#PATH_SETLEDS=/usr/bin/setleds -#PATH_NUMLOCKX=/usr/bin/numlockx -#PATH_XSET=/usr/bin/xset - diff --git a/linux/bin/num b/linux/bin/num index 371feb5..16ed8e9 100755 --- a/linux/bin/num +++ b/linux/bin/num @@ -1,14 +1,23 @@ #!/bin/sh -# Verzeichnis muss eventuell an den Ort der neo20.txt angepasst werden: -NEO_TXT=$HOME/neo/A-REFERENZ-A/neo20.txt +if [ -f "${NEO_CONFIG}" ]; then + . "${NEO_CONFIG}" || die "Failed to source ${NEO_CONFIG}" +elif [ -f "${HOME}"/.neorc ]; then + . "${HOME}"/.neorc || die "Failed to source ${HOME}/neo.conf" +elif [ -f /etc/neo.conf ]; then + . /etc/neo.conf || die "Failed to source /etc/neo.conf" +else + echo "No configuration file found. Using default values, this might fail!" +fi + +NEO_REFERENCE=${NEO_REFERENCE:-/usr/share/neo-layout/neo20-reference.txt} if [ 0 = $# ]; then - grep -m 1 -B 15 "┴───────┘" $NEO_TXT + grep -m 1 -B 15 "┴───────┘" "${NEO_REFERENCE}" else for NUM in $@; do if [ $(($NUM)) -ge 1 -a $(($NUM)) -le 6 ]; then - grep -B 11 -m "$NUM" "└───────┴───┴───┘" $NEO_TXT | tail -n 12 + grep -B 11 -m "$NUM" "└───────┴───┴───┘" "${NEO_REFERENCE}" | tail -n 12 else echo "Benutzung: `basename $0` [1-6]" echo " Wenn der Aufruf ohne Zahl erfolgt, werden alle Ebenen ausgegeben." diff --git a/linux/etc/neo.conf b/linux/etc/neo.conf new file mode 100644 index 0000000..23959f6 --- /dev/null +++ b/linux/etc/neo.conf @@ -0,0 +1,49 @@ +# This files contains the configuration for the Neo scripts + +# Select the neo Variant to be used when using an X Server +# Values are "xkbmap" and "xmodmap", default is xkbmap, this variable should +# always be set +NEO_X_VARIANTE="xkbmap" + +# 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": +#NEO_XKBVARIANT=neo + +# When using xmodmap, you may specify the full path to the xmodmap to be used. +# Default: +#NEO_XMODMAP="/usr/share/neo-layout/xmodmap/neo_de.xmodmap" +# Other examples might be: +#NEO_XMODMAP="path/to/xmodmap/neo_de_x-prog.xmodmap" +#NEO_XMODMAP="path/to/xmodmap/neo_de_evdev.xmodmap" +#NEO_XMODMAP="path/to/xmodmap/neo_de_alternative.xmodmap" + +# Standard keyboard layout to switch back to when executing "uiae": +#STD_XKBMAP=de + +# 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 + +# For Neo without an X System set the path to the console keymap +#NEO_CONSOLE_KEYMAP="/usr/share/keymaps/i386/neo/neo.map" + +# Set the standard console keymap to switch back to +#STD_CONSOLE_KEYMAP="/usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz" + +# If you installed one of these programs in a non-standard path you may, +# uncomment the variable and change the path to the executable: +#PATH_XMODMAP=/usr/bin/xmodmap +#PATH_SETXKBMAP=/usr/bin/setxkbmap +#PATH_LOADKEYS=/usr/bin/loadkeys +#PATH_SUDO=/usr/bin/sudo +#PATH_SETLEDS=/usr/bin/setleds +#PATH_NUMLOCKX=/usr/bin/numlockx +#PATH_XSET=/usr/bin/xset + -- cgit v1.2.3