Command Output

Plasma 5 Applets

Source (link to git-repo or to original if based on someone elses unmodified work): https://github.com/Zren/plasma-applet-commandoutput

12
Score 83.5%
Description:

Simple widget to print output of a command run every __ seconds.

* Final newline is striped (you can replace all newlines with spaces in the config).
* You can also specify commands to run on click or scrolling up/down.
* You can change font size and color, and can hide the desktop widget background.
* You can set a fixed width/height it should occupy in the panel.

You might be interested in a more advanced widget called Kargos (https://store.kde.org/p/1173112/) which has a specific syntax for rendering the command's output as buttons/text in a popup.
Last changelog:

v10 - April 30 2020 2 months ago

* Add fixed height setting (Issue #18)
* Always use a fixed size font (Issue #18)
* Wrap only if we don't have a fixed width (not horz panel).
* Show truncated/elided text in tooltip.

sayang2001

4 months ago

Can I not run my own script with it?

Report

sayang2001

4 months ago

nvm calling the script with bash works

Report

10

m4xp1

7 months ago

10 10 the best That's my lovest widget! Thank you very much!

Report

10

b1tl0rd

11 months ago

10 10 the best

Report

husimo

1 year ago

Also, is there a way to change the text color ? When you remove the background, you better have a dark wallpaper ;-)

Report

husimo

1 year ago

Hello, that's good ! I'm using it to echo random quotes. Would it be possible to disable the ability of the plasmoid to automatically extends itself in width ? Some quotes are larger than my screen and then they are not displayed properly. Would be good to have a "width/height" parameter in options. Thanks ! :-)

Report

S3 10

x-varlesh-x

1 year ago

10 10 the best

Report

9

waces

1 year ago

9 9 excellent

Report

9

waces

1 year ago

Why not letting use less than a second like 500ms?

Report

C

Zren

1 year ago

None really. I misinterpreted Plasma's executeable dataengine and assumed a command couldn't finish faster than 1 second, but I was wrong. I never really had a need to remove the limit before. What use case requires 120 calls per minute?

You're free to edit main.qml and ConfigGeneral.qml to remove the limits on the interval.
~/.local/share/plasma/plasmoids/com.github.zren.commandoutput/contents/ui/

Test with the command "date +%S.%N" and running:
plasmawindowed com.github.zren.commandoutput

Report

9

waces

1 year ago

Alright, thanks. Just wanted to try making a custom desktop/workspace switcher script thing and the 1s between each time it updates what's showing makes it look kinda laggy :P

I still have some other stuff to try tho

Again, thanks

Report

9

alex1701c

1 year ago

9 +

Report

9

alex1701c

1 year ago

I really like it, I had a little bit of trouble with line-breaks but now it works fine

Report

9

smxms

1 year ago

9 +

Report

9

Bugworm

1 year ago

9 +

Report

9

jtaillon

1 year ago

9 +

Report

9

jtaillon

1 year ago

This is a great little plasmoid. Question: I can use HTML in my command output to create a link (the text turns blue as it is recognized as a link, but I cannot click on that link to open it in a browser. Do you know if it would be possible to do that?

Report

C

Zren

1 year ago

Oops, that won't work. The MouseArea will "eat" the mouse click, so the "Text" won't receive the click event. I tried the "teach a man to fish he eats for a lifetime" philosophy here, but this wasn't the perfect feature for introducing someone to coding widgets.

I'll release v7 in a few hours with these patches:

* https://github.com/Zren/plasma-applet-commandoutput/commit/ecb59ab001f536aad750258cecbf1ed75bc0e895
* https://github.com/Zren/plasma-applet-commandoutput/commit/f9b9385b783567ab2a686a6b49bde680022574bc

Report

C

Zren

1 year ago

Ah, I didn't consider people using link tags. QML Text will automatically switch to RichText mode, but you need to add 1 line of code to make it open the link in a browser (or do something else).

Open up ~/.local/share/plasma/plasmoids/com.github.zren.commandoutput/contents/ui/
Edit the main.qml to add:

onLinkActivated: Qt.openUrlExternally(link)

To the Text element, like in the LinkText.qml from another widget linked below.

* https://doc.qt.io/qt-5/qml-qtquick-text.html#textFormat-prop
* https://github.com/Zren/plasma-applet-phabricatorrevisions/blob/master/package/contents/ui/lib/LinkText.qml#L7
* https://github.com/Zren/plasma-applet-commandoutput/blob/master/package/contents/ui/main.qml#L97

You'll need to restart plasmashell to reload the widget in your desktop/panel though. Easiest way is to relog, but you can also run:

killall plasmashell; kstart5 plasmashell

Report

9

mockroot

1 year ago

9 +

Report

9
MOD

intika

1 year ago

9 +

Report

pierat

1 year ago

Nice, small. and very useful! :) One request, though: could you make the alignment of the output optional? (Left, center, right).

Report

C

Zren

1 year ago

Added to v6

Report

marozsas

2 years ago

There is no output on Kubuntu 18.04. Just a plain dark grey window even with the provided test example. Missing dependecies ?

Report

C

Zren

2 years ago

v5 should fix use as a desktop widget.

Report

v10 - April 30 2020 2 months ago

* Add fixed height setting (Issue #18)
* Always use a fixed size font (Issue #18)
* Wrap only if we don't have a fixed width (not horz panel).
* Show truncated/elided text in tooltip.

v10 - April 30 2020 2 months ago

* Add fixed height setting (Issue #18)
* Always use a fixed size font (Issue #18)
* Wrap only if we don't have a fixed width (not horz panel).
* Show truncated/elided text in tooltip.

v9 - November 15 2019 7 months ago

* Change hardcoded min interval to 0ms instead of 1000ms.
* Only remove final newline in stdout. Previous behavior can be re-enabled in the config. (Issue #3)
* Add ability to set default text+outline color like simpleweather.
* Run command immediately on command change. Fixes bug where widget stops updating if command was changed after command was run, but before the command finishes.
* Add ability to set a fixed width (off by default).
* Update Dutch translation by @Vistaus (Pull Request #16)

v8 - February 20 2019 1 year ago

* Fix click + mousewheel commands no longer serializing (Issue #6)

v7 - February 13 2019 1 year ago

* Added Dutch translation by @Vistaus (Pull Request #10)
* Added support opening html links `<a href="">Link</a>` in your web browser.

v6 - February 9 2019 1 year ago

* Fix boldness not persisting.
* Add ability to center/right align output, italicize and underline.
* Add ability to hide background when used as a desktop widget.
* Fix selecting the default font after changing to another font.
* Add ability to run a command on click / mousewheel (Issue #6)

v5 - May 6 2018 2 years ago

* Support use as a Desktop Widget.
* Add ability to change the font family, size, and boldness.

v4 - March 12 2018 2 years ago

* Run command on load so in case the interval is very long.

v3 - April 5 2017 3 years ago

* Use a lower version of QtQuick.Layouts so that the widget works with Plasma 5.5 (Ubuntu 16.04)

v2 - February 20 2017 3 years ago

* Fix configuring intervals other than 1 second. Thanks @sheerhub
* Use the utilities-terminal icon

12345678910
133
product-maker m4xp1 Dec 04 2019 10 the best
10 the best That's my lovest widget! Thank you very much!
product-maker b1tl0rd Jul 21 2019 10 the best
10 the best
product-maker x-varlesh-x May 24 2019 10 the best
10 the best
product-maker waces May 16 2019 9 excellent
9 excellent
product-maker alex1701c Apr 13 2019 9 excellent
+
product-maker smxms Mar 27 2019 9 excellent
+
product-maker Bugworm Mar 18 2019 9 excellent
+
product-maker jtaillon Feb 13 2019 9 excellent
+
product-maker mockroot Dec 28 2018 9 excellent
+
product-maker intika Oct 19 2018 9 excellent
+
product-maker artos May 13 2018 9 excellent
product-maker thevladsoft May 09 2018 9 excellent
product-maker alex-l Mar 17 2017 9 excellent
product-maker MalteK Feb 19 2017 9 excellent
product-maker nowardev Jan 01 2017 9 excellent
product-maker srog Dec 26 2016 9 excellent
product-maker Base: 4 x 5.0 Ratings
feldim2425
Jun 21 2020
artdev
Jun 20 2020
slm33
Apr 30 2020
m4xp1
Dec 04 2019
b1tl0rd
Jul 21 2019
waces
May 15 2019
alex1701c
May 03 2019
smxms
Mar 27 2019
Bugworm
Mar 18 2019
m0ji
Feb 06 2019
x-varlesh-x
Apr 05 2018
mirkogennari
Mar 17 2018
x-varlesh-x
May 13 2018
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
1 Plings
0 Affiliates
Details
license
GPLv2 or later
version
10
updated Apr 30 2020
added Dec 26 2016
downloads 24h
12
mediaviews 24h 0
pageviews 24h 16