Bug 283738 - krunner: support for aliases
Summary: krunner: support for aliases
Status: ASSIGNED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
: 195392 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-10 21:03 UTC by Fabian Henze
Modified: 2021-03-17 13:33 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Henze 2011-10-10 21:03:56 UTC
Version:           unspecified (using KDE 4.7.1) 
OS:                Linux

It would be great, if it was possible to define aliases in krunner. For example: instead of typing "screen brightness 100" one could configure an alias and run "sb 100".
or "ff" instead of "firefox", "k" instead of "konsole", and so on.
Do you understand what I am trying to say or should I elaborate? What do you think?

Reproducible: Didn't try



Expected Results:  
It's possible to configure custom aliases though KRunners configuration dialog
Comment 1 Fabian Henze 2011-11-18 09:26:24 UTC
To cut my long-winded explanation short:
A similiar concept to bash aliases in krunner would be great.
Comment 2 Jared B. 2012-03-15 20:14:46 UTC
I'd also like to see this, but from a different approach:  I'd like to see krunner support bash aliases and/or functions directly, that way I can leverage my already existing functions without needing to do anything special for krunner.  Plus, krunner itself wouldn't need to do anything more than, say, source ~/.bashrc on startup.  Should be an easy change, and would be quite convenient for users, as opposed to the current need to launch a terminal to run aliases/functions.
Comment 3 fire f. 2018-11-13 10:06:06 UTC
there is a ca. 5 line python demo of a krunner-plugin, which could be adapted to perform such a task. easy to test.
Comment 4 Alexander Lohnau 2020-08-11 11:48:09 UTC
Extra aliases for krunner seem a bit off to be, but what Jared B. described makes sense and should be doable!
Comment 5 Bug Janitor Service 2020-08-11 16:49:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/202
Comment 6 David Edmundson 2020-08-11 21:31:35 UTC
Just to add to that; one can create aliases another way:

Custom .desktop entries (either through kmenuedit or manually) will be shown in krunner. 

An extra advantage of that is you can then also easily assign global shortcuts as well as have more readable names. 

I would support any UX to try and surface that more - so we're building towards a common platform that reuses the tech we have, rather than adding layers on top.
Comment 7 Alexander Lohnau 2020-08-12 05:02:27 UTC
(In reply to David Edmundson from comment #6)
> Just to add to that; one can create aliases another way:
> 
> Custom .desktop entries (either through kmenuedit or manually) will be shown
> in krunner. 
But that is a different usacase. With aliases you can easily add another flag to it or pipe the output to another program etc. Your suggestion goes in the direction of BUG 396881.

> I would support any UX to try and surface that more - so we're building
> towards a common platform that reuses the tech we have, rather than adding
> layers on top.
Because we are reusing the already existing aliases I would not say that we are adding layers on top ;-)
Comment 8 Alexander Lohnau 2020-10-11 11:24:30 UTC
*** Bug 195392 has been marked as a duplicate of this bug. ***