STDIN Plasmoid

Plasma 4 Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

28
7 .9
Description:

This plasmoid executes a process and captures its stdout or stderr output stream, it can also display the content of a local file or a remote file via KIO.
You can think of this plasmoid as a general purpose scriptable plasmoid, even for languages not supported by kross, because you can make an script and capture its output :-).

Building:
This package contains both, the 0.2 and 0.1 versions, to install the package just execute the install.sh script or these commands in order:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
sudo make install
kbuildsycoca4
kquitapp plasma; sleep 1; plasma (or restart KDE)

The 0.2 version requires KDE 4.2, users of KDE 4.1 may only install the 0.1 version. The build script in the root directory tries to find your KDE version and select the proper version, if it fails enter to the 0.1 or 0.2 directory and execute the corresponding install.sh script

Videos:
These are some demonstration videos

* http://ezeaguerre.googlepages.com/notes.ogg: Leaving a note on desktop.
* http://ezeaguerre.googlepages.com/cpu.ogg: Watch cpu speed and temperature.
* http://ezeaguerre.googlepages.com/encoding.ogg: Select from all the different encodings KDE supports.
* http://ezeaguerre.googlepages.com/log.ogg: Watch a log across a network on realtime using tail, or with a 1 second delay using KIO.
* http://ezeaguerre.googlepages.com/svnygit.ogg: Monitor Subversion and Git logs.
* http://ezeaguerre.googlepages.com/chat.ogg: Interface with a PHP script and its results across a network.
* http://ezeaguerre.googlepages.com/script.ogg: Interface with a perl script (http://ezeaguerre.googlepages.com/speed.pl).

SVN:
The Subversion repository now has a 0.2 directory:
0.2/trunk: The most recent version.
0.2/branches/0.2-workarounds: trunk + workarounds for various bugs found in Qt and KDE.
0.2/tags: Tagged releases

0.1 trunk: svn co https://plasmoidstdin.svn.sourceforge.net/svnroot/plasmoidstdin/0.1 stdin
0.2 trunk: svn co https://plasmoidstdin.svn.sourceforge.net/svnroot/plasmoidstdin/0.2/trunk stdin
0.2-workarounds branch: svn co https://plasmoidstdin.svn.sourceforge.net/svnroot/plasmoidstdin/0.2/branches/0.2-workarounds stdin
This package: svn co https://plasmoidstdin.svn.sourceforge.net/svnroot/plasmoidstdin/0.2/tags/0.2-beta1 stdin

This package is based on 0.2-workarounds branch, which is the one we recommend, and has workarounds for at least these bugs:
* Qt 4.4 doesn't propagate changes in geometry to parent QGraphicsWidget, hopefully it will be fixed by Qt 4.5.
http://mail.kde.org/pipermail/plasma-devel/2008-December/003038.html
http://www.qtsoftware.com/developer/task-tracker/index_html?id=211500&method=entry
http://www.qtsoftware.com/developer/task-tracker/index_html?id=231114&method=entry
* Plasma::PopupApplet doesn't remember the size nor the aspect ratio of the plasmoid after iconifying to the panel.
* Plasma::Applet::setBackgroundHints(Plasma::Applet::NoBackground) fails when called from Plasma::Applet::init().
* Maybe more which I don't remember right now...

Translated into:
* Spanish.
* Czech.
* Brazilian Portuguese.

Some Useful Commands
You may need to edit them slightly for your system.
* WLAN SIGNAL: iwconfig wlan0 | grep -i quality.*signal | cut -b 11-100
* WLAN USEAGE: ifstat wlan0 | grep -iE "(wlan0)|(Interface)"
* NVIDIA TEMP: printf "Core Temp: "; nvidia-settings -q gpucoretemp |grep '):' | awk '{print$4}' |cut -b 1,2
Last changelog:

11 years ago

0.2-beta1:
* Completely rewritten from scratch.
* Support various encodings (not just ASCII or UTF-8).
* Get files with KIO.
* Capture standard output and/or standard error.
* Select the background style (Normal, Translucent or No Background).
* Basic filtering (how many lines to display, counting form the start or the end...).
* Contextual action "refresh" and "copy".
* Many more...

0.0.00011:
* Added build 4 kde 4.2 same as yaWP
* Some fixes to the running of commands (by Ezequiel -thanks)

0.0.00010:
Major upgrade ;) :
* Added update() (1 line)
* Fixed spelling mistake in description, (waisting or necking rather than wasting ; the opposite).
I'm still happy to say that it is still dumb, nothing changed, ... really.

0.0.00001:
* The start of great things (maybe not).

C

PlasmaFactory

10 years ago

Oops, I should not add a clear mail address on the internet.

Report

9

Apopatos

10 years ago

I could find a fortune plasmoid for KDE. Only Karamba scripts.
This one tjough works like a charm. Thanks a lot!

Report

9

Apopatos

10 years ago

Why the top command doesn't work?

Report

ezeaguerre

9 years ago

Because it needs a terminal, this plasmoid is not and will never be a terminal emulator.
However, there's a plasmoid that has a Konsole Kpart embedded in it (konsolator), you could use that one.

Report

Montblanc

11 years ago

Has anyone found a working command for showing the total amount of free ram? I want it to look like this:

Free RAM: XXXX MiB

Many thanks in advance!

Report

ssri

11 years ago

here's mine:

printf "Free RAM: ";echo `free -m | grep "buffers/cache:" | cut -c37-41` MB

Report

Montblanc

11 years ago

Thank you very much! :D

Report

ssri

11 years ago

here's mine:

printf "Free RAM: ";echo `free -m | grep "buffers/cache:" | cut -c37-41` MB

Report

flyingsheep

11 years ago

i have created a script fixing fortune with 1337 new-age 21-century unicode characters like …, “, ” and –.

but it doesn’t quite work.
try it yourself:

#/usr/bin/bash
echo -e "`fortune | sed -re '
s/--/—/g;
s/\.\.\./…/g;
s/\"([^\"]*)\"/“\1”/gm;
s/\*([^\*]*)\*/\\\\033[1m\1\\\\033[0m/g;
'`"

the last line is for bold text using bash-escape-sequences. would be nice if they were supported…

Report

TheAbu

11 years ago

I already envision endless hours of fun with this one, thank you very much :)

Report

mattepiu

11 years ago

Bug: borders get painted after text, so if plasma objects are blocked no repaint is done and last line of text is half hidden.
Solution: text should be painted last, after borders.

Report

andrewy

11 years ago

is there any way to scroll through the output? if not, would it be hard to add?

It doesn't necessarily need to be a scrollbar. Just mapping shift + pg up/pg down would also work fine.

Report

Masterofpsi

11 years ago

This plasmoid should have a field where you can type in the command and submit it with Enter or an "enter" button, then capturing the output. Sometimes you just want to see the output of a quick command (like lspci), and opening a terminal is too much trouble, but so is getting to this plasmoid's "settings" dialog.

Report

nagatus

11 years ago

Superb! Thanks a lot, was just looking whether someone had already done this, had a similar plasmoid in mind :)

Report

marcotangaro

11 years ago

what is the status of this plasmoid after the qt 4.5 release?
It is still in developement? :(

Report

ezeaguerre

11 years ago

I haven't had much time the last couple months :-(
But I promise I'll keep working on it :-)

Report

rocketraman

11 years ago

Thanks for a neat little plasmoid!

Some feedback:

Vertical text alignment bottom does not always work correctly. This can be seen when the plasmoid size is smaller than the number of lines of text (which happens often when break lines is true).

When "Fixed" is selected it would be great if the plasmoid could truncate the displayed text to remain within the plasmoid. Currently the text continues off the right side. Piping through cut is a workaround but not a good one as it does not adjust with the plasmoid size.

Report

eusonig

11 years ago

Scroll bars would be very helpful and a system equivalent to clear command too.

Report

ezeaguerre

11 years ago

I'll take it into account... hopefully for the next version... I'll give it a look tomorrow ;-)

Report

eusonig

11 years ago

Are you thinking in adding DBUS support in the future to STDIN?
Let me give an example. I'm using STDIN to display current listening song lyrics and I'm doing this job with a bash script, calling dbus-monitor monitoring track change event, and an amarok script writing a file in /tmp.
If I could send text, change the command or the file to read, or force refresh in STDIN via dbus I don't need a second script.
I think that a small DBUS interface substantially increase the immense possibilities of STDIN.

Report

gnemmi

11 years ago

Doesn't http://www.kde-look.org/content/show.php/Another+Amarok+1.x+Control?content=95721 do what you need??

Report

eusonig

11 years ago

I'm using Amarok 2.

Report

ezeaguerre

11 years ago

Isn't qtdbus enough?

How should we make the dbus interface? something like 2 lineedits:

Update on dbus event: [________________]
Send dbus command: [________________]

something like that? ;-)

Regarding the clear command... how should it work? If the process hasn't finished it's ok to clean what is already shown and let the process keep inserting data into STDIN, but if the process has finished (or "Show partial output" is not checked) what should be the behaviour? Should we clean everything and restart the process?? (because if you clean everything and the process is not running you'll end up with nothing in your screen)

Cheers!

Report

gnemmi

11 years ago

"equivalent to clear command" ...
That one is on me ...
It's gonna a take a little time but _it_will_be_there_

Report

buschmann23

11 years ago

I like this plasmoid. It would be nice if there would be an option to set a label. This label could be presented like a headline above the output. :)

My usage right now is the following command to read the output of /var/log/messages:

kdesu -n -t -c "tail -f /var/log/messages"

Another question: How can I contribute a german translation?

My package for openSUSE:
http://software.opensuse.org/search?baseproject=ALL&p=1&q=plasmoid-stdin

Report

11 years ago

0.2-beta1:
* Completely rewritten from scratch.
* Support various encodings (not just ASCII or UTF-8).
* Get files with KIO.
* Capture standard output and/or standard error.
* Select the background style (Normal, Translucent or No Background).
* Basic filtering (how many lines to display, counting form the start or the end...).
* Contextual action "refresh" and "copy".
* Many more...

0.0.00011:
* Added build 4 kde 4.2 same as yaWP
* Some fixes to the running of commands (by Ezequiel -thanks)

0.0.00010:
Major upgrade ;) :
* Added update() (1 line)
* Fixed spelling mistake in description, (waisting or necking rather than wasting ; the opposite).
I'm still happy to say that it is still dumb, nothing changed, ... really.

0.0.00001:
* The start of great things (maybe not).

12345678910
11
product-maker janet Sep 11 2014 9 excellent
product-maker arcanis Sep 13 2013 9 excellent
product-maker cjann Aug 05 2012 9 excellent
product-maker jrjohnstone Apr 05 2012 9 excellent
product-maker e1nste1n Jul 11 2011 9 excellent
product-maker crunchy Feb 24 2011 9 excellent
product-maker skynet1248 Jan 18 2011 9 excellent
product-maker Apopatos Dec 28 2010 9 excellent
product-maker padde Nov 30 2010 9 excellent
product-maker lordlukas Oct 22 2010 9 excellent
product-maker Ireyon Oct 20 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
janet
Sep 11 2014
arcanis
Sep 14 2013
cjann
Aug 05 2012
jrjohnstone
Apr 05 2012
crunchy
Feb 24 2011
wolfshift
Jan 19 2011
padde
Nov 30 2010
lordlukas
Oct 22 2010
edio
Aug 18 2010
ulij
Aug 05 2010
eikel
Jul 29 2010
dfx
Jun 26 2010
meh3
Mar 26 2010
Apopatos
Dec 28 2009
DaiVied
Dec 19 2009
TheAbu
Jul 25 2009
alno
Jul 02 2009
c2h5oh
Jun 23 2009
borisdigital
Jun 17 2009
Montblanc
Mar 27 2009
dvs999
Mar 25 2009
gnemmi
Feb 12 2009
knadian
Feb 12 2009
marcotangaro
Feb 10 2009
buschmann23
Feb 09 2009
ruans
Jan 29 2009
deabru
Jan 28 2009
ezeaguerre
Jan 27 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2-beta1
updated Feb 08 2009
added Nov 01 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 11