View Single Post
Old 11-25-2020, 11:32 PM   #376
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 51,404
Karma: 179640714
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by blackwalrus View Post
In two lines (on / off) everything works, but it clutters the menu, incorrectly and ugly.
Can you try this and see if it works for you:

Code:
#
menu_item :main :Screensaver Status :cmd_output :500:quiet:test -e /mnt/onboard/.kobo/screensaver_old
      chain_success  : dbg_toast :Screensaver is off
      chain_failure  : dbg_toast :Screensaver is on
#
menu_item :main :Toggle screensaver :cmd_output :500:quiet:test -e /mnt/onboard/.kobo/screensaver_old
    chain_failure :skip :3
        chain_success :cmd_spawn :quiet:mv /mnt/onboard/.kobo/screensaver_old /mnt/onboard/.kobo/screensaver
        chain_success :dbg_toast :Screensaver on
        chain_always :skip :-1
    chain_failure :cmd_spawn :quiet:mv /mnt/onboard/.kobo/screensaver /mnt/onboard/.kobo/screensaver_old
    chain_success :dbg_toast :Screensaver off
#
The screen saver status echo was just to allow me to check if the status had been toggled so can be removed.

Edit: Also note that I set this in my Main/homepage menu.

Last edited by DNSB; 11-25-2020 at 11:37 PM. Reason: Note about menu
DNSB is offline   Reply With Quote