sway-interactive-screenshot icon indicating copy to clipboard operation
sway-interactive-screenshot copied to clipboard

Add Wofi support

Open binraptor opened this issue 1 year ago • 3 comments

Add Wofi support to use it as another option for the action selection menu. To enable it, specify it in the configuration file, and, optionally, specify the path to the style as an additional argument:

[ask]
command = "wofi" 
args = ["--style", "/path/to/style"]

Since Wofi doesn't have built-in support for returning indices like Fuzzel (--index) or Rofi (-format i), the implementation involves manually calculating the index by comparing the selected item's text against the list of choices.

binraptor avatar Dec 18 '24 13:12 binraptor

Besides the detail above, this looks good.

moverest avatar Dec 18 '24 22:12 moverest

I understand that manually calculating the index may not seem as good as using the built-in parameters, but this was a possible forced approach to solve this. If you or anyone else sees any potential issues with this approach or has suggestions for improvement, I’d be ready to address them.

binraptor avatar Dec 19 '24 11:12 binraptor

It's not ideal as there could be two windows option with the same title. It is a problem in and of itself as the user can't really tell which one it is. I guess one option would be to add the position and size if two windows have the same name. All of this to say that we should not have two option with an identical label.

Having said that, this is outside of the scope of this MR so I think we can keep your solution and fix this issue after.

20241219_16h39m41s_grim

moverest avatar Dec 19 '24 16:12 moverest