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)

thesnake505 2010-02-28 18:58

Re: Desktop Command Execution Widget scripts
 
hay guys, i was wondering if there is a list, like a wiki page of comands that will work with dsew widget?
also is it possible to get "top" working, iv had a qucik go, including following some advice to try

top -b

however all i get is invalid command

cheers snake

casper27 2010-02-28 19:24

Re: Desktop Command Execution Widget scripts
 
If I get what you are saying in that you want to create a shortcut on the desktop to the Top command you will not be able to do this using dektop widget. You can however create a shortcut on the desktop that will execute Top command. Bit of command line experience needed but basically you need to create a desktop entry in /usr/share/applications/hildon/ directory.
So from the begining.

You will need root access so search the forums for rootsh.

Code:

sudo gainroot
cd /usr/share/applications/hildon/
vi topx.desktop

This will create a file in that directory called topx.desktop.
Copy this txt into that file.

Code:

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=topx
Exec=/usr/bin/osso-xterm top 
Icon=   
#X-Window-Icon=timerwidget
X-Window-Icon=   
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

Then press the Esc key twice followed by
Code:

:wq
This will save that entry into the created file and thus creating a blue icon in the application list called Topx.
You can then create a shortcut to it on the desktop the same way you would create a shortcut to any application.

Hop this helps. Simples :)

airjordan17 2010-03-03 02:33

Re: Desktop Command Execution Widget scripts
 
Don't know if someone's posted something like this already, but I thought I'd share a DCEW script I created. It shows the data transferred (up and down) over WLAN since the last phone boot. It serves the same purpose as the Personal Dataplan Monitor widget (excellent, by the way) but for wifi traffic.

Code:

/sbin/ifconfig wlan0 | grep bytes | sed 's/^.*(\([^)]*\)).*(\([^)]*\))/Dn: \1 \| Up: \2/g'
Note that the script should be all on one line, despite this site wrapping the text. Hope someone finds it helpful.

geno123 2010-03-03 02:52

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by andy_con (Post 549427)
did a straight copy and paste and all im getting is 0

andy turn on your FMTX and tap on the widget to refresh it. it should show 113. if you use the fm boost script and then tap widget again it will refresh to show 118

therock 2010-03-03 21:40

Re: Desktop Command Execution Widget scripts
 
so where does the scripts you create get saved on the n900 ?

i would like to edit them via ssh instead

rooted 2010-03-03 21:53

Re: Desktop Command Execution Widget scripts
 
/home/.desktop_comm_exec

Another bug report to the author: if this config file is manually edited it gets overwritten. That's not standard Linux program behaviour.

Also, please make config file a little less complicated. I'm aiming at spliting scripts into lines, they are all in one line now.

therock 2010-03-03 22:01

Re: Desktop Command Execution Widget scripts
 
hmm no config file there for me rooted

andy_con 2010-03-03 22:59

Re: Desktop Command Execution Widget scripts
 
is there coding to add memory and cpu usage status???

cpscotti 2010-03-04 09:01

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by therock (Post 554739)
hmm no config file there for me rooted

The file in fact is in ~/.desktop_cmd_exec

About overwriting the conf file, thanks for reminding me of this glitch! :)

rooted 2010-03-07 20:28

Re: Desktop Command Execution Widget scripts
 
Wow, what a bug. So obvious, but unnoticed till now. Anyway, when DCE widget resized to bigger height (with no. of lines) the widget itself is bigger, but the tapping area stays the same. This means that if you tap the widget in the lower area, it doesn't register it. Please fix this, because I'm using it for buttons: disconnect/connect/lock screen (via dbus) and I need some bigger buttons.


All times are GMT. The time now is 10:03.

vBulletin® Version 3.8.8