Notices


Reply
Thread Tools
tigert's Avatar
Posts: 21 | Thanked: 16 times | Joined on May 2006 @ Finland
#131
one thing to add is maybe a setting for font, I could use SmallSystemFont for my weather reports as those are sometimes longish...
 
Posts: 21 | Thanked: 10 times | Joined on Jan 2010 @ Madrid
#132
Fonts would be reallly interesting - any way to get all UI fonts one size bigger?
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#133
@cpscotti

Sent you important private message on this matter... could you provide some feedback, please? 10x
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#134
Well, I don't know how I managed to miss this thread before, but this widget is absolutely BRILLIANT ! More like a widget factory, actually... it's great to be able to come up with any use you can think of !

On the upside, as I just discovered it today, I got started directly with version 1.01 and all its goodies... This app has accumulated features and bug fixes at an impressive rate, congrats cpscotti !

Here is my contribution on new ways to use it:

In addition to its intended function (display output from a shell command), you can also make it work as a shortcut for any executable, even if it doesn't output anything (or if you aren't interested in the output, only the action).

In effect, you are creating a "button" on the desktop to launch your command, which you can resize to show only the title (as there is no output).

It is actually the same thing as the "desktop shortcuts" already available in Maemo5, except that:

- you can create your own without having to create a suitable .desktop file in the correct directory (/usr/share/applications/hildon)

- it works better. Consider this example (adapted from the excellent "freemoe" collection of maemo one-liners):

Code:
dbus-send --type=method_call --dest=org.freedesktop.Notifications \
/org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint \
string:"Disconnecting network"
echo ""
dbus-send --system \
--dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect \
boolean:true
If I run this inside xterm it returns immediately and I get: 1) instant network disconnection, and 2) a notification banner.

If I place it in a .desktop file and run it from an icon on the desktop, it also works, but it "blanks" the desktop for several seconds, with a spinner in the title bar, doing nothing. Not usable.

If I run this as a DCE widget, I get the visual "button pressed" feedback by clicking on the title, then disconnect and banner, done. Perfect.

So I think this is a very worthy use of DCE. Of course, the illusion would be even more perfect if we could specify an icon instead of a title :-)

Thanks for a great app!

Note: as this script has no output I had to add the
Code:
echo ""
line to avoid the "invalid" message in DCE.
__________________
maemo blog

Last edited by fpp; 2010-02-24 at 13:33.
 

The Following 7 Users Say Thank You to fpp For This Useful Post:
Posts: 36 | Thanked: 42 times | Joined on Jan 2010
#135
Originally Posted by Palleman View Post
Or some awk:
Code:
cat /proc/uptime | awk '{printf "%d days, %.2d:%.2d\n",int($1/86400),int($1%86400/3600),int($1%3600/60)}'
/P
Don't want to do my BOFH but you call two commands and one is enough if you rewrite like this :

Code:
awk '{printf "%d days, %.2d:%.2d\n",int($1/86400),int($1%86400/3600),int($1%3600/60)}' /proc/uptime
Code:
awk '{if (int($1/86400)>0){printf "%d days, ",int($1/86400)};printf "%.2d:%.2d\n",int($1%86400/3600),int($1%3600/60)}' /proc/uptime
Ok, I'm not sure the cat will empty the battery but ...

Last edited by nbc; 2010-02-24 at 21:11.
 
Posts: 36 | Thanked: 42 times | Joined on Jan 2010
#136
Thanks cpscotti and fpp.

Originally Posted by fpp View Post
So I think this is a very worthy use of DCE. Of course, the illusion would be even more perfect if we could specify an icon instead of a title :-)
Yes, it would be great if we could specify an icon
 
Posts: 123 | Thanked: 33 times | Joined on Jan 2010 @ Stockholm
#137
NBC: I don't know how awk actually does the technical task of reading the file from disk, but are you sure it is more efficient than calling cat? Might be, might not.

While waiting for you to dig into that, I give you that your code is prettier than mine.
 
Posts: 42 | Thanked: 16 times | Joined on Jan 2010
#138
Originally Posted by fpp View Post
Well, I don't know how I managed to miss this thread before, but this widget is absolutely BRILLIANT ! More like a widget factory, actually... it's great to be able to come up with any use you can think of !

On the upside, as I just discovered it today, I got started directly with version 1.01 and all its goodies... This app has accumulated features and bug fixes at an impressive rate, congrats cpscotti !

Here is my contribution on new ways to use it:

In addition to its intended function (display output from a shell command), you can also make it work as a shortcut for any executable, even if it doesn't output anything (or if you aren't interested in the output, only the action).

In effect, you are creating a "button" on the desktop to launch your command, which you can resize to show only the title (as there is no output).

It is actually the same thing as the "desktop shortcuts" already available in Maemo5, except that:

- you can create your own without having to create a suitable .desktop file in the correct directory (/usr/share/applications/hildon)

- it works better. Consider this example (adapted from the excellent "freemoe" collection of maemo one-liners):

Code:
dbus-send --type=method_call --dest=org.freedesktop.Notifications \
/org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint \
string:"Disconnecting network"
echo ""
dbus-send --system \
--dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect \
boolean:true
If I run this inside xterm it returns immediately and I get: 1) instant network disconnection, and 2) a notification banner.

If I place it in a .desktop file and run it from an icon on the desktop, it also works, but it "blanks" the desktop for several seconds, with a spinner in the title bar, doing nothing. Not usable.

If I run this as a DCE widget, I get the visual "button pressed" feedback by clicking on the title, then disconnect and banner, done. Perfect.

So I think this is a very worthy use of DCE. Of course, the illusion would be even more perfect if we could specify an icon instead of a title :-)

Thanks for a great app!

Note: as this script has no output I had to add the
Code:
echo ""
line to avoid the "invalid" message in DCE.
But this might give troubles. I believe all the scripts you've on your desktop are activated once when you reboot your N900. This might result in some undesirable behaviour: your network gets disconnected ...
 

The Following User Says Thank You to liedekef For This Useful Post:
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#139
FEATURE REQUEST: Additional option for "center alignment" instead of right one, very useful if used with "don't show the title". Have to use spaces now, it's ugly.
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#140
Originally Posted by liedekef View Post
But this might give troubles. I believe all the scripts you've on your desktop are activated once when you reboot your N900. This might result in some undesirable behaviour: your network gets disconnected ...
Well it won't be connected in the first place so that particular example would not be a nuisance :-)

I only reboot when I have no other choice, however, so I can live with that. It is much more bothersome that a script gets activated when you create it, and also every time you edit its properties: I would much prefer that did not happen, if it is possible.

Maybe cpscotti will look into it while he is adding the icons option ? :-)
__________________
maemo blog
 

The Following User Says Thank You to fpp For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:01.