Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-zero value on cancel #2

Open
geowarin opened this issue Jan 11, 2022 · 2 comments
Open

Non-zero value on cancel #2

geowarin opened this issue Jan 11, 2022 · 2 comments

Comments

@geowarin
Copy link

Hello,

I really like qlipmon, very nice tool.
It's just missing one thing to fulfill my wildest dreams: a non-zero value on cancel.

With this I could do something like rofi -modi qlipmon -show qlipmon && xdotool key Ctrl+v, for instance.

Looking at the interface of rofi-mode, I could not find an easy way to achieve this.
It seems that rofi only has this behavior in dmenu mode, which is pretty weird.

Other tools like rofimoji make a wrapper around rofi to get this result. But this would very much break your design.
And this probably won't work with a clipboard manager anyway (what if the selection is not text-only?).

Greenclip has an issue about this, with no satisfactory solution.

Another way would be to listen to the dbus interface while the menu is invoked and only execute an action if something happens on dbus. But I've no idea how to do this in shell.

Maybe a small script in Python or C would do the trick.

What do you think?

@vcalv
Copy link
Owner

vcalv commented Jan 11, 2022

I see no way to control the exit code from rofi. Doesn't seem doable.

I could try looking into whether I could add an option to paste upon selection.

Maybe it can be pasted on qlipmon_mode_destroy `but no guarantees.

I'll look into it.

@vcalv
Copy link
Owner

vcalv commented Jan 24, 2022

pasting on qlipmon_mode_destroy works.

Either xdotool key ctrl+V or `xdotool type "buffer"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants