Turn Off Monitor

System Runners

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.7

Description:
This simple desktop file allows you to "turn off" the monitor (put it into sleep mode) as well as turning off the backlight if you own a laptop.

To install follow these instructions:
If you want it to be an icon in a panel:
- Open the folder where you downloaded the TurnOffMonitor.desktop file
- Drag the file to the panel

If you want it to behave like a regular program that you can call from krunner (Alt+F2):
- Right click the "Application Launcher" widget (the K icon in your panel) and select "Menu Editor"
- Drag the TurnOffMonitor.desktop file to the category you choose.

If when you download the file it opens up in a new window on your browser instead of downloading to your computer, try the "Save page as..." option in your browser and save it somewhere where you can find it. Then follow the instructions above.

If you found this useful, please vote!

Ratings & Comments

11 Comments

DigitalCookieMonster

For those of you that are on KDE5, here's the shell script to lock your screen and also turn off your monitors. #!/bin/sh loginctl lock-session sleep 0.5 xset dpms force off To use this, open up notepad, copy the above code and then save it as KDE5lock.sh. Pick any name you want, just make sure it has the .sh as the file extension. Give it the permission to be executed throuh Dolphin or your prefered file manager and then either put it somewhere you can easily click on, or connect it to a keybaord shortcut. (Meta+L) is my personal preference.

DigitalCookieMonster

edit: Use this instead, there's no .5 second delay between the screen locking and the monitor being turned off. #!/bin/sh sleep 0.5 loginctl lock-session xset dpms force off

TranquilWaters

exactly what I needed, thanks! +1

ilpianista

How to lock the screen too?

Sciamano72

Simple and useful. Thanks!

tog000

I'm glad you liked it :D!

panzi

I made a similar thing. I wrote a tiny shell script: #!/bin/sh sleep 0.5 xset dpms force off And assigned it to a global hotkey ("Pause"). The sleep is needed because hitting any key turns the monitor on again and without the sleep somehow the keypress for the hotkey itself turned the monitor on again.

tog000

Yes, thats exactly how this works, i had almost the exact same script before and i assigned it a shortcut, just how you did it. But, from a user point of view, I think its easier to add it to the menu using the "Menu Editor" and once there you can configure a shortcut to launch it and that can be done graphically. One could also create the shortcut directly using [i]khotkeys[i], but you should make sure the script never changes place, and i found that after every "cleanup" some things would stop working because I deleted the scripts... Adding it to the menu, moves the desktop file inside the .local folder, where its virtually impossible to accidentally delete it. Glad you liked it, and yes, we are running the same code, different launcher :D

tog000

Yes, thats exactly how this works, i had almost the exact same script before and i assigned it a shortcut, just how you did it. But, from a user point of view, I think its easier to add it to the menu using the "Menu Editor" and once there you can configure a shortcut to launch it and that can be done graphically. One could also create the shortcut directly using khotkeys, but you should make sure the script never changes place, and i found that after every "cleanup" some things would stop working because I deleted the scripts... Adding it to the menu, moves the desktop file inside the .local folder, where its virtually impossible to accidentally delete it. Glad you liked it, and yes, we are running the same code, different launcher :D

nicovai

I find this a great idea. I think it would be even better if you make a plasmoid out of it, so that one can have a "Turn off monitor" button on the desktop. Greetings!

tog000

Thanks nicovai! I'm glad you liked it! If you want it to live on your desktop, try dragging the .desktop file to the desktop! An icon will appear (thats what I call KDE4 goodness!), that you can resize and do the same things you would to a plasmoid. There was a "turn off screen and suspend" plasmoid that I used for a while, but it was a little obtrusive to my taste because you couldn't make it smaller than 200x100px, so I opted to use this approach. Hope you can make it work the way you intend it. Thanks!

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other System Runners:

BeClock Countdown Runner
terrorbaby92
last update date: 14 years ago

Score 5.8

Addon Runners for KRunner
dilettante
last update date: 16 years ago

Score 5.7

ClockCalc Runner
LukSch
last update date: 14 years ago

Score 6.8

Character Runner
KAnton
last update date: 15 years ago

Score 5.7

QuickSand
dilettante
last update date: 16 years ago

Score 5.0

Timer and Alarm for KRunner
enchant
last update date: 10 years ago

Score 7.8