lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
876 stars 35 forks source link

[REQUEST] Is it possible to execute custom commands by keyboard shortcut? #99

Open saber-nyan opened 7 months ago

saber-nyan commented 7 months ago

Before opening a feature request

What is the user problem or growth opportunity you want to see solved?

I have integrated rofi with cliphist clipboard manager. When run with "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy" from shortcut rofi conveniently displays the clipboard history as in the screenshot. Also in sway I have configured a shortcut to clear entire history.

Screenshot ![rofi screenshot](https://github.com/lbonn/rofi/assets/25345196/49370a91-aaa7-4279-8a45-097846a805f1)

But it would be convenient to delete a single history item in rofi when pressing, for example, Delete. A flag that runs a user-specified binary and passes the item that was selected at the time of the click would be useful for this.

Or perhaps there is an easier way to implement such a thing?

How do you know that this problem exists today? Why is this important?

The problem is not that important, but in general the implementation of such an option greatly increases the customizability of the rofi.

Who will benefit from it?

Rofi users who want to assign a keyboard shortcut and execute custom command, I guess?

Rofi version (rofi -v)

Version: 1.7.5+wayland2-151-g5cd1e3ca (makepkg)

Configuration

https://gist.github.com/saber-nyan/714c598c7d4f6e86a946179dbd5f8c73

Additional information

No response