Package: hibernate
Version: 1.12-1
Severity: wishlist
Tags: patch

I find the xmessage windows annoying, they get in the way of whatever
I'm doing. The osd display, OTOH, is nice. To get one without the other
I implemented the attached patch.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

hibernate depends on no packages.

Versions of packages hibernate recommends:
ii  console-tools              1:0.2.3dbs-60 Linux console and font utilities
ii  hdparm                     6.3-3         tune hard disk parameters for high
pn  vlock                      <none>        (no description available)

-- no debconf information

-- 
see shy jo
--- usr/share/hibernate/scriptlets.d/xstatus    2005-10-02 01:54:28.000000000 
-0400
+++ /usr/share/hibernate/scriptlets.d/xstatus   2006-01-31 00:41:24.000000000 
-0500
@@ -10,6 +10,7 @@
 AddConfigHelp "XSuspendText <message>" "Text to display on screen whilst 
preparing to suspend. (default: \"$XSTATUS_SUSPEND_TEXT\")"
 AddConfigHelp "XResumeText <message>" "Text to display on screen whilst coming 
back from suspend. (default: \"$XSTATUS_RESUME_TEXT\")"
 AddConfigHelp "XosdSettings <options>" "Options to pass to osd_cat, see 'man 
osd_cat' (default: \"$XOSD_SETTINGS\")"
+AddConfigHelp "XmessageDisable <boolean>" "Disable display of xmessage dialogs"
 
 ### KDE bits:
 
@@ -126,11 +127,13 @@
        kill -TERM $xmessage_pid
        exit 0
     }
-    trap xmessage_exit_handler HUP QUIT INT TERM
-    su $XUSER -c "xmessage -buttons 'Cancel:44' -default 'Cancel' -center 
-title Hibernate \"$1\"" < /dev/null > /dev/null 2>&1 &
-    xmessage_pid=$!
-    wait $xmessage_pid
-    [ $? -eq 44 ] && kill -INT $pid_to_kill > /dev/null 2>&1
+    if [ -z "$XMESSAGE_DISABLE" ]; then
+        trap xmessage_exit_handler HUP QUIT INT TERM
+        su $XUSER -c "xmessage -buttons 'Cancel:44' -default 'Cancel' -center 
-title Hibernate \"$1\"" < /dev/null > /dev/null 2>&1 &
+        xmessage_pid=$!
+        wait $xmessage_pid
+        [ $? -eq 44 ] && kill -INT $pid_to_kill > /dev/null 2>&1
+    fi
     exit 0
 }
 
@@ -244,6 +247,12 @@
            shift
            XOSD_SETTINGS="$*"
            ;;
+       xmessagedisable)
+           shift
+           if [ "$1" = true ]; then
+               XMESSAGE_DISABLE=1
+           fi
+           ;;
        *)
            return 1
     esac

Attachment: signature.asc
Description: Digital signature

Reply via email to