diff options
author | Waldo Bastian <waldo.bastian@intel.com> | 2006-06-25 22:36:58 +0000 |
---|---|---|
committer | Waldo Bastian <waldo.bastian@intel.com> | 2006-06-25 22:36:58 +0000 |
commit | 34c0a30213f231c4323705c66bbc213437903761 (patch) | |
tree | 8856ebf83310a3a71808e0095758b41083127d89 /scripts | |
parent | 6f510ee9603074d9e3efcf2a65d37578f8c2092b (diff) |
* Describe format of WindowID
* Remove Bugss section
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desc/xdg-screensaver.xml | 28 | ||||
-rw-r--r-- | scripts/html/xdg-screensaver.html | 23 | ||||
-rw-r--r-- | scripts/man/xdg-screensaver.1 | 154 | ||||
-rwxr-xr-x | scripts/xdg-screensaver | 147 |
4 files changed, 129 insertions, 223 deletions
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 @@ -78,6 +78,12 @@ must remain in existance for the duration of the suspension. </simpara> <simpara> + WindowID can be represented as either a decimal number + or as a hexadecimal number consisting of the prefix + <emphasis>0x</emphasis> followed by one or more hexadecimal + digits. + </simpara> + <simpara> 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 @@ -215,26 +221,4 @@ xdg-screensaver suspend 0x1c00007 existing window. </para> </refsect1> - <refsect1 id="bugs"> - <title>Bugss</title> - <para> - 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. - </para> - <para> - 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. - </para> - <para> - 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. - </para> - </refsect1> </refentry> 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 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-screensaver</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-screensaver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-screensaver — command line tool for controlling the screensaver</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">suspend <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">restore <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">activate</code> | <code class="option">reset</code> | <code class="option">status</code> }</p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-screensaver</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-screensaver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-screensaver — command line tool for controlling the screensaver</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">suspend <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">restore <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">activate</code> | <code class="option">reset</code> | <code class="option">status</code> }</p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p> xdg-screensaver provides commands to control the screensaver. </p><p> xdg-screensaver is for use inside a desktop session only. @@ -9,6 +9,11 @@ of an existing window of the calling application. The window must remain in existance for the duration of the suspension. </p><p> + WindowID can be represented as either a decimal number + or as a hexadecimal number consisting of the prefix + <span class="emphasis"><em>0x</em></span> followed by one or more hexadecimal + digits. + </p><p> 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 @@ -54,20 +59,4 @@ xdg-screensaver suspend 0x1c00007 <span><strong class="command">xdg-screensaver resume 0x1c00007</strong></span> is called. <span class="emphasis"><em>0x1c00007</em></span> must be the X Window ID of an existing window. - </p></div><div class="refsect1" lang="en"><a name="bugs"></a><h2>Bugss</h2><p> - 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. - </p><p> - 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. - </p><p> - 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. </p></div></div></body></html> 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 +<bryce@osdl.org> 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 } |