Notices


Reply
Thread Tools
Posts: 7 | Thanked: 2 times | Joined on Dec 2009
#151
show your current fm transmitter strength:
cat /sys/class/i2c-adapter/i2c-2/2-0063/power_level
 
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#152
Why does the battery mAh script use "current"/"design" values? Wouldn't it be more accurate to use "last full charge" value instead of battery design one (because of the battery wear)? This way the battery wear level can also be monitored?

Also, I'm reminding, because I really think of it as important feature: center alignment. It is needed to be used with "no command title" option, it makes widget much more aesthetic.
 
Posts: 112 | Thanked: 122 times | Joined on Dec 2009 @ London, United Kingdom
#153
@calvin_42:
yeah yeah... that's a very ugly "feature" that will be removed on the next version. So far, just edit one thing at a time and everybody will be fine.

@rooted:
ok, i got it some time ago but I think that sometimes center alignement is bad. Some people, for example, are asking for monospace fonts for multiline results.. I believe I'll just have to add an option on the next version somehow.
__________________
Happy n900 owner!
Check my apps: n900fly, accdisplay and the "desktop command execution" widget!
 
Posts: 235 | Thanked: 8 times | Joined on Feb 2010
#154
Originally Posted by geno123 View Post
show your current fm transmitter strength:
cat /sys/class/i2c-adapter/i2c-2/2-0063/power_level
this command doesnt seem to work for me
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#155
Originally Posted by andy_con View Post
this command doesnt seem to work for me
works without problems

if you got any errors you might typed anything wrong. ^^
 
Posts: 235 | Thanked: 8 times | Joined on Feb 2010
#156
did a straight copy and paste and all im getting is 0
 
Posts: 118 | Thanked: 59 times | Joined on May 2007
#157
Originally Posted by RobbH View Post
Shouldn't it be possible to process the output of uptime through awk and create a conditional script that runs when the widget is clicked, but not at startup?
I hoped someone else would provide an answer before I found one, but no such luck. The following script, entitled Edit Notes, seems to work as intended: the script runs when the widget is clicked (assuming uptime reports a value greater than 1 min), but not at startup:

Code:
if [ `uptime | awk '{ print $3 $4 }'` = "1min," ] ; then echo " " ; else leafpad ~/MyDocs/desktop_notes.txt ; echo " " ; fi
It's not pretty, and anyone who might be inclined to improve it is welcome to do so.

The above script opens a file for editing in Leafpad. I use it in conjunction with this script, "Notes", which displays the same file in a multi-line widget, serving as a very basic desktop notes applet:

Code:
cat ~/MyDocs/desktop_notes.txt
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#158
Originally Posted by andy_con View Post
did a straight copy and paste and all im getting is 0
yep, because your fm-transmitter is off. ^^

just turn on your fm-transmitter and do the same thing again. (:
 
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#159
Originally Posted by cpscotti View Post
@calvin_42:
yeah yeah... that's a very ugly "feature" that will be removed on the next version. So far, just edit one thing at a time and everybody will be fine.

@rooted:
ok, i got it some time ago but I think that sometimes center alignement is bad. Some people, for example, are asking for monospace fonts for multiline results.. I believe I'll just have to add an option on the next version somehow.

Please do so, because every option you add increases potential of your widget exponentially. It really is the most useful widget even if it does one of the most basic tasks. And I meant adding an option for alignment in the beginning, not changing it into the center one. The power of this widget is in its customization, which means having options

Also, can you implement an option that in desktop edit mode icons for removing and configuring the widget can't be too close. I have a widget to output just battery percentage without anything else and because the two icons are so close together I can't "grab" and move the widget (even with stylus). I press one of the two buttons anytime I try (workaround is to increase width, move the widget and decrease it back, but it is not very practical).

And I really like the speed of development, please don't slow down!

Last edited by rooted; 2010-02-28 at 14:03.
 
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#160
Sorry for double post, but it's totally different issue, so I figured it would be ok to put it in own post. So, I tried to write a command for Desktop Command Execution widget to disable Wi-Fi (like "Wifi switcher"). It unloads the modules and disables Wi-Fi. The script, which I extracted from Wifi switcher looks:

Code:
#!/bin/sh
out=`ifconfig wlan0`
if [ $? -eq "0" ] ; then
if [ `echo "$out" | grep -c RUNNING` -gt "0" ] ; then
run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
fi
ifconfig wlan0 down
rmmod wl12xx
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Wi-Fi disabled'
exit 2
else
modprobe wl12xx
wl1251-cal
stop wlancond
start wlancond
ifconfig wlan0 up
run-standalone.sh dbus-send --print-reply --system --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false
exit 0
fi
And it works if run from terminal with "sh script.sh". But when I configure DCE command:

sh /path/to/script.sh | echo ""

And click the widget only line which shows connect menu gets executed (at least that's only visible change).

So, what is the issue?



Also, to contribute a little, here are scripts to be put in DCE to (one line each):

- Disconnect internet:
Code:
dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true; dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Internet disconnected'; echo ""
- Connect internet (show connections):
Code:
dbus-send --print-reply --system --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false | echo ""
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:31.