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).

TotoKid

11 years ago

Thank you! ;) I thought ldconfig had the same effect.

Report

TotoKid

11 years ago

I was wondering... what about including the kbuildsycoca4 command at the end of the install script?

Report

ezeaguerre

11 years ago

Done... it's on SVN now :-)

Report

mattepiu

11 years ago

--- CMakeLists.txt.orig 2009-01-26 00:16:56.000000000 +0100
+++ CMakeLists.txt 2009-01-26 00:18:50.000000000 +0100
@@ -3,7 +3,6 @@

find_package(KDE4 REQUIRED)
include(KDE4Defaults)
-find_package(Plasma REQUIRED)

add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
@@ -14,8 +13,8 @@
kde4_add_plugin(plasma_stdin ${STDIN_SRCS})


-target_link_libraries(plasma_stdin ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} )
+target_link_libraries(plasma_stdin ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} )

install(TARGETS plasma_stdin DESTINATION ${PLUGIN_INSTALL_DIR})

-install(FILES plasma_stdin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
\ No newline at end of file
+install(FILES plasma_stdin.desktop DESTINATION ${SERVICES_INSTALL_DIR})

Report

ruans

11 years ago

Thanks, I used the cmake file we use for yawp, let me know it should work.

Report

H00K

11 years ago

I think it would be very useful if there was a Plasmoid that would display the latest StdErr output.

Imagine compiling something or just running an application (from GUI, not CLI) and therefore missing the error output. If something would be constantly on the prow and catching them and displaying the errors on desktop — that'd be really cool :]

P.S. Could you please write in the description also what this Plasmoid *actually* does?

Report

ruans

11 years ago

Good idea. I agree. I will try and improve this.

Report

jammen33

11 years ago

it wont compile in kde 4.2 can you get this working please this is one of my favorite plasmids

ty

Report

ruans

11 years ago

I will fix it, I have been working on yaWP so have not given this any attention.
I use it too. :)

Thanks

Report

rbb74

11 years ago

plasma_stdin.cpp (line 62):

m_mess = QString::fromUtf8(m_proc->readAllStandardOutput());

Instead of a simple QString solves this problem.

Report

AlexeyTyapkin

12 years ago

doesn't works with top. e.g.: top -n 1

Report

scomar

11 years ago

Try:

top b | head -n 20

Report

ruans

12 years ago

10 lines of code 11 bugs ;)
When size not fixed it does not update when size the same (calling resize). I'll upload a fix later, you may force a update, in function PlasmaStdin::updateCommand add update(); after resize(...);

Report

ruans

12 years ago

Fixed

Report

Anywhere

12 years ago

...No there should be a law against omitting content that is both this simple and this useful.....in fact I think they're about to drag you off to jail for taking so long!

This is fantastic! I don't suppose you can make a plasmoid console? I've really missed the console screenlet from my Gnome days.

Report

voidonic

12 years ago

Nice applet. I suggest you add copying current text to the clipboard as an option. Perhaps with a button on the settings page ...

#include <QClipboard>
#include <QApplication>
...

QClipboard * clipboard = QApplication::clipboard();

onbuttonclick->
clipboard->setText(m_mess);

-voidonic

Report

ruans

12 years ago

OK will have a look. Can you give me a tip as to how to get more complex commands working, like:
bash -c "echo 'A plasmoid' | awk '{gsub(\"A\",\"A dumb\"); print}'"
QProcess does not like it?

Report

Landrovan

11 years ago

I found a way.
Just create a .sh file containing your line. Put his file in your personal bin folder. Than you can just use the name of the sh file as command in this plasmoid!

Report

srog

12 years ago

Yes, this is useful.


About konsole plasmoid:

http://websvn.kde.org/trunk/playground/base/plasma/applets/ has:

embed-win - "Embed any window as plasmoid"
Tested, this is working at here (1)

konsolator - "A simple plasmoid embedding a konsole"
I have not tested this.

(1) Kubuntu 8.10 Itrepid Ibex - KDE 4.1.2

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
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 3