summaryrefslogtreecommitdiffstats
path: root/linux/bin/uiae
diff options
context:
space:
mode:
authorpascal <pascal@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-01-09 09:06:16 +0000
committerpascal <pascal@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-01-09 09:06:16 +0000
commit25ff2c73459634908461448137524eebb66bc209 (patch)
tree206cad2ddce5d3484cb0ad9f90abc9c9b3155984 /linux/bin/uiae
parenta9e3fbf43d4a9a81f45ab6135f9c5c4ec71bfda2 (diff)
Befehle nicht mehr in Variablen
git-svn-id: https://svn.neo-layout.org@1410 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to '')
-rwxr-xr-xlinux/bin/uiae61
1 files changed, 18 insertions, 43 deletions
diff --git a/linux/bin/uiae b/linux/bin/uiae
index 25d64e9..ae9792a 100755
--- a/linux/bin/uiae
+++ b/linux/bin/uiae
@@ -22,14 +22,6 @@ else
echo "No configuration file found. Using default values, this might fail!"
fi
-# Default paths
-PATH_XMODMAP=${PATH_XMODMAP:-/usr/bin/xmodmap}
-PATH_SETXKBMAP=${PATH_SETXKBMAP:-/usr/bin/setxkbmap}
-PATH_LOADKEYS=${PATH_LOADKEYS:-loadkeys}
-PATH_SUDO=${PATH_SUDO:-/usr/bin/sudo}
-PATH_SETLEDS=${PATH_SETLEDS:-setleds}
-PATH_NUMLOCKX=${PATH_NUMLOCKX:-/usr/bin/numlockx}
-PATH_XSET=${PATH_XSET:-/usr/bin/xset}
# Default values
STD_X_VARIANTE=${STD_X_VARIANTE:-xkbmap}
@@ -59,32 +51,22 @@ die() {
}
set_xmodmap() {
- if [ -e "${PATH_XMODMAP}" ]; then
- if [ -f "$@" ]; then
- "${PATH_XMODMAP}" "$@" || die "Failed to set xmodmap $@."
- else
- die "Cannot use $@ for xmodmap."
- fi
+ if [ -f "$@" ]; then
+ xmodmap "$@" || die "Failed to set xmodmap $@."
else
- die "xmodmap not found, cannot set xmodmap."
+ die "Cannot use $@ for xmodmap."
fi
}
set_xkbmap() {
- if [ -e "${PATH_SETXKBMAP}" ]; then
- "${PATH_SETXKBMAP}" "$@" || die "Failed to select xkbmap $@."
- else
- die "setxkbmap not found, cannot set xkbmap."
- fi
+ setxkbmap "$@" || die "Failed to select xkbmap $@."
}
set_keymap() {
if [ "${EUID}" = 0 ]; then
- "${PATH_LOADKEYS}" "$@" || die "Fehler beim Laden der Keymap ${orange}$@${red}."
- elif [ -e "${PATH_SUDO}" ]; then
- "${PATH_SUDO}" "${PATH_LOADKEYS}" "$@" || die "Fehler bei der Verwendung von ${orange}sudo${red}, um die Belegung zu ändern."
+ loadkeys "$@" || die "Fehler beim Laden der Keymap ${orange}$@${red}."
else
- die "Die Belegung auf der Textkonsole kann nur mir Rootrechten geändert werden."
+ sudo loadkeys "$@" || die "Fehler bei der Verwendung von ${orange}sudo${red}, um die Belegung zu ändern."
fi
}
@@ -96,22 +78,19 @@ if [ -z ${DISPLAY} ]; then
set_keymap "${STD_CONSOLE_KEYMAP}"
if [ "${NUM_LOCK_STATUS}" = "on" ]; then
- "${PATH_SETLEDS}" -num || echo -e "${orange}Fehler beim setzen des Status von NumLock.${normal}" >&2
+ setleds -num || echo -e "${orange}Fehler beim setzen des Status von NumLock.${normal}" >&2
else
- "${PATH_SETLEDS}" +num || echo "${orange}Fehler beim setzen des Status von NumLock.${normal}" >&2
+ setleds +num || echo "${orange}Fehler beim setzen des Status von NumLock.${normal}" >&2
fi
else
- if [ -e "${PATH_XSET}" ]; then
- for modifier in 51 94; do
- "${PATH_XSET}" r ${modifier} || echo "Failed to set repeat for modifier ${modifier}." >&2
- done
- for deadkey in 21 35 49; do
- "${PATH_XSET}" r ${deadkey} || echo "Failed to set repeat for deadkey ${deakey}." >&2
- done
- else
- echo "xset not found, cannot set modifiers and dead keys." >&2
- fi
+ for modifier in 51 94; do
+ xset r ${modifier} || echo "Failed to set repeat for modifier ${modifier}." >&2
+ done
+ for deadkey in 21 35 49; do
+ xset r ${deadkey} || echo "Failed to set repeat for deadkey ${deakey}." >&2
+ done
+
case "${STD_X_VARIANTE}" in
xkbmap)
@@ -126,14 +105,10 @@ else
;;
esac
- if [ -e "${PATH_NUMLOCKX}" ]; then
- if [ "${NUM_LOCK_STATUS}" = "on" ]; then
- "${PATH_NUMLOCKX}" on || die "Failed to set num lock status to on."
- else
- "${PATH_NUMLOCKX}" off || die "Failed to set num lock status to off."
- fi
+ if [ "${NUM_LOCK_STATUS}" = "on" ]; then
+ numlockx on || die "Failed to set num lock status to on."
else
- die "numlockx not found, cannot turn off Numlock."
+ numlockx off || die "Failed to set num lock status to off."
fi
fi