I recently upgraded from 14.04 Trusty to 16.04 Xenial. Prior to the upgrade, I used the caffeine-plus
indicator icon to tell the my laptop when it could sleep. The mode I normally used was to have Caffeine enabled so the computer would only sleep/suspend when the lid was closed. However, there were occasions when I wanted to be able to let the idle timer have its intended effect.
Since the upgrade, Caffeine doesn't appear to do anything anymore. I can leave my computer with a long-running process, deliberately keeping the lid open, only to come back to find it sleeping and the process unfinished.
How can I get the previous behavior back? Note that I'm looking for a toggle, not a permanent change. As a toggle, it should have a visual indication as to whether it's enabled or not. An indicator icon would be great.
Note
The searching I did prior to asking this question turned up either: a) old (outdated) posts about how to use Caffeine, or b) permanently disabling sleep to work around various hardware bugs. My question is simply about restoring the functionality I had in 14.04, a topic I didn't find addressed.
^L
. If whatever is listening for keypresses ignores that combination, it does nothing. But if some app recognizes^L
, then whatever action is specified will be taken. However, changing the command toxdotool key Control
will probably solve that; I don't know of anything that does anything significance in response to a bare Ctrl keypress. – Scott Severance May 06 '16 at 06:17Control_L
= left Ctrl key, not L capital (please check withxev
), and is meaningless when pressed alone. Since it only presses when idle, it is pressed alone. – Jacob Vlijm May 06 '16 at 06:19^L
. Anyway, while your answer is definitely helpful, this question isn't a duplicate, as my edit hopefully clarified. A toggle is pretty much useless unless there's a way to determine its state (beyond issuing aps
command. I can, of course, write an indicator into the script, and I may do so, but an answer to this question would include something that could be just dropped in. – Scott Severance May 06 '16 at 06:24