jueves, 5 de enero de 2017

Open your favorite text editor and write this:

#!/bin/bash

sleep 1
mate-screensaver-command -a
xset dpms force off
exit 0

Save as 'displayoff.sh' in /home/YOUR_USER_NAME/.Scripts

1. CREATING A LAUNCHER

Create a launcher in the panel.

Mouse right click, add to panel, personal launcher, add. In the open box, write:

Application: Turn off screen
Command: sh /home/YOUR_USER_NAME/.Scripts/displayoff.sh
Comment: Turn off the screen



Now, with a single mouse left click we can turn off the screen.

2. KEYBOARD SHORTCUT

Go to System - Preferences - Keyboard shortcut.

In the window opened, select "add".



In the open box write this:

Name: Display turn off
Command: sh /home/YOUR_USER_NAME/.Scripts/displayoff.sh




Select "apply". Now, select a keyboard shortcut pressing two keys at the same time; for example, WINDOWS Key (Mod4) + F2


Close the window.

That's all.

Tuxkernel...

SOURCE:

https://bbs.archlinux.org/viewtopic.php?id=175753