![]() |
2012-12-30
, 11:14
|
Posts: 592 |
Thanked: 1,167 times |
Joined on Jul 2012
|
#12
|
Cant find any help and http://harmattan-dev.nokia.com/ doesnt work??
Any other pages where you learn simple harmattan developer stuff. =S
Because I want learn these things for future
The Following User Says Thank You to tortoisedoc For This Useful Post: | ||
![]() |
2012-12-30
, 11:17
|
|
Posts: 645 |
Thanked: 519 times |
Joined on Apr 2012
@ Finland
|
#13
|
Not an expert still my two cents
try
Exec=killall openmediaplayer cutetube fennec pulseaudio
please add pulseaudio only when media player is playing or you want to close it
The Following User Says Thank You to Mikkosssss For This Useful Post: | ||
![]() |
2012-12-30
, 11:21
|
|
Posts: 645 |
Thanked: 519 times |
Joined on Apr 2012
@ Finland
|
#14
|
Mikkosssss,
In your exec field you can have it as Exec=/home/user/kill.sh
with kill.sh contents being:
Of course use top to check if those are the process names exactly firstCode:#!/bin/sh 1=cutetube 2=openvideoplayer 3=fennec if ps -ae | grep -v grep | grep "$1" > /dev/null then kill `pgrep -f "$1"` fi if ps -ae | grep -v grep | grep "$2" > /dev/null then kill `pgrep -f "$2"` fi if ps -ae | grep -v grep | grep "$3" > /dev/null then kill `pgrep -f "$3"` fi
![]() |
2012-12-30
, 11:26
|
Posts: 592 |
Thanked: 1,167 times |
Joined on Jul 2012
|
#15
|
I got it working with desktop file.
But if theres way to add message displayed on script I will use script.
The Following 3 Users Say Thank You to tortoisedoc For This Useful Post: | ||
![]() |
2012-12-30
, 14:38
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#16
|
[Desktop Entry] Type=Application Name=LPSswitch Icon=/usr/share/icons/hicolor/80x80/apps/LPSswitch.png Exec=/home/user/LPSswitch.sh
#!/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}
The Following User Says Thank You to Win7Mac For This Useful Post: | ||
![]() |
2012-12-30
, 15:02
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#17
|
SERVICE=PROCESS_NAME if ps -ae | grep -v grep | grep "$SERVICE" > /dev/null then kill `pgrep -f "$SERVICE"` 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:'' uint32:0 else "$SERVICE" & 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:'' uint32:0 fi
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
![]() |
2012-12-30
, 15:09
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#18
|
![]() |
2012-12-30
, 15:11
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#19
|
No, it's only what sounded the most likely...
From here.
![]() |
2012-12-30
, 15:17
|
|
Posts: 645 |
Thanked: 519 times |
Joined on Apr 2012
@ Finland
|
#20
|
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.
Any other pages where you learn simple harmattan developer stuff. =S
Because I want learn these things for future
Last edited by Mikkosssss; 2012-12-30 at 11:01.