tigert
|
2010-02-18
, 08:03
|
|
Posts: 21 |
Thanked: 16 times |
Joined on May 2006
@ Finland
|
#131
|
|
2010-02-18
, 08:14
|
Posts: 21 |
Thanked: 10 times |
Joined on Jan 2010
@ Madrid
|
#132
|
|
2010-02-20
, 09:33
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#133
|
|
2010-02-24
, 13:30
|
|
Posts: 2,853 |
Thanked: 968 times |
Joined on Nov 2005
|
#134
|
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
echo ""
|
2010-02-24
, 20:56
|
Posts: 36 |
Thanked: 42 times |
Joined on Jan 2010
|
#135
|
Or some awk:
/PCode:cat /proc/uptime | awk '{printf "%d days, %.2d:%.2d\n",int($1/86400),int($1%86400/3600),int($1%3600/60)}'
awk '{printf "%d days, %.2d:%.2d\n",int($1/86400),int($1%86400/3600),int($1%3600/60)}' /proc/uptime
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
|
2010-02-24
, 21:09
|
Posts: 36 |
Thanked: 42 times |
Joined on Jan 2010
|
#136
|
|
2010-02-25
, 12:05
|
Posts: 123 |
Thanked: 33 times |
Joined on Jan 2010
@ Stockholm
|
#137
|
|
2010-02-25
, 12:30
|
Posts: 42 |
Thanked: 16 times |
Joined on Jan 2010
|
#138
|
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):
If I run this inside xterm it returns immediately and I get: 1) instant network disconnection, and 2) a notification banner.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 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
line to avoid the "invalid" message in DCE.Code:echo ""
The Following User Says Thank You to liedekef For This Useful Post: | ||
|
2010-02-25
, 21:29
|
Posts: 156 |
Thanked: 90 times |
Joined on Jan 2010
|
#139
|
|
2010-02-25
, 21:39
|
|
Posts: 2,853 |
Thanked: 968 times |
Joined on Nov 2005
|
#140
|
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 fpp For This Useful Post: | ||