slarti
|
2013-01-19
, 19:32
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#541
|
|
2013-01-19
, 19:38
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#542
|
#!/bin/sh status=$(qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/bme org.freedesktop.Hal.Device.GetProperty battery.charge_level.percentage) if [[ $status -ge 50 ]] then echo -n "{{green}}" fi if [[ $status -ge 25 && $status -le 49 ]] then echo -n "{{yellow}}" fi if [[ $status -le 24 ]] then echo -n "{{red}}" fi echo -n " $status % " if [[ $status -eq 100 ]] then echo -n "{{=1.0}}" else echo -n "{{=0.$status}}" fi
|
2013-01-19
, 21:02
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#543
|
|
2013-01-21
, 09:25
|
Posts: 63 |
Thanked: 75 times |
Joined on Jul 2012
@ Austria
|
#544
|
|
2013-01-21
, 10:08
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#545
|
#!/bin/sh status=$(qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/bme org.freedesktop.Hal.Device.GetProperty battery.charge_level.percentage) if [[ $status -ge 50 ]] then echo -n "{{green}} Battery $status % " "{{=0.$status}}" else if [[ $status -ge 25 && $staus -le 49 ]] then echo -n "{{yellow}} Battery $status % " "{{=0.$status}}" else if [[ $status -le 24 ]] then echo -n "{{red}} Battery $status % " "{{=0.$status}}" fi fi fi
#!/bin/sh # Reflect Data usage or warn if <20% left # tx=$(gconftool -g /cellui/settings/datacounter/transfer/gprs_home_tx_bytes) rx=$(gconftool -g /cellui/settings/datacounter/transfer/gprs_home_rx_bytes) totalMB=$((($tx+$rx)/1000000)) avail=$(gconftool -g /cellui/settings/datacounter/general/gprs_home_notification_period_UI) availMB=$(($avail/1000000)) usage=$(($totalMB*100/$availMB)) if [ $usage -ge 80 ] then echo {{red}}"Data < 20%" "{{=0.$usage}}" else echo {{cyan}}"Data $totalMB MB" "{{=0.$usage}}" fi
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
|
2013-01-23
, 20:09
|
Posts: 239 |
Thanked: 70 times |
Joined on Oct 2010
@ Germany
|
#546
|
|
2013-01-23
, 21:20
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#547
|
The Following User Says Thank You to Win7Mac For This Useful Post: | ||
|
2013-01-23
, 22:27
|
Posts: 239 |
Thanked: 70 times |
Joined on Oct 2010
@ Germany
|
#548
|
|
2013-01-24
, 21:09
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#549
|
#!/bin/sh percent=$(qdbus --system com.nokia.csd /com/nokia/csd/csnet com.nokia.csd.CSNet.SignalStrength.SignalPercent) if [[ $percent -ge 25 ]] then echo -n "{{yellow}} $percent % " "{{=0.$percent}}" else if [[ $percent -le 24 ]] then echo -n "{{red}} $percent % " "{{=0.$percent}}" fi fi
|
2013-01-24
, 21:33
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#550
|
{{yellow}} 100% {{=0.100}}
if [[ $status -eq 100 ]] then echo -n "{{=1.0}}" else echo -n "{{=0.$status}}" fi
The Following User Says Thank You to slarti For This Useful Post: | ||