diff options
-rw-r--r-- | system/xssstate/README | 22 | ||||
-rw-r--r-- | system/xssstate/README.Slackware | 86 | ||||
-rw-r--r-- | system/xssstate/xssstate.SlackBuild | 2 |
3 files changed, 89 insertions, 21 deletions
diff --git a/system/xssstate/README b/system/xssstate/README index 290efb5b65..ac55532394 100644 --- a/system/xssstate/README +++ b/system/xssstate/README @@ -1,5 +1,5 @@ xssstate ------------------------------------- +-------- This is the xssstate utility from suckless.org. @@ -7,21 +7,5 @@ This tool is a simple tool that retrieves the X screensaver state. This can be used in scripts that can start screen lockers, or other utilities. -The screensaver states include the idle time, the screensaver state, -and the time how long to wait until the screensaver should be active. - -The values for the screensaver states in X can be changed using -xset(1). - -Turn off the screensaver: - - % xset s 0 - % xset s 0ff - -Turn on the screensaver after 60 seconds inactivity: - - % xset s 60 - -Force the screensaver to be active: - - % xset s blank +For more inforamtion on why this package exists, and for +an example how to use it is detailed in the README.Slackware file. diff --git a/system/xssstate/README.Slackware b/system/xssstate/README.Slackware new file mode 100644 index 0000000000..d53c41923d --- /dev/null +++ b/system/xssstate/README.Slackware @@ -0,0 +1,86 @@ +xssstate +-------- + +This is the xssstate utility from suckless.org. + +This tool is a simple tool that retrieves the X screensaver state. +The screensaver states include the idle time, the screensaver state, +and the time how long to wait until the screensaver should be active. + +The values for the screensaver states in X can be changed using +xset(1). + +Turn off the screensaver: + + % xset s 0 + % xset s 0ff + +Turn on the screensaver after 60 seconds inactivity: + + % xset s 60 + +Force the screensaver to be active: + + % xset s blank + +For more options, see xset(1). + +Why +--- + +I created this package, because I needed this one utility to control +my screensaver and lock my screen with a simple tool. + +The same utility is bundled in the suckless-tools package on +slackbuilds.org. If you need the other utilities in that package, +you can use that. B. Watson did a nice job including these +into one package. + +I did not have use for the other utilities in that package, and +have created this package. + +Example usage +------------- + +In the section below, an xss_idle.sh script is given. This script +is an example on how to use this for a background service that +will control your screensaver. This can be used to invoke xlock(1) +using the following command. + + % xss_idle.sh xlock & + +This can be usefull in your $HOME/.xinitrc file. + +You can also use slock, or any other utility that can lock the +screen. + +Example script: xss_idle.sh +--------------------------- + +#!/bin/sh +# +# Use xset s $time to control the timeout when this will run. +# + +if [ $# -lt 1 ]; +then + printf "usage: %s cmd\n" "$(basename $0)" 2>&1 + exit 1 +fi +cmd="$@" + +while true +do + if [ $(xssstate -s) != "disabled" ]; + then + tosleep=$(($(xssstate -t) / 1000)) + if [ $tosleep -le 0 ]; + then + $cmd + else + sleep $tosleep + fi + else + sleep 10 + fi +done diff --git a/system/xssstate/xssstate.SlackBuild b/system/xssstate/xssstate.SlackBuild index 6c85e6a2f9..e77063258d 100644 --- a/system/xssstate/xssstate.SlackBuild +++ b/system/xssstate/xssstate.SlackBuild @@ -101,8 +101,6 @@ cd $PKG # Inform user that there is a xssstate already on the system and that this has # to be removed before installing this package -#which xssstate > /dev/null 2>&1 -#path_to_utility=$(which xssstate) path_to_utility="/usr/bin/xssstate" if [ -f ${path_to_utility} ] then |