View Single Post
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#16
Hi,

I'm trying to put a script together for a desktopfile that turns standby screen on/off.
The idea is to have an icon in home screen that switches between the regular standby screen with clock, notifications and billboard and a blank black one.
In settings>phone>display> there is an option to turn standby screen off, but I wonder if it is really disabling it or just sets it to blank.
A notification via dbus (like tortoisedoc suggested) to display if its active or passive would be nice.
As you can guess from my name, I'm not into Linux at all.
So far I only have some breadcrumbs of code, so please help putting this right.
Here's what I have in mind:

LPSswitch.desktop:
Code:
[Desktop Entry]
Type=Application
Name=LPSswitch
Icon=/usr/share/icons/hicolor/80x80/apps/LPSswitch.png
Exec=/home/user/LPSswitch.sh
LPSswitch.sh:
Code:
#!/bin/sh

if {standby screen on}
then {kill com.nokia.systemui.ScreenLock}
and {dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:'standby screen off' string:'' string:'icon-m-toolbar-done' uint32:0}

if {standby screen off}
then {exec com.nokia.systemui.ScreenLock}
and {dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:'standby screen on' string:'' string:'icon-m-toolbar-done' uint32:0}
I can't wait to get this to work. I will then put up a new thread and present it like an app.
Thank you.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 

The Following User Says Thank You to Win7Mac For This Useful Post: