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

[fr] Make the selected text obj dynamic #172

Closed
proItheus opened this issue Nov 10, 2023 · 1 comment
Closed

[fr] Make the selected text obj dynamic #172

proItheus opened this issue Nov 10, 2023 · 1 comment

Comments

@proItheus
Copy link

Actual Behaviour

I select someword, press Control + G, the selected text obj is selected, with value someword.

But when I select anotherword, press Control + Space to show kupfer, kupfer shows up, with selected text obj selected, but still with value someword.

And if I save selected text -> some action as a compound command, at the next time I execute it, some action will still receive someword, not current selected text.

Expected Behaviour

when I select anotherword, press Control + Space to show kupfer, kupfer shows up, with selected text obj selected

It's value should be anotherword.

And if I save selected text -> some action as a compound command, at the next time I execute it, some action will still receive someword

some action should receive current selected text

Background

I have an executable called goldendict , it's a dictionary program, and I can use goldendict <word> to look up in it.

To query selected text in that program, I use selected text -> pass to command -> goldendict.

And because my using wayland, I can't assign a shortcut to open kupfer with selected text.

Alternatively, I think we can allow saving partially applied actions, that is, for actions needing indirect obj, save action -> iobj1 as a newaction (maybe sth. similar to current compound command), and we can execute obj->newaction as a shorthand of obj->action->iobj1

@KarolBedkowski
Copy link
Contributor

Hi,
Not sure if it resolve problem, but in current version you should be able to call any binding defined in Kupfer by something like:
dbus-send --type=method_call --dest=se.kaizer.kupfer /interface se.kaizer.kupfer.Listener.RelayKeysFromDisplay string:"<Primary><Super>space" string:"" string:""

Next release bring some updates that can help:

  1. Fix for updating current leaf: KarolBedkowski@83c01cb

  2. New dbus methods that can be used to show Kupfer with (i.e.) current selected text. KarolBedkowski@764243a

  3. There is also updated "dict" plugin that support Goldendict

In "next" version I can also create kfcom file (select "selected text" -> pass to command -> command -> ctrl+enter -> save as.. ). Executing this file is like executing sequence command. Not sure, it is work correctly in "current" version, though.

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