Run Command

Plasma 4 Widgets

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

8
Score 76.7%
Description:

Simple plasmoid to run commands with support for runners.
Developed and tested on KDE 4.8 with Qt 4.7 (Kubuntu 11.10).

Features:
- optional use of runners;
- possibility to open web addresses (including searching, example: gg:query), invoke mailer, open directories and files (including use of KIO);
- possibility to run command in terminal (by prepending it by dollar sign - $);
- simple calculator (example: =2+2);
- simple numbers converter (to binary, octal and hexadecimal systems; examples: bin=12, oct=10, hex=8);
- commands to manage session (logout, lock, switch, shutdown, reboot);
- auto run of command after selecting;
- commands history shared with KRunner;
- activation shortcut.

If you have found bugs or have suggestions you can contact me via email, message or using comments, before you will vote bad. And remember that not everybody has enough time for fast replying. ;-)
Last changelog:

7 years ago

2.5 (04.02.2012):
- fix resizing in KDE 4.8;
- some other fixes and small changes.

2.4 (04.01.2012):
- implement configChanged() method (useful for scripting);
- do not advertise resizing if panel toolbox is open.

datamaskinen

8 months ago

kde 5 ??

Report

C

Emdek

7 months ago

KDE5 is incompatible, requires rewriting C++ based plasmoids from scratch...
Right now there are no plans to port it, if someone would like to help with that then feel free to contact me.
Personally I find KRunner acceptable, but not perfect.

Report

msx

5 years ago

Hi, at least is gone the dreadful ghost shadow!
Still, Run Commander seems to dislike thinner panels, please have a look:
https://copy.com/nZIMRoZxJn3v

I would be most grateful if you could tweak it to fit well on a -24px panel.
Cheers.

Report

C

Emdek

5 years ago

I'm 99% positive that it happens due to way how Plasma::ComboBox is painted (very hacky way, apparently not tested enough, since almost nobody uses Plasma styled combo boxes...).
The only way to fix this (and other visual glitches) would be to reimplement whole combo box widget, but I'm not sure if this is possible (it requires access to Plasma style classes etc., I'm not sure if all needed API is public).

It may make more sense to produce version that simply doesn't use Plasma styled widget, fancy background isn't worth numerous painting bugs (incorrect colors, clipped text etc.). Or try to do custom combo box like widget directly in QML (since it will be required anyway for KDE5/Plasma2).

Report

pprkut

6 years ago

Hi!

I was trying the widget on 4.10 and while it generally works fine, I noticed a few things that tarnish the experience a bit:

- The input field where you type the command has a padding inside, which when the height is small causes the characters to only show partially. That could be a limitation on the input field itself, but maybe there is a way to remove the padding?
- I can't scroll though the history. Dragging the scrollbar does nothing and scrolling with the mouse wheel only scrolls the selected item (all others stay where they are)
- The widget showing the results has a static size, and elements are vertically centered. Maybe this could be done similar to how the notification widget or the device notifier work? (ie, have it expand from the panel rather than just appear and have it dynamically resize according to the number of results)
- It would be nice if you could navigate with the arrow keys through the results. Currently it just scrolls the list without changing the selection

Would be great if you could have a look at these things :)

Report

dotNet

6 years ago

but on kubuntu 12.10 (installed from repos) i cannot resize the plasmoid vertically, and the text is cut in half.

Report

C

Emdek

6 years ago

Could you please check if this is current version (versions from packages are sometimes extremely outdated...)?
Also, could you please post here link to some screenshot showing this issue?

Report

dotNet

6 years ago

http://ompldr.org/vaDE4dQ

It's 2.5-0, on kubuntu 12.10
and like i said, I can't increase the size vertically, I can just drag to extend it horizontally.

thanks for any tips

Report

C

Emdek

6 years ago

Well... It's not really supposed to be resized vertically, especially with current state of editable combo boxes in Plasma, they are really neglected by developers since they are nearly unused (the only other known by me instance is web browser applet).
I think that I should stop using them and go for standard line edit and add custom history popup, the main drawback is that there would be need to some kind of button to trigger it.

Report

msx

6 years ago

Hello Emdek, I have some news here!

First, I want to make you aware about this issue that occurs some times with Run Command, please take a look at them here:
http://i.imgur.com/njgWu.png
http://i.imgur.com/FYpk5.png

As you see this probably happens because I have a very thin panel (something in the ~24px order).
I would like to know if this is directly related to Run Command or more of a limitation of the Plasma Panel itself so if it is I can place a bug report to it's devs.

Second: is there any way to implement the use of Esc key to return focus to the previous application I was working in before I called Run Command?
As I use Run Command as a substitute of KRunner I usually call it via a hotkey (Super+z), the problem is that once I accomplish the task I was looking for - like translating a word using http://kde-apps.org/content/show.php/krunner-googletranslate?content=144348 - there's no way to go back to the document/email/code I was editing with the keyboard, I just have to go there with the mouse - somewhat akward if you ask.
So if this is possible I would love if you implement a way to 'give-back' the focus to the last application used before calling RC :)

Report

C

Emdek

6 years ago

1. This is bug in Plasma, exists only for custom KComboBox, it happens only if widget is not resized after creation (you can check out using plasmoidviewer).
https://bugs.kde.org/show_bug.cgi?id=292879

2. That would be surely useful, but I'm not sure if possible.
Maybe this would work, but not necessarily, due to hack needed to give it focus in first place (applies to all applets placed on panels):
http://doc.qt.digia.com/qt/qwidget.html#clearFocus
Another possible solution could be to remember previously active window and set it as active using KWindowSystem API.

Report

msx

6 years ago

Hey,
nice you post the link to the bug report, I will add my own entry there.

I will check aswell the other link and find out a workaround.

Best.

Report

msx

6 years ago

Oh man this is sweet, one of the few plasmoids that I found that is actually *useful* and not only something fancy!
I completely replaced KRunner with Run Command, congratz!

Report

C

Emdek

6 years ago

I'm glad to hear that you like it. :-)

Report

msx

6 years ago

SHEEEEET!!!
This is the correct link:
https://plus.google.com/u/0/111794870164633905684/posts/HwuutCf6oNM

Report

msx

6 years ago

Oops I forget the screenshot url: https://plus.google.com/u/0/111794870164633905684/posts

Report

kbios

7 years ago

Hi, while i really like this widget, I've been running into these issues:
- Cut text (as reported above) -> fixed by adding
m_comboBox->setFixedHeight(30);
in
RunCommandApplet::init()

- I cannot resize it whatever I try (panel settings opened or closed, objects locked or unlocked). The resize cursor appears, but nothing happens. Since by default it takes all the space on the panel, I have put
setPreferredWidth(200);
and it seems to work.

I am under KDE 4.8.0 amd64

Thanks again for this great applet

Report

C

Emdek

7 years ago

Resizing should work again, that was weird issue (looks like some upstream issue) but it has now workaround. :-)

Report

kbios

7 years ago

Thanks, and sorry for the delay!

Report

C

Emdek

7 years ago

1. This is issue known issue with drawing routine of Plasma::ComboBox, most likely method that paints text gets too small rectangle.
2. Sadly I must confirm this, something got changed in 4.8. :-/
I'll try to find solution for this issue or ask devs what can cause this (maybe this is Plasma bug).

Report

google01103

7 years ago

since 4.8 the plasmoid has been problematic for me

1) when it runs the text typed does not show in the text box, but does in the popup display

2) the text box at sometimes displays gradients of blue in blocks

3) it freezes and with it freezes the plasma-desktop, killing and and restarting plasma-desktop or KDE resolves it

Report

C

Emdek

7 years ago

I can only say that initial start of runners is much slower in KDE 4.8, so it may appear as freeze (for me it takes around five seconds). Does the same happen with runners disabled (through context menu)?
Do you have screenshots for these visual issues?

Report

google01103

7 years ago

Just added it back to the desktop and as soon as I left clicked in the text box my plasma-desktop froze - meaning none of the widgets worked including the panel. fyi I had recompiled it, used it once as earlier described and after restarting KDE adding it back it immediately froze plasma when clicked.

It seems that if I remove, compile and then reinstall (or maybe just reinstall) it will maybe work once but then it jut freezes when clicked.

Report

C

Emdek

7 years ago

Try running it in standalone viewer:
plasmoidviewer runcommand

I've briefly seen there that gradient issue, this is new Plasma bug, looks like wrong painting of hover background.

Report

C

Emdek

7 years ago

Yes, this is Plasma bug:
http://simplest-image-hosting.net/png-0-plasma-desktopkh1921
Hover and focus state backgrounds are not properly drawn (probably are cached) until plasmoid is resized.

Report

7 years ago

2.5 (04.02.2012):
- fix resizing in KDE 4.8;
- some other fixes and small changes.

2.4 (04.01.2012):
- implement configChanged() method (useful for scripting);
- do not advertise resizing if panel toolbox is open.

12345678910
8
product-maker msx Sep 30 2012 9 excellent
product-maker kbios Feb 11 2012 9 excellent
product-maker e1nste1n Feb 04 2012 9 excellent
product-maker nowardev Jan 01 2012 9 excellent
product-maker soee Dec 31 2011 9 excellent
product-maker CatchTime Dec 02 2011 9 excellent
product-maker SvenArcher Dec 01 2011 9 excellent
product-maker vitoubien Dec 01 2011 9 excellent
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
2.5
updated Feb 04 2012
added Oct 18 2008
downloads today
0
page views today 4