# Monitor blanking

**URL:** <https://forum.maboxlinux.org/t/monitor-blanking/654>\
**Category:** Scripts, Tutorials & Tips\
**Created:** [October 12, 2021, 11:54am UTC](https://forum.maboxlinux.org/t/monitor-blanking/654 "2021-10-12T11:54:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![piquet](https://forum.maboxlinux.org/letter_avatar_proxy/v4/letter/p/7bcc69/32.png) [@piquet](https://forum.maboxlinux.org/u/piquet)\
**Post date:** [October 12, 2021, 11:54am UTC](https://forum.maboxlinux.org/t/monitor-blanking/654/1 "2021-10-12T11:54:33Z")

</div>

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

```auto
~ $ 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:

```auto
#!/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

```

 ![noblank](https://forum.maboxlinux.org/uploads/default/original/1X/b296c1d2b3ab9086b6993cbfb410028b82a6ac94.jpeg)

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

---

<div class="post-metadata">

**Author:** ![napcok](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/napcok/32/410_2.png) [@napcok](https://forum.maboxlinux.org/u/napcok)\
**Post date:** [October 12, 2021, 12:54pm UTC](https://forum.maboxlinux.org/t/monitor-blanking/654/2 "2021-10-12T12:54:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![piquet](https://forum.maboxlinux.org/letter_avatar_proxy/v4/letter/p/7bcc69/32.png) [@piquet](https://forum.maboxlinux.org/u/piquet)\
**Post date:** [October 12, 2021, 5:30pm UTC](https://forum.maboxlinux.org/t/monitor-blanking/654/3 "2021-10-12T17:30:39Z")

</div>

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 🕶

---

<div class="post-metadata">

**Author:** ![napcok](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/napcok/32/410_2.png) [@napcok](https://forum.maboxlinux.org/u/napcok)\
**Post date:** [October 13, 2021, 10:43am UTC](https://forum.maboxlinux.org/t/monitor-blanking/654/4 "2021-10-13T10:43:48Z")

</div>

Pushed to repo as update:

```auto
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.

 ![rcxml_update](https://forum.maboxlinux.org/uploads/default/original/1X/3156cd30995911b14228fe058aa36520c9dd9c85.jpeg)

 ![notifications](https://forum.maboxlinux.org/uploads/default/original/1X/0f910f05d79ccbd67ed211f5129e8d4958afdec1.jpeg)

---

<div class="post-metadata">

**Author:** ![sng](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/sng/32/445_2.png) [@sng](https://forum.maboxlinux.org/u/sng)\
**Post date:** [October 14, 2021, 9:47am UTC](https://forum.maboxlinux.org/t/monitor-blanking/654/5 "2021-10-14T09:47:59Z")

</div>

Just as an alternative, or a source for enhancement…

I have been using this one for years

> **[GitHub - iye/lightsOn: Bash script that prevents the screensaver and...](https://github.com/iye/lightsOn)**
>
> Bash script that prevents the screensaver and display power # management (DPMS) to be activated when you are watching Flash Videos fullscreen on Firefox.
