rofi icon indicating copy to clipboard operation
rofi copied to clipboard

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

Open saber-nyan opened this issue 7 months ago • 0 comments

Before opening a feature request

  • [X] I checked the next branch to see if the feature has already been implemented
  • [X] I searched existing reports to see if it is already requested.

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

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

saber-nyan avatar Nov 20 '23 14:11 saber-nyan