In case anyone is still watching this thread, the screensaver lock portion of this is working, but I am finding that the screen will slightly dim after a period of time (no screensaver), but the active application is no longer showing on the screen (it loses focus and just dims). Hitting any key, bring it back to the app. What I'm after here is "always on," even if there is no activity.
Here is the current script, that I added:
Code: Select all
gsettings set org.cinnamon.settings-daemon.plugins.power sleep-display-ac '14400'
Note that I had set this to 14400, in that I might do a session that lasts this long, but it doesn't not do what I want it to do, nor did "0" in this setting,
Below, is a screenshot of all the org.cinnamon.settings-daemon.plugins.power variables, so perhaps I have chosen the wrong settings. Any tweaks are appreciated.
Code: Select all
#!/bin/bash
# get the current setting of the screensaver lock
lock_enabled=$(gsettings get org.cinnamon.desktop.screensaver lock-enabled)
# if the command failed, abort
[[ $? -eq 0 ]] || exit 1
# if the program was invoked with 'status' argument, just notify user of current status
if [[ $# -eq 1 && $1 = 'status' ]]; then
if [[ $lock_enabled = 'true' ]]; then
zenity --notification --text "Screensaver lock is disabled. Jam on!"
else
zenity --notification --text "Screensaver lock is enabled."
fi
exit
fi
# toggle the screensaver lock, and suspend lock along with it, and notify the user of new status
if [[ $lock_enabled = 'true' ]]; then
# currently enabled so disable it
gsettings set org.cinnamon.desktop.screensaver lock-enabled 'false'
gsettings set org.cinnamon.settings-daemon.plugins.power lock-on-suspend 'false'
# added to handle display turning off
gsettings set org.cinnamon.settings-daemon.plugins.power sleep-display-ac '14400'
zenity --notification --text "Screensaver lock disabled. Jam on!"
else
# currently disabled so enable it
gsettings set org.cinnamon.desktop.screensaver lock-enabled 'true'
gsettings set org.cinnamon.settings-daemon.plugins.power lock-on-suspend 'true'
# added to handle display turning off
gsettings set org.cinnamon.settings-daemon.plugins.power sleep-display-ac '1800'
zenity --notification --text "Screensaver lock enabled."
fi