diff options
Diffstat (limited to 'remote/modules/screen-standby')
6 files changed, 50 insertions, 0 deletions
diff --git a/remote/modules/screen-standby/data/etc/X11/Xreset.d/screen-standby b/remote/modules/screen-standby/data/etc/X11/Xreset.d/screen-standby new file mode 120000 index 00000000..b25fe082 --- /dev/null +++ b/remote/modules/screen-standby/data/etc/X11/Xreset.d/screen-standby @@ -0,0 +1 @@ +/opt/openslx/scripts/screen-standby
\ No newline at end of file diff --git a/remote/modules/screen-standby/data/etc/X11/Xsession.d/screen-standby b/remote/modules/screen-standby/data/etc/X11/Xsession.d/screen-standby new file mode 120000 index 00000000..b25fe082 --- /dev/null +++ b/remote/modules/screen-standby/data/etc/X11/Xsession.d/screen-standby @@ -0,0 +1 @@ +/opt/openslx/scripts/screen-standby
\ No newline at end of file diff --git a/remote/modules/screen-standby/data/etc/X11/Xsetup.d/screen-standby b/remote/modules/screen-standby/data/etc/X11/Xsetup.d/screen-standby new file mode 120000 index 00000000..b25fe082 --- /dev/null +++ b/remote/modules/screen-standby/data/etc/X11/Xsetup.d/screen-standby @@ -0,0 +1 @@ +/opt/openslx/scripts/screen-standby
\ No newline at end of file diff --git a/remote/modules/screen-standby/data/opt/openslx/scripts/screen-standby b/remote/modules/screen-standby/data/opt/openslx/scripts/screen-standby new file mode 100755 index 00000000..74a09556 --- /dev/null +++ b/remote/modules/screen-standby/data/opt/openslx/scripts/screen-standby @@ -0,0 +1,29 @@ +#!/bin/ash + +# This is usually sourced by Xstartup/session/reset + +do_standby_stuff () { + . /opt/openslx/config + # Make sure SLX_SCREEN_STANDBY_TIMEOUT is numeric + TO=${SLX_SCREEN_STANDBY_TIMEOUT} + [ -z "${TO}" ] && TO=0 + [ "${TO}" -gt 0 ] || [ "${TO}" -lt 100 ] || TO=600 + [ "${TO}" -lt 0 ] && TO=0 + MIN=$(( TO / 60 )) + [ "$MIN" -gt 60 ] && MIN=60 + # Set + setterm -blank "$MIN" + setterm -powerdown "$MIN" + if [ "${TO}" = 0 ]; then + # Off + xset s "${TO}" "${TO}" + xset s off -dpms + else + xset +dpms + xset s "${TO}" "${TO}" + fi +} + +do_standby_stuff & +true + diff --git a/remote/modules/screen-standby/module.build b/remote/modules/screen-standby/module.build new file mode 100644 index 00000000..435a7b10 --- /dev/null +++ b/remote/modules/screen-standby/module.build @@ -0,0 +1,13 @@ +fetch_source() { + : +} + +build() { + COPYLIST="list_dpkg_output" + list_packet_files > "$COPYLIST" + tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" +} + +post_copy() { + : +} diff --git a/remote/modules/screen-standby/module.conf b/remote/modules/screen-standby/module.conf new file mode 100644 index 00000000..96ca18d4 --- /dev/null +++ b/remote/modules/screen-standby/module.conf @@ -0,0 +1,5 @@ +REQUIRED_BINARIES=" +" +REQUIRED_LIBRARIES="" +REQUIRED_DIRECTORIES=" +" |