From 34c0a30213f231c4323705c66bbc213437903761 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Sun, 25 Jun 2006 22:36:58 +0000 Subject: * Describe format of WindowID * Remove Bugss section --- scripts/desc/xdg-screensaver.xml | 28 ++----- scripts/html/xdg-screensaver.html | 23 ++---- scripts/man/xdg-screensaver.1 | 154 +++++++++++++------------------------- scripts/xdg-screensaver | 147 ++++++++++++++++-------------------- 4 files changed, 129 insertions(+), 223 deletions(-) (limited to 'scripts') diff --git a/scripts/desc/xdg-screensaver.xml b/scripts/desc/xdg-screensaver.xml index f31333a..b627392 100755 --- a/scripts/desc/xdg-screensaver.xml +++ b/scripts/desc/xdg-screensaver.xml @@ -77,6 +77,12 @@ of an existing window of the calling application. The window must remain in existance for the duration of the suspension. + + WindowID can be represented as either a decimal number + or as a hexadecimal number consisting of the prefix + 0x followed by one or more hexadecimal + digits. + The screensaver can be suspended in relation to multiple windows at the same time. In that case screensaver @@ -215,26 +221,4 @@ xdg-screensaver suspend 0x1c00007 existing window. - - Bugss - - There is no provision for cancelling a suspend operation. If a - second suspend is started before the first one is completed, - then the screensaver will be restored to its original state - before the second suspend is able to complete. - - - For example, if a presenter completes her presentation, and a - second presenter starts before the delay is over, then the - screensaver could come on during the second presentation. - - - True suspend functionality will require cooperation from the X - server. The Xorg group has implemented an extension that allows - an application to disable the screensaver while it is connected, - which will re-enable the screensaver. xdg-screensaver should be - updated to take advantage of this functionality when it is - available. - - diff --git a/scripts/html/xdg-screensaver.html b/scripts/html/xdg-screensaver.html index f9864b1..0cddce0 100644 --- a/scripts/html/xdg-screensaver.html +++ b/scripts/html/xdg-screensaver.html @@ -1,4 +1,4 @@ -xdg-screensaver

Name

xdg-screensaver — command line tool for controlling the screensaver

Synopsis

xdg-screensaver suspend WindowID

xdg-screensaver restore WindowID

xdg-screensaver { activate | reset | status }

xdg-screensaver { --help | --manual | --version }

Description

+xdg-screensaver

Name

xdg-screensaver — command line tool for controlling the screensaver

Synopsis

xdg-screensaver suspend WindowID

xdg-screensaver restore WindowID

xdg-screensaver { activate | reset | status }

xdg-screensaver { --help | --manual | --version }

Description

xdg-screensaver provides commands to control the screensaver.

xdg-screensaver is for use inside a desktop session only. @@ -8,6 +8,11 @@ WindowID must be the X Window ID of an existing window of the calling application. The window must remain in existance for the duration of the suspension. +

+ WindowID can be represented as either a decimal number + or as a hexadecimal number consisting of the prefix + 0x followed by one or more hexadecimal + digits.

The screensaver can be suspended in relation to multiple windows at the same time. In that case screensaver @@ -54,20 +59,4 @@ xdg-screensaver suspend 0x1c00007 xdg-screensaver resume 0x1c00007 is called. 0x1c00007 must be the X Window ID of an existing window. -

Bugss

- There is no provision for cancelling a suspend operation. If a - second suspend is started before the first one is completed, - then the screensaver will be restored to its original state - before the second suspend is able to complete. -

- For example, if a presenter completes her presentation, and a - second presenter starts before the delay is over, then the - screensaver could come on during the second presentation. -

- True suspend functionality will require cooperation from the X - server. The Xorg group has implemented an extension that allows - an application to disable the screensaver while it is connected, - which will re-enable the screensaver. xdg-screensaver should be - updated to take advantage of this functionality when it is - available.

diff --git a/scripts/man/xdg-screensaver.1 b/scripts/man/xdg-screensaver.1 index d3f0ce2..2f39bb2 100644 --- a/scripts/man/xdg-screensaver.1 +++ b/scripts/man/xdg-screensaver.1 @@ -1,140 +1,92 @@ -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "XDG-SCREENSAVER" 1 "" "" "xdg-screensaver Manual" -.SH NAME -xdg-screensaver \- command line tool for controlling the screensaver -.SH "SYNOPSIS" +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "XDG\-SCREENSAVER" "1" "06/25/2006" "This is release 0.1 of the xdg\-screensav" "" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) .ad l -.hy 0 +.SH "NAME" +xdg\-screensaver \- command line tool for controlling the screensaver +.SH "SYNOPSIS" .HP 16 -\fBxdg\-screensaver\fR \fBsuspend\ \fIWindowID\fR\fR -.ad -.hy -.ad l -.hy 0 +\fBxdg\-screensaver\fR \fBsuspend\ \fR\fB\fIWindowID\fR\fR .HP 16 -\fBxdg\-screensaver\fR \fBrestore\ \fIWindowID\fR\fR -.ad -.hy -.ad l -.hy 0 +\fBxdg\-screensaver\fR \fBrestore\ \fR\fB\fIWindowID\fR\fR .HP 16 -\fBxdg\-screensaver\fR {\fB\fBactivate\fR\fR | \fB\fBreset\fR\fR | \fB\fBstatus\fR\fR} -.ad -.hy -.ad l -.hy 0 +\fBxdg\-screensaver\fR {\fBactivate\fR \fBreset\fR \fBstatus\fR} .HP 16 -\fBxdg\-screensaver\fR {\fB\fB\-\-help\fR\fR | \fB\fB\-\-manual\fR\fR | \fB\fB\-\-version\fR\fR} -.ad -.hy - +\fBxdg\-screensaver\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR} .SH "DESCRIPTION" - .PP -xdg\-screensaver provides commands to control the screensaver\&. - +xdg\-screensaver provides commands to control the screensaver. .PP -xdg\-screensaver is for use inside a desktop session only\&. It is not recommended to use xdg\-screensaver as root\&. - +xdg\-screensaver is for use inside a desktop session only. It is not recommended to use xdg\-screensaver as root. .SH "COMMANDS" - .TP -\fBsuspend \fIWindowID\fR\fR -Suspends the screensaver and monitor power management\&. \fIWindowID\fR must be the X Window ID of an existing window of the calling application\&. The window must remain in existance for the duration of the suspension\&. - -The screensaver can be suspended in relation to multiple windows at the same time\&. In that case screensaver operation is only restored once the suspensions have been restored in relation to each of the windows - +\fBsuspend \fR\fB\fIWindowID\fR\fR +Suspends the screensaver and monitor power management. +\fIWindowID\fR +must be the X Window ID of an existing window of the calling application. The window must remain in existance for the duration of the suspension. +.sp +WindowID can be represented as either a decimal number or as a hexadecimal number consisting of the prefix +\fI0x\fR +followed by one or more hexadecimal digits. +.sp +The screensaver can be suspended in relation to multiple windows at the same time. In that case screensaver operation is only restored once the suspensions have been restored in relation to each of the windows .TP -\fBresume \fIWindowID\fR\fR -Resume the screensaver and monitor power management after being suspended\&. \fIWindowID\fR must be the same X Window ID that was passed to a previous call of \fBxdg\-screensaver suspend\fR - +\fBresume \fR\fB\fIWindowID\fR\fR +Resume the screensaver and monitor power management after being suspended. +\fIWindowID\fR +must be the same X Window ID that was passed to a previous call of +\fBxdg\-screensaver suspend\fR .TP \fBactivate\fR -Turns the screensaver on immediately\&. This may result in the screen getting locked, depending on existing system policies\&. - +Turns the screensaver on immediately. This may result in the screen getting locked, depending on existing system policies. .TP \fBreset\fR -Turns the screensaver off immediately\&. This my result in a password prompt to unlock the screen, depending on existing system policies\&. - +Turns the screensaver off immediately. This my result in a password prompt to unlock the screen, depending on existing system policies. .TP \fBstatus\fR -Returns true if the screensaver is enabled to turn on after a period of inactivty, or false otherwise\&. - +Returns true if the screensaver is enabled to turn on after a period of inactivty, or false otherwise. .SH "OPTIONS" - .TP \fB\-\-help\fR -Show command synopsis\&. - +Show command synopsis. .TP \fB\-\-manual\fR -Show this manualpage\&. - +Show this manualpage. .TP \fB\-\-version\fR -Show the xdg\-utils version information\&. - +Show the xdg\-utils version information. .SH "EXIT CODES" - .PP -An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned: - +An exit code of 0 indicates success while a non\-zero exit code indicates failure. The following failure codes can be returned: .TP \fB1\fR -Error in command line syntax\&. - +Error in command line syntax. .TP \fB2\fR -One of the files passed on the command line did not exist\&. - +One of the files passed on the command line did not exist. .TP \fB3\fR -A required tool could not be found\&. - +A required tool could not be found. .TP \fB4\fR -The action failed\&. - +The action failed. .SH "EXAMPLES" - .PP - - .nf - xdg\-screensaver suspend 0x1c00007 - .fi - Causes the screensaver to be disabled till \fBxdg\-screensaver resume 0x1c00007\fR is called\&. \fI0x1c00007\fR must be the X Window ID of an existing window\&. - -.SH "BUGSS" - -.PP -There is no provision for cancelling a suspend operation\&. If a second suspend is started before the first one is completed, then the screensaver will be restored to its original state before the second suspend is able to complete\&. - -.PP -For example, if a presenter completes her presentation, and a second presenter starts before the delay is over, then the screensaver could come on during the second presentation\&. - -.PP -True suspend functionality will require cooperation from the X server\&. The Xorg group has implemented an extension that allows an application to disable the screensaver while it is connected, which will re\-enable the screensaver\&. xdg\-screensaver should be updated to take advantage of this functionality when it is available\&. - -.SH AUTHOR -Bryce Harrington. +.sp +Causes the screensaver to be disabled till +\fBxdg\-screensaver resume 0x1c00007\fR +is called. +\fI0x1c00007\fR +must be the X Window ID of an existing window. +.SH "AUTHOR" +Bryce Harrington. +.br + diff --git a/scripts/xdg-screensaver b/scripts/xdg-screensaver index 567635b..59f46e6 100755 --- a/scripts/xdg-screensaver +++ b/scripts/xdg-screensaver @@ -35,126 +35,102 @@ manualpage() cat << _MANUALPAGE Name - xdg-screensaver -- command line tool for controlling the screensaver +xdg-screensaver — command line tool for controlling the screensaver Synopsis - xdg-screensaver suspend WindowID +xdg-screensaver suspend WindowID - xdg-screensaver restore WindowID +xdg-screensaver restore WindowID - xdg-screensaver { activate | reset | status } +xdg-screensaver { activate | reset | status } - xdg-screensaver { --help | --manual | --version } +xdg-screensaver { --help | --manual | --version } Description - xdg-screensaver provides commands to control the screensaver. +xdg-screensaver provides commands to control the screensaver. - xdg-screensaver is for use inside a desktop session only. It is not - recommended to use xdg-screensaver as root. +xdg-screensaver is for use inside a desktop session only. It is not recommended +to use xdg-screensaver as root. Commands - suspend WindowID - - Suspends the screensaver and monitor power management. WindowID - must be the X Window ID of an existing window of the calling - application. The window must remain in existance for the duration - of the suspension. - - The screensaver can be suspended in relation to multiple windows - at the same time. In that case screensaver operation is only - restored once the suspensions have been restored in relation to - each of the windows - - resume WindowID - Resume the screensaver and monitor power management after being - suspended. WindowID must be the same X Window ID that was passed - to a previous call of xdg-screensaver suspend - - activate - Turns the screensaver on immediately. This may result in the - screen getting locked, depending on existing system policies. - - reset - Turns the screensaver off immediately. This my result in a - password prompt to unlock the screen, depending on existing system - policies. - - status - Returns true if the screensaver is enabled to turn on after a - period of inactivty, or false otherwise. +suspend WindowID + + Suspends the screensaver and monitor power management. WindowID must be the + X Window ID of an existing window of the calling application. The window + must remain in existance for the duration of the suspension. + + WindowID can be represented as either a decimal number or as a hexadecimal + number consisting of the prefix 0x followed by one or more hexadecimal + digits. + + The screensaver can be suspended in relation to multiple windows at the + same time. In that case screensaver operation is only restored once the + suspensions have been restored in relation to each of the windows + +resume WindowID + Resume the screensaver and monitor power management after being suspended. + WindowID must be the same X Window ID that was passed to a previous call of + xdg-screensaver suspend +activate + Turns the screensaver on immediately. This may result in the screen getting + locked, depending on existing system policies. +reset + Turns the screensaver off immediately. This my result in a password prompt + to unlock the screen, depending on existing system policies. +status + Returns true if the screensaver is enabled to turn on after a period of + inactivty, or false otherwise. Options - --help - Show command synopsis. - - --manual - Show this manualpage. - - --version - Show the xdg-utils version information. +--help + Show command synopsis. +--manual + Show this manualpage. +--version + Show the xdg-utils version information. Exit Codes - An exit code of 0 indicates success while a non-zero exit code indicates - failure. The following failure codes can be returned: - - 1 - Error in command line syntax. - - 2 - One of the files passed on the command line did not exist. - - 3 - A required tool could not be found. +An exit code of 0 indicates success while a non-zero exit code indicates +failure. The following failure codes can be returned: - 4 - The action failed. +1 + Error in command line syntax. +2 + One of the files passed on the command line did not exist. +3 + A required tool could not be found. +4 + The action failed. Examples - xdg-screensaver suspend 0x1c00007 - - Causes the screensaver to be disabled till xdg-screensaver resume - 0x1c00007 is called. 0x1c00007 must be the X Window ID of an existing - window. - -Bugss - - There is no provision for cancelling a suspend operation. If a second - suspend is started before the first one is completed, then the screensaver - will be restored to its original state before the second suspend is able - to complete. +xdg-screensaver suspend 0x1c00007 - For example, if a presenter completes her presentation, and a second - presenter starts before the delay is over, then the screensaver could come - on during the second presentation. +Causes the screensaver to be disabled till xdg-screensaver resume 0x1c00007 is +called. 0x1c00007 must be the X Window ID of an existing window. - True suspend functionality will require cooperation from the X server. The - Xorg group has implemented an extension that allows an application to - disable the screensaver while it is connected, which will re-enable the - screensaver. xdg-screensaver should be updated to take advantage of this - functionality when it is available. _MANUALPAGE } usage() { cat << _USAGE - xdg-screensaver -- command line tool for controlling the screensaver +xdg-screensaver — command line tool for controlling the screensaver Synopsis - xdg-screensaver suspend WindowID +xdg-screensaver suspend WindowID - xdg-screensaver restore WindowID +xdg-screensaver restore WindowID - xdg-screensaver { activate | reset | status } +xdg-screensaver { activate | reset | status } - xdg-screensaver { --help | --manual | --version } +xdg-screensaver { --help | --manual | --version } _USAGE } @@ -489,6 +465,11 @@ screensaver_kde() screensaver_gnome() { # TODO +# There seems to be a DBUS interface for gnome-screensaver +# See http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-April/042579.html and +# http://cvs.gnome.org/viewcvs/gnome-screensaver/src/gs-listener-dbus.c?rev=1.36&view=log +# A problem seems to be that Inhibit is tied to the lifetime of the DBUS appname and +# this can not be used from a script return 1 } -- cgit v1.2.3