NAME App::SetScreensaverTimeout - Set screensaver timeout VERSION This document describes version 0.07 of App::SetScreensaverTimeout (from Perl distribution App-SetScreensaverTimeout), released on 2014-12-08. FUNCTIONS get_screensaver_timeout() -> [status, msg, result, meta] Get screensaver timeout (in minutes). Provide a common way to get screensaver timeout setting. Support several screen savers (see "set_screensaver_timeout"). No arguments. Return value: Returns an enveloped result (an array). First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information. Timeout value, in minutes (float) set_screensaver_timeout(%args) -> [status, msg, result, meta] Set screensaver timeout. Provide a common way to quickly set screensaver timeout. Will detect the running screensaver/desktop environment and set accordingly. Supports xscreensaver, gnome-screensaver, and KDE screen locker. Support for other screensavers will be added in the future. * xscreensaver To set timeout for xscreensaver, the program finds this line in "~/.xscreensaver": timeout: 0:05:00 modifies the line, save the file, and HUP the xscreensaver process. * gnome-screensaver To set timeout for gnome-screensaver, the program executes this command: gsettings set org.gnome.desktop.session idle-delay 300 * KDE To set timeout for the KDE screen locker, the program looks for this line in "~/.kde/share/config/kscreensaverrc": Timeout=300 modifies the line, save the file. Arguments ('*' denotes required arguments): * timeout => *str* Value, default in minutes. Return value: Returns an enveloped result (an array). First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information. (any) KNOWN BUGS * Sometimes fail to lock on KDE KDE is supposed to pick up on the changes in `~/.kde/share/config/kscreensaverrc` immediately, and this is confirmed by running the dialog `kcmshell4 screensaver`. However, sometimes the change does not take effect and the screensaver won't trigger even after the timeout has long passed. HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 2014 by perlancar@cpan.org. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.