maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Desktop Command Execution Widget scripts (https://talk.maemo.org/showthread.php?t=39177)

jakiman 2010-01-04 01:18

Desktop Command Execution Widget scripts
 
UPDATE MAR 15 2010 - Wiki has been created (not by me) with list of useful scripts.
http://wiki.maemo.org/Desktop_Command_Execution_Widget_scripts

UPDATE FEB 3 2010 - It's now up to version 0.8 and is vastly improved. (resizeable also)

----------------

I found a very interesting app this morning.
It's called Desktop Command Execution Widget.

http://maemo.org/packages/view/desktop-cmd-exec/

Here is a simple script I'm using to get it to display an accurate percentage number of my battery level:

hal-device | grep percen | awk '{print $3"%"}'

Here is a screenshot of how it looks. (Wish the widget could be resized....)
http://img189.imageshack.us/img189/6...0010412072.png

I was wondering what other useful stuff I could use with it. Any ideas?
(I'm like a total noob when it comes to scripting. I got help from my linux guru friend to make the script above)

Also, can this be resized? or launch multiple instances?

Few script ideas:
- Uptime. When you install this, it has the uptime script pre-filled.
- Battery level. as above.
- Disk space used / free

jakiman 2010-01-04 03:38

Re: Desktop Command Execution Widget scripts
 
Just noticed that it got updated (0.1-2) and you can add multiple pre-saved scripts and choose one from the list. Nice!

tigert 2010-01-04 05:51

Re: Desktop Command Execution Widget scripts
 
(need to install wget first)

wget -O - -q ftp://tgftp.nws.noaa.gov/data/observ...tions/EFHF.TXT | grep EFHF

Shows the current METAR report of an airport of choice (substitute EFHF with your local airport ICAO identifier)

The usefulness of the above is directly related to how much of an aviation geek you are, but nevertheless, one extra use for the applet :-)

METARs are usually a bit longer than what the applet currently can fit, so I guess some resizing and maybe word-wrapping to multiple lines (when max width is reached) would need to be implemented.

jakiman 2010-01-04 06:30

Re: Desktop Command Execution Widget scripts
 
Ahh. Nice. Thanks for that. I'm sure someone will find that useful. =)

I don't even know what "is" possible via terminal as I'm a total linux noob.
Hence it would be very interesting if others can share what information we can pull out by using the xterminal scripts.

Keep them coming. =)

oh...

I found this great thread. Might be very useful to pull out some info out of the battery lines.
http://talk.maemo.org/showthread.php?t=36613

slavikko 2010-01-04 09:31

Re: Desktop Command Execution Widget scripts
 
This is definitely handy.

Made a little script to handle the rf transmitter through this (and boost the signal strength)

You can find it here.

slavikko 2010-01-04 11:01

Re: Desktop Command Execution Widget scripts
 
Seems that when selecting the @Click update option, it still runs the active script when returning to the desktop from apps or the app list or scrolling to the desktop it's on...

EDIT: Reported this issue to the developer.

cpscotti 2010-01-04 12:03

Re: Desktop Command Execution Widget scripts
 
Hello everybody!
I'm very happy my app is being useful for you all.
It REALLY is in the "development" stage. =]]
@slavikko: thanks for the bug report =]
@tigert: well.. seems that it already addresses the initial purpose.

I'll be working on it today and I expect to fix those issues and finish the "add/edit/delete" custom commands option.

About resizing:
Of course we can change the size of the widget on the source or something but seems that after the applet is loaded you can't resize it anymore.
Quote:

Home widgets are located in the Home Area of the desktop. Home Area widgets are not resizable.
(from http://wiki.maemo.org/Documentation/...esktop_Widgets)

I'll be working/thinking about all this today...

Again, thanks for the interest! =]

jakiman 2010-01-04 12:11

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by cpscotti (Post 452382)
About resizing:
Of course we can change the size of the widget on the source or something but seems that after the applet is loaded you can't resize it anymore.

I'm glad you found this thread! :D
Thank you for such an useful widget!

If you look at some widgets, you have a choice of compact or normal size.
Maybe you can do something similar and give various preset size selections? (not sure if this is easily possible or not. Just an idea..)

tigert 2010-01-04 14:21

Re: Desktop Command Execution Widget scripts
 
I was pondering the settings a bit:

Code:

.------------- Settings ---------------.
| Widget always updates when clicked  | < label
|( Update only when connected        )| (1)
|( Update interval        20 minutes )| (2)
|( Selected command            foobar )| (3)

(1) Touch selector: Always update / Update only when connected /
    Update only when connected to wlan

(2) Touch selector: 5 seconds,30 seconds, 1 minute, 5 minutes,
    10 minutes, 30 minutes, 60 minutes, 2 hours, 6 hours, 12 hours

(3) Touch selector opens dialog which works much like the
    "sharing accounts" settings in control panel:

.---------- Saved commands --------------.
| Uptime command            :          | > press list item > editor
| Disk free                  :          |
| METAR                      :          |
|                            : (  New  ) | > press new -> empty editor
------------------------------------------

Command Editor dialog:

.----------- Edit command ---------------.
| Name    [ Uptime command ] :          |
| Title  [ Up:            ] : ( Delete )|
| Command [ uptime | cut -d] : (  Save  )|
------------------------------------------

This would work nicely for my needs at least - any comments?

(Note that Fremantle style has no colons (:) in label - entry pairs in settings dialogs)

omeriko9 2010-01-04 14:29

Re: Desktop Command Execution Widget scripts
 
Sorry for the silly question, but how can I get to the settings, add scripts and so on?

I can't seem to find this app in the app menu, only on the desktop...


All times are GMT. The time now is 07:36.

vBulletin® Version 3.8.8