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

would like to use wofi instead of rofi for pure wayland #71

Closed
biwhite opened this issue Feb 20, 2020 · 13 comments
Closed

would like to use wofi instead of rofi for pure wayland #71

biwhite opened this issue Feb 20, 2020 · 13 comments

Comments

@biwhite
Copy link

biwhite commented Feb 20, 2020

wofi has slightly different arguments to rofi, so unfortunately not just a drop in replacement

@firecat53
Copy link
Owner

Sorry for the delay in responding! I haven't experimented with Wayland at all yet. I did a quick browse of the wofi repo, but didn't have time to dig into the docs. Are you able to figure out which command line options would need alteration in order to make it work?

@julientechdev
Copy link

wofi -d seems to be the dmenu mode for wofi, it should be compatible

@julientechdev
Copy link

to make it compatible, add this to the file .config/networkmanager-dmenu/config.ini:

[dmenu]
dmenu_command = /usr/bin/wofi -d

@biwhite
Copy link
Author

biwhite commented Apr 8, 2020

Seems the 'fn' option messes it up. works with -d, without the 'fn' option set.

@firecat53
Copy link
Owner

@l4l submitted a PR (#83) to start adding support for wofi. Anyone here care to address the best way to handle the lack of support for the fn flag? Maybe not use it and address in the documentation?

@chron-isch
Copy link

I don't really mind the font, but I would really like to have pango markup support.

@firecat53
Copy link
Owner

@chron-isch I doubt pango markup is something I will add. In my opinion that adds a pretty substantial complexity for a minimalist tool that is rarely visible.

@chron-isch
Copy link

@firecat53 I think you misunderstood my comment, i wasn't asking for generic pango markup support, just replacing the rofi highlighting code with a little bit of pango markup to get highlighting of active network connections to work in wofi.

@firecat53
Copy link
Owner

@chron-isch : Ah, I see. I'd be happy to review a PR if you'd care to take a stab at it.

@markstos
Copy link

markstos commented Aug 2, 2020

There's also a fork of rofi that supports Wayland now:

https://github.com/lbonn/rofi#wayland-support

Not everything works though-- notably the window switching mode is not supported.

However, there is a dmenu based solution for window switching on Sway that works to see and switch to XWayland windows as well, using this bash script:

  swaymsg -t get_tree |    jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] |  select(.nodes==[]) | ((.id | tostring) + " " + .name)' |
         wofi --show dmenu | {
           read -r id name
           swaymsg "[con_id=$id]" focus
       }

However, since rofi supports custom modes that supply their own scripts, perhaps this approach could be used as the basis to implement a window switching mode for Sway, using the Wayland fork of rofi.

@mordax7
Copy link

mordax7 commented Jan 6, 2021

Where to find the PR for the Wofi implementation?

@markstos
Copy link

@mordax777 The comment above describes how to make it work for wofi:

#71 (comment)

@p00f
Copy link

p00f commented Jul 31, 2021

@firecat53 You already handle rofi with a special case, can you add one for wofi too:

        if "rofi" in dmenu_command:
            lines = "-i -dmenu -lines"
            # rofi doesn't support 0 length line, it requires at least -lines=1
            # see https://github.com/DaveDavenport/rofi/issues/252
            num_lines = num_lines or 1

            #wofi takes lines as `-L`
        elif "wofi" in dmenu_command:
            lines = "--dmenu -i -L"
        else:
            lines = "-i -l"

#71 (comment) will work for wofi except the argument for specifying lines is -L or --lines instead of -l so there will be extra lines. -p and -i are the same

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

7 participants