View Single Post
Posts: 36 | Thanked: 1 time | Joined on Dec 2011 @ Lahore, PK
#1575
Originally Posted by Ancelad View Post
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

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
As you can see this script will use 3 parameters:
$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) into
Code:
/home/user/MyDocs/.AmberClock
and go to ProfileMatic. Choose rule you need, set time and days, then go into More - Actions - Custom Action.
http://i.piccy.info/i7/b4fd839c620b8...111024_500.jpghttp://i.piccy.info/a3/2013-07-04-05...81x500-r/i.gif

When rule activates:
Code:
sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh 980016 BOLD 13'"
And click test. After some seconds you'll see your new lowpower clock.
http://i.piccy.info/i7/45919d154d945...105608_500.jpghttp://i.piccy.info/a3/2013-07-04-05...81x500-r/i.gif

When rule deactivates:
Code:
sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh FFFFFF LIGHT 10'"
And click test. After some seconds you'll see your default lowpower clock
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 into
Code:
/home/user/MyDocs/.AmberClock/default/
Then apply new colors and put new icons into
Code:
/home/user/MyDocs/.AmberClock/amber/
Then you need to change AmberClock.sh like this
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
New parameter:
$4 - amber or default

So, ProfileMatic command lines will be
When rule activates:
Code:
sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh 980016 BOLD 13 amber'"
And click test. After some seconds you'll see your new lowpower clock and icons.

When rule deactivates:
Code:
sh -c "echo rootme | devel-su -c '/home/user/MyDocs/.AmberClock/AmberClock.sh FFFFFF LIGHT 10 default'"
And click test. After some seconds you'll see your default lowpower clock and icons.

Enjoy

I am following the same instruction but is not working for me using blanco theme, can u please help me,

sencondly, can I make rule to set the brightness to auto and manual using status menue extentions
__________________
----------------------------------

Nokia N9 Black 64gb Prime
Nokia Lumia 720
Nokia N900 Show Piece