Command Watch

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

4
6 .3
Description:

Command Watch is a plasmoid which periodically runs a system command and displays its output. Think of a fortune or your uptime. The possibilities are endless.

Note: this Plasmoid is written for post-4.0.x Plasma versions.
Last changelog:

11 years ago

Fix national characters, patch by Radek Novacek;
Make it compatible with KDE 4.2.

cyberbat

7 years ago

Really good plasmoid. Works even now on kde-4.9.3

Report

strungoutfan78

9 years ago

OK I realize this is an old project but I really love this plasmoid and want to install it on my Fedora 14 box. Unfortunately I can't figure out what to do with the tarball provided and the rpm I found while searching with Google has a dependency of kdebase4-runtime < 4.2.60. I'm on 4.5.5. I've dl'd the src.rpm to try and reconfigure it but I don't know what I'm doing. Please is there a way for me to install this? It worked fine a few months ago on my Fedora 13 box.

Report

frankqn1

11 years ago

Good work, very nice, simple and usable. What do You think about implementing text shadow?

Report

cmlr

11 years ago

Please let us choose a transparent background.

Report

Kwilliam

11 years ago

Due to tighter integration of Plasma with KDE, some changes to the CMakeLists.txt file are needed to compile successfully.
1) Delete the line: find_package(Plasma REQUIRED)
2) Replace ${PLASMA_LIBS} with ${KDE4_PLASMA_LIBS}

Report

C

bram85

11 years ago

Yes. For my other applet, Flickr On Plasma, I made the following patch againt CMakeLists.txt, which keeps compatibility with <4.2 and >=4.2. This should work the same for this applet.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,12 @@ project(plasma-flickrop)
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
-find_package(Plasma REQUIRED)
+
+if ( ${KDE_VERSION} VERSION_LESS "4.1.90" )
+ find_package(Plasma REQUIRED)
+else ( ${KDE_VERSION} VERSION_LESS "4.1.90" )
+ set( PLASMA_LIBS ${KDE4_PLASMA_LIBS} )
+endif ( ${KDE_VERSION} VERSION_LESS "4.1.90" )

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(

Report

patkoscsaba

11 years ago

Your pach, included in this version of the plasmoid I just downloaded returns errors on KDE 4.1.3
The if statement looks buggy. After I removed it, it compiles ok.

This is the error:
-- Found automoc4: /usr/bin/automoc4
CMake Error at CMakeLists.txt:6 (if):
if had incorrect arguments: ${KDE_VERSION} VERSION_LESS "4.1.90" (Unknown
arguments specified).


-- Found Plasma: /usr/lib/libplasma.so
CMake Error at CMakeLists.txt:8 (else):
else An ELSE command was found outside of a proper IF ENDIF structure. Or
its arguments did not match the opening IF command.


CMake Error at CMakeLists.txt:10 (endif):
endif An ENDIF command was found outside of a proper IF ENDIF structure.
Or its arguments did not match the opening IF command.


-- Configuring done

Report

C

bram85

11 years ago

Strange, it works fine here, and the same checks work for my other plasmoid somewhere else.

What is your CMake version? Mine is version 2.6-patch 2.

Report

Bolde

11 years ago

This program is excellent! It makes a light weight system monitor with top or with the python script Extraallt.

Extraallt prints the output from specified commands to a text file. Per default it prints the output from hddtemp, lm-sensors and /proc/cpuinfo. Just use it with Command watch and "cat textfile" and set it to update every 3 second.

http://www.cli-apps.org/content/show.php?content=96157

Command watch needs the UTF-patch to print degree symbols, described in the post above by user radnnn
Awk gurus can probably make it print anything.

Report

Kwilliam

11 years ago

Note: To build successfully on Kubuntu 8.10, the additional packages need to be installed first.
build-essential, cmake, kdelibs5-dev, libplasma-dev

Tip: I suggest installing the "apt-file" program. When cmake complains that it can't find the file such-and-such, use "apt-file search such-and-such" to find the package with the needed file.

Report

radnnn

11 years ago

Here is the fix for national characters:

replace line 216:
Quote:m_output = m_proc.readAllStandardOutput();

with
Quote:m_output = QString::fromUtf8(m_proc.readAllStandardOutput());


It should work for at least UTF-8 locales...

Report

devel0per

11 years ago

Ebuid is here - http://sonylaptoptools.sourceforge.net/ebuilds/plasma-commandwatch-0.1.ebuild

Report

zaardvark

11 years ago

Thanks so much for putting this together; it's almost perfect. I'm wondering how difficult it would be to add a scrollbar to the output display? I'd like to fit about 20 of these in my dashbar, heh...

Thanks again.

Report

Kwilliam

12 years ago

Thank you very much for such a versatile widget! It took some twiddling, but I've figured out how to make a "top" plasmoid from this.

Refresh every: 5 seconds
Font: Monospace 9
Command: Quote:top -b | head -17 | tail -11 | awk '$9!=0 {printf("%5s %4s %s\n",$1,$9,$12)}'

top -b | head -17 | tail -11 gets the top 10 processes using the most CPU. The awk command filters out processes with 0% CPU, and cuts down the displayed information to just the process name, PID, and %CPU.

Report

devel0per

11 years ago

Small update of your command:

top -n 1 -b | head -17 | tail -11 | awk '$9!=0 {printf("%5s %4s %5s %s\n",$1,$9,$6,$12)}'

will be a bit better.
* -n option for top is added;
* memory usage information is added;

It's faster and for me - previous variant simply doesn't work, because it's hold output (symptom - screen is not updated).

Report

Kwilliam

12 years ago

darn refresh. sry for the double post!

Report

Kwilliam

12 years ago

Thank you very much for such a versatile widget! It took some twiddling, but I've figured out how to make a "top" plasmoid from this.

Refresh every: 5 seconds
Font: Monospace 9
Command: Quote:top -b | head -17 | tail -11 | awk '$9!=0 {printf("%5s %4s %s\n",$1,$9,$12)}'

top -b | head -17 | tail -11 gets the top 10 processes using the most CPU. The awk command filters out processes with 0% CPU, and cuts down the displayed information to just the process name, PID, and %CPU.

Report

warezmen

12 years ago


i add you plasmoid on my debian repo

deb http://www.amarok2deb.co.cc/debian/ unstable main

Report

11 years ago

Fix national characters, patch by Radek Novacek;
Make it compatible with KDE 4.2.

12345678910
2
product-maker janet Sep 11 2014 9 excellent
product-maker axed Jan 10 2012 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
janet
Sep 11 2014
cyberbat
Dec 23 2012
deabru
Dec 25 2010
TeeAhr1
Feb 09 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.1.1
updated Jan 19 2009
added Jul 03 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0