Run Command

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

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

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

C

Emdek

9 years ago

Quote:What textbox are you using?
This is standard Plasma::ComboBox widget using KHistoryComboBox.
So these bugs belongs there (for sure these caused by wrong widget drawing), wrong colors were already reported:

https://bugs.kde.org/show_bug.cgi?id=279446

Quote:I cannot get to my properties box because this is "owned" by krunner. If I kill krunner, it works just fine. Really "sharing" resources with krunner will be mighty tricky if it can be done at all. So an interface to runner properties dialogs will not work either.)

Applet only shares some configuration options, currently only PastQueries entry (commands history).
Common parts are provided by kdelibs.

Quote:To really coexist and share, one probably needs access to krunner's display widget and put that one itself up from the plasmoid. Can it be done?

No, dialog can't be shared, I would need to redo it and update when something is changed in KRunner.
Current results dialog is very simple, it uses QWidget based elements, no QGraphicsView etc.

Report

dovidhalevi

9 years ago

For the non-showing text, it is simply being shown (in my white on black plasma theme, but the combo-box text input background is white!) as a brighter white. You may need to set more palette items, maybe the bright text.

I used your palette code to set up my new menu, needed a button color of gray (but would be better some function of the plasma one--your "lighter" did not work.

Report

dovidhalevi

9 years ago

*****
-- Found KDE 4.6 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
CMake Error at applet/CMakeLists.txt:15 (add_subdirectory):
add_subdirectory given source "po" which is not an existing directory.

Report

C

Emdek

9 years ago

Oops, again, package fixed. :-)

Report

dovidhalevi

9 years ago

Great! Please post.

Report

C

Emdek

9 years ago

It's already updated. ;-)

Report

rascas

9 years ago

I have the same problem of the last user. Text appears cutted.
http://img29.imageshack.us/content_round.php?page=done&l=img29/6627/runcommand.jpg
Happens in 2 computers one of them with a fresh Arch Linux install
Any fix for this?

Report

C

Emdek

9 years ago

That's probably also related to this bug (wrong font size or something):
https://bugs.kde.org/show_bug.cgi?id=279446

I guess that they do nothing to fix it since probably nobody except of me is using it as editable control...
When I'll finally have some free time then I'll try to fix it myself and send patch upstream (won't be first time when I'm fighting with that widget, but since then they switched from SVN to GIT...) or try to poke them to at least confirm these issues.

Report

NiNuJe

9 years ago

I'm using this ugly patch/hack:

http://pastebin.com/0rKnnvVR

and it workarounds both the 'flexible width' thing, *and* the cropped text (granted, it removes the slight borders around the editbox, but at least I can see what I'm typing ;p).

Report

C

Emdek

9 years ago

At least customizable width should be available soon, hopefully. ;-)

Report

mkkot

10 years ago

Hello, thanks for this wonderful applet. I have some problems with colours. Please look at the screen:
http://pliki.netau.net/images/screen21.png
As you can see, fonts are white on white background. I double-clicked on the text, selecting it, so it can be visible at all on blue selection background.

Also, I think you could improve applet's behaviour: after hiding pannel where applet is located (pannel has autohide option), the dark bubble menu should disappear as well and shouldn't be displayed simultaneously with the list after clicking on the down arrow.

The other problem is, as mentioned few times above, location on the pannel. Is there any way to put your applet in this way?:
http://pliki.netau.net/images/desktop31k.jpg
Unfortunately pathing sources causes some artefacts and doesn't work well. I tried with those spacers but... agrh :P

I have latest archlinux and KDE 4.6.3 with plastic scheme, oxygen windows decoration, plastic/custom colour scheme and oxygen/custom plasma theme. Changing those motives doesn't affect run command applet.

Pozdrawiam ;)

Report

C

Emdek

10 years ago

Proper colors should be set by theme, do you have any other applet with any kind of text edit to check if colors are correct there?

Yes, results dialog should be closed when panel hides, I'll try to find solution for it (maybe there is even some signal emitted). But I'm rather against hiding it when showing other popups.
I have for long time another idea, to replace standard popups and results dialog with new one, combining them both, it would look like standard one but with icons (it should be even possible to have icon on right for run options and handle it correctly). This could be done as an option or another applet.

Isn't that close enough? :-)
http://simplest-image-hosting.net/png-0-runcommand

Or you are talking about resizing?

Report

mkkot

10 years ago

Hey, thanks for the reply. I should have received some e-mail notification about this but... huh, nevermind.

Text boxes in other applets look fine:
http://pliki.netau.net/?v=screen25.png
As you can see on the top is your applet with "test" command in text box and on the bottom is some dictionary plasmoid, also with "test". Run command has white letters on white background. Really no idea why it behaves like this, I have changed theme few times, reverted to defaults, nothing helps.

And the second question was about placement on the pannel. Your plasmoid takes whole space on it and spacers help, but they squeeze other elements near them. The only soultion I can think about is to create another pannel just for run command with fixed width. I need some mooron step-by-step instruction how to put this plasmoid on the pannel in the place where I want and with the size I want. Read already all comments about it but can't apply them.

Report

C

Emdek

9 years ago

1. Maybe palette is not set for text edit part of combo box (in Qt it's separate widget). Does pop up (that built in, shown after clicking on that small triangle) have correct colors?

2. I'll think about possibility to drag edge to resize it (this should be built in Plasma...).

Report

mkkot

9 years ago

1. No. Please look at this:
http://pliki.netau.net/images/screen100.png
(BTW this triangle is called arrow :P)
And here is my color scheme (and a drop-down list to compare:)
http://pliki.netau.net/images/screen101.png

Have selected the Default color scheme (for aero plasma motive I think). Run-command looks the same.
Then I reverted to my color scheme and selected Air plasma motive:
http://pliki.netau.net/images/screen102.png

Haven't found any plasmoid with such list to compare but I don't have problems with colours within other plasmoids.

Report

C

Emdek

9 years ago

I'll try to reproduce this in coming days, maybe there is workaround for this weird behavior.

Report

C

Emdek

9 years ago

I've noticed that strange clipping on one of your previous screenshots.
Clipping of line edit part of combo box could be a bug in Plasma::ComboBox drawing routine (I doubt if editable combo boxes where thoroughly tested as these aren't widely used...).
Although clipping of widgets in results view is more strange.
Did it happened before applying last change?
Does clipped out part react to mouse events?

Report

mkkot

9 years ago

Did it happened before applying last change?

Yes.

Does clipped out part react to mouse events?

Yes. Long answer: When mouseover, a border around selected position appears. When you click within the border, the application is activated without any problem: http://pliki.netau.net/?v=screen108.png

Report

C

Emdek

9 years ago

Try this workaround for now:
http://wklej.to/Jw1mq

But that's probably bug somewhere in this class:
http://api.kde.org/4.7-api/kdelibs-apidocs/plasma/html/combobox_8cpp_source.html

I've checked how is painted default Plasma::ComboBox (applet uses it with KHistoryComboBox instead of plain KComboBox) and it has the same text color problem (but only editable version), here is bug report:
https://bugs.kde.org/show_bug.cgi?id=279446

Report

mkkot

9 years ago

Hey, sorry it took so long. Your fix works. The only drawback is that caption is cut in the bottom:
http://pliki.netau.net/?v=screen103.png
(QWERTY is written there).

Appearing bubble has the same problem:
http://pliki.netau.net/?v=screen104.png

But it's usable for now, until you want to have this on the pannel :>
Thanks for your support.

Report

C

Emdek

9 years ago

Try this version of applet/RunCommandApplet.cpp:
http://wklej.to/3EqNs

Report

mkkot

9 years ago

Compiled, but it looks the same...

Report

PhantomNZXT

10 years ago

Hi, i'm strongly wanting to install ur plasmoid but when compiling, i got this error:

benoit@benoit-KDE4:~/Téléchargements/runcommand-2.2/build$ cmake ../ -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
ERROR: cmake/modules/FindKDE4Internal.cmake not found in
/home/benoit/.kde/share/apps;/usr/share/kubuntu-default-settings/kde4-profile/default/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
CMakeLists.txt:1 (find_package)


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

cmake is installed 2.8.3 i386

Thanks for ur help :)

Report

C

Emdek

10 years ago

You probably don't have all needed development packages, most probably kdebase-dev (or with similar name, these varies between distributions).

Report

PhantomNZXT

10 years ago

Thanks, great !! it works fine, i was needing these 2 packages
kdelibs5-dev
kdebase-workspace-dev

Thanks again, i love it in my taskbar, wonderfull works ;)

Report

9 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 Jan 01 2012 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
Be the first to comment
msx
Sep 30 2012
nowardev
Jan 01 2012
CatchTime
Dec 02 2011
kaznovac
Sep 02 2010
DaiVied
Dec 19 2009
mikef1016
Jul 28 2009
Montblanc
Mar 27 2009
saLOUtions
Dec 29 2008
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
2.5
updated Feb 04 2012
added Oct 18 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0