The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2014-02-10
, 23:13
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1572
|
Can you put a new condition: GPS ON / GPS OFF ?
I need this to stop gprs when I use navi to reduce power consumption when walking. When travel by car I use power from my car.
So I want a rule like this:
Conditions: GPS is ON and Charging is OFF
Action: Custom action for stopping data
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2014-02-10
, 23:23
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1573
|
@ajalkane can you please make that i can set time condition more than one time, this is my problem: (i didn't want to create two different rules for just one action) e.g. on monday and saturday go silent from 14:00 to 19:00 other days from 8:00 to 15:00
can you? thanks
![]() |
2014-02-11
, 19:44
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1574
|
Thanks, good stuff here... I failed doing this trying to use to official Bluetooth APIs. My next step would have been to try by trying to spy the DBus APIs, but I lost motivation as I had used so much time trying to make the code work already.
But if this works, it might be relatively straight-forward (yet unfortunately still time-consuming) to use this code to include Bluetooth condition into ProfileMatic.
The Following User Says Thank You to slarti For This Useful Post: | ||
![]() |
2014-02-24
, 10:30
|
Posts: 36 |
Thanked: 1 time |
Joined on Dec 2011
@ Lahore, PK
|
#1575
|
Hmm, there is one nice idea in Nokia Amber (GDR2) Update for Windows Phone - sleeping clock (night clock). This mean lowpower screen clock changes it's brightness and color to dark-red (as I see). So, I've made it for our Nokia N9 using ProfileMatic.
Make AmberClock.sh
As you can see this script will use 3 parameters:Code:#!/bin/sh #call AmberClock.sh color font size sed -i "/LockScreen MLabelStyle#LockScreenLowPowerModeClockLabel {/,/color/c\\ LockScreen MLabelStyle#LockScreenLowPowerModeClockLabel {\\ font: \$FONT_FAMILY_"$2" "$3"mm;\\ color: #"$1"; " /usr/share/themes/base/meegotouch/libsysuid-screenlock-nokia/style/libsysuid-screenlock-nokia.css sleep 1 && /sbin/initctl stop xsession/sysuid && sleep 1 && /sbin/initctl start xsession/sysuid
$1 - your clock color (RGB)
$2 - font style (BOLD or LIGHT)
$3 - font size in mm (12 or 13 is good I think)
Then put it (for example) intoand go to ProfileMatic. Choose rule you need, set time and days, then go into More - Actions - Custom Action.Code:/home/user/MyDocs/.AmberClock
http://i.piccy.info/i7/b4fd839c620b8...111024_500.jpghttp://i.piccy.info/a3/2013-07-04-05...81x500-r/i.gif
When rule activates:
And click test. After some seconds you'll see your new lowpower clock.Code:sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh 980016 BOLD 13'"
http://i.piccy.info/i7/45919d154d945...105608_500.jpghttp://i.piccy.info/a3/2013-07-04-05...81x500-r/i.gif
When rule deactivates:
And click test. After some seconds you'll see your default lowpower clockCode:sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh FFFFFF LIGHT 10'"
http://i.piccy.info/i7/5a0f76c94cc2d...105734_500.jpghttp://i.piccy.info/a3/2013-07-04-05...81x500-r/i.gif
Also you can change lowpower icons such as beep-icon etc.. Put default icons intoThen apply new colors and put new icons intoCode:/home/user/MyDocs/.AmberClock/default/Then you need to change AmberClock.sh like thisCode:/home/user/MyDocs/.AmberClock/amber/
New parameter:Code:#!/bin/sh #call AmberClock.sh color font size icons sed -i "/LockScreen MLabelStyle#LockScreenLowPowerModeClockLabel {/,/color/c\\ LockScreen MLabelStyle#LockScreenLowPowerModeClockLabel {\\ font: \$FONT_FAMILY_"$2" "$3"mm;\\ color: #"$1"; " /usr/share/themes/base/meegotouch/libsysuid-screenlock-nokia/style/libsysuid-screenlock-nokia.css cp -rf /home/user/MyDocs/.AmberClock/"$4"/*.png /usr/share/themes/blanco/meegotouch/icons sleep 1 && /sbin/initctl restart xsession/sysuid
$4 - amber or default
So, ProfileMatic command lines will be
When rule activates:
And click test. After some seconds you'll see your new lowpower clock and icons.Code:sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh 980016 BOLD 13 amber'"
When rule deactivates:
And click test. After some seconds you'll see your default lowpower clock and icons.Code:sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh FFFFFF LIGHT 10 default'"
Enjoy
![]() |
2014-02-25
, 07:18
|
|
Posts: 1,552 |
Thanked: 3,108 times |
Joined on Jun 2012
@ Russia, 96
|
#1576
|
![]() |
2014-02-25
, 19:10
|
Posts: 36 |
Thanked: 1 time |
Joined on Dec 2011
@ Lahore, PK
|
#1577
|
Make sure that your password is rootme. This script works with any theme
![]() |
2014-02-26
, 04:09
|
|
Posts: 1,552 |
Thanked: 3,108 times |
Joined on Jun 2012
@ Russia, 96
|
#1578
|
chmod +x /home/user/MyDocs/.AmberClock/AmberClock.sh
![]() |
2014-02-26
, 10:55
|
Posts: 36 |
Thanked: 1 time |
Joined on Dec 2011
@ Lahore, PK
|
#1579
|
![]() |
2014-02-26
, 10:57
|
|
Posts: 1,552 |
Thanked: 3,108 times |
Joined on Jun 2012
@ Russia, 96
|
#1580
|
But if this works, it might be relatively straight-forward (yet unfortunately still time-consuming) to use this code to include Bluetooth condition into ProfileMatic.
My N9/N950 projects: