Source i (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
Become a Fan
7.5

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:

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.


Ratings & Comments

143 Comments

datamaskinen

kde 5 ??

Emdek

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.

msx

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.

Emdek

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

pprkut

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

dotNet

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

Emdek

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?

dotNet

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

Emdek

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.

msx

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

Emdek

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.

msx

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.

msx

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!

Emdek

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

msx

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

msx

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

kbios

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

Emdek

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

kbios

Thanks, and sorry for the delay!

Emdek

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

google01103

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

Emdek

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?

google01103

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.

Emdek

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.

Emdek

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.

Pling
0 Affiliates
Details
license
version 2.5
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Plasma 4 Extensions from Emdek:

Adjustable Clock
Emdek
last update date: 11 years ago

Score 8.4

Mini Player
Emdek
last update date: 12 years ago

Score 7.9

Fancy Tasks
Emdek
last update date: 12 years ago

Score 8.4

Window List
Emdek
last update date: 15 years ago

Score 6.1

Spell Check
Emdek
last update date: 16 years ago

Score 5.7

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 13 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 12 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 15 years ago

Score 5.0

blaKjaK
werevire
last update date: 14 years ago

Score 5.0