[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. bae85cdbaa3706abdbebf7068fd20f5bb5cb6002
Darren Salt
linux at youmustbejoking.demon.co.uk
Wed Feb 4 03:10:58 UTC 2009
The following commit has been merged in the master branch:
commit bae85cdbaa3706abdbebf7068fd20f5bb5cb6002
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Wed Feb 4 02:54:39 2009 +0000
Notification tweaks.
Replaced the heuristic for determining which should be fast notifications
with an extra parameter.
Fast notifications stay around for a bit longer.
diff --git a/debian/changelog b/debian/changelog
index 7f4cb71..df05cec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,10 @@ eeepc-acpi-scripts (1.0.12) UNRELEASED; urgency=low
* Give immediate indication of pressing of Fn-F2.
* The same ACPI key code may be used for wireless on as well as wireless off.
* Allow reporting via OSD of brightness changes.
+ * Tweaked notifications a bit:
+ - Replaced the heuristic for determining which should be fast
+ notifications with an extra parameter.
+ - Fast notifications stay around for a bit longer.
[ Raphael Geissert ]
* Auto detect the playback devices and the playback switches
diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
index cd8e347..980716c 100755
--- a/etc/acpi/actions/hotkey.sh
+++ b/etc/acpi/actions/hotkey.sh
@@ -91,7 +91,7 @@ show_brightness() {
level=$((0x$code & 0xF))
# convert hex digit to percent
percent=$(((100 * $level + 8) / 15))
- notify Brightness $percent
+ notify Brightness $percent% fast
}
case $code in
diff --git a/etc/acpi/actions/volume.sh b/etc/acpi/actions/volume.sh
index 4d4ac3c..fd139e7 100755
--- a/etc/acpi/actions/volume.sh
+++ b/etc/acpi/actions/volume.sh
@@ -60,7 +60,7 @@ show_volume() {
if [ "$all_equal" ]; then
msg="$percent%"
fi
- notify audio "Volume $msg"
+ notify audio "Volume $msg" fast
}
case "$action" in
diff --git a/etc/acpi/lib/notify.sh b/etc/acpi/lib/notify.sh
index 3af8eb5..0176cbe 100755
--- a/etc/acpi/lib/notify.sh
+++ b/etc/acpi/lib/notify.sh
@@ -5,8 +5,8 @@
notify() {
CATEGORY=$1
MSG=$2
- if [ -n "$3" ]; then
- echo "usage: notify 'category' 'message text'" > /dev/stderr
+ if [ -n "$4" -o \( -n "$3" -a "$3" != 'fast' \) ]; then
+ echo "usage: notify 'category' 'message text' [fast]" > /dev/stderr
return 1
fi
echo "$MSG" # for /var/log/acpid
@@ -28,7 +28,12 @@ notify() {
else
animations='on'
fi
- echo "<message id='eee-$CATEGORY' osd_fake_translucent_bg='off' osd_vposition='bottom' animations='$animations' hide_timeout='1200' osd_halignment='center'>$MSG</message>" \
+ if [ "$3" = 'fast' ]; then
+ timeout = 150
+ else
+ timeout = 1200
+ fi
+ echo "<message id='eee-$CATEGORY' osd_fake_translucent_bg='off' osd_vposition='bottom' animations='$animations' hide_timeout='$timeout' osd_halignment='center'>$MSG</message>" \
| sudo -u $user $GOSDC -s --dbus
OSD_SHOWN=1
fi
@@ -36,8 +41,8 @@ notify() {
if [ -z "$OSD_SHOWN" ] && [ -x /usr/bin/aosd_cat ]; then
killall -q aosd_cat
- if [ -n "$MSG" -a -z "$(echo $MSG | sed 's/.*[0-9]\+//g')" ]; then
- echo "$MSG%" | aosd_cat -f 0 -u 100 -o 0 -n "$OSD_FONT" &
+ if [ "$3" = 'fast' ]; then
+ echo "$MSG" | aosd_cat -n "$OSD_FONT" -f 0 -u 150 -o 0 &
else
echo "$MSG" | aosd_cat -n "$OSD_FONT" -f 100 -u 1000 -o 100 &
fi
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list