Monitor blanking

My monitor is set to blank after 10 minutes (600 secs).
This can be verified by:

~ $ xset q | grep Standby
Standby: 600    Suspend: 600    Off: 600

This is fine for normal use but is definitely annoying when watching a movie.
To temporarily toggle screen blanking I use the following script I named noblank:

#!/usr/bin/env bash

if (xset q|grep --quiet "DPMS is Enabled");
then
    xset s off -dpms
    notify-send -i info -t 5000 'DPMS' 'Monitor blanking is DISABLED'
else
	xset s on +dpms
    notify-send -i info -t 5000 'DPMS' 'Monitor blanking is ENABLED'
fi

This is bound to Win + Alt + B

Blanking will be restored after a logout/reboot

More info on DPMS here:
https://wiki.archlinux.org/title/Display_Power_Management_Signaling

4 Likes

Hi @piquet
Actually similiar script is shipped by Mabox in ~/bin/noblank but yours is better (notifications) :slight_smile:
I think it is a good idea to include it in Mabox with notifications and also with keybind preconfigured.
Thanks :slight_smile:

2 Likes

This was probably a modification of your original as I don’t recall when I coded it.
Glad you like my changes though .

Keep up the good work, this is turning out to be a very special distribution :sunglasses:

1 Like

Pushed to repo as update:

rm ~/bin/noblank       # delete old script
yay                    # update all packages
mb-reset -c obrcxml    # GUI compare rc.xml with new one, and pick changes
openbox --reconfigure  # let Openbox read changed rc.xml

Test it: win + alt +b
By the way, Picom composer switching win + pgot notifications as well.

1 Like

Just as an alternative, or a source for enhancement…

I have been using this one for years

3 Likes