roosta / i3wsr

Change i3-wm workspace names based on content
MIT License
178 stars 14 forks source link

Configurable separator #5

Closed PrimaMateria closed 4 years ago

PrimaMateria commented 4 years ago

Option in the config file to set string used as separator between window names.

roosta commented 4 years ago

Done, check out release v1.2.1

steinex commented 4 years ago

I almost feel bad about it, but I have one really minor nitpick about this one:

With separator = "", there is a space/gap between icons. This is especially visible when run with --no-names. I think this is the last thing that is holding me back from using i3wsr full time. :D

roosta commented 4 years ago

I have some issues removing space ATM, not sure why. Looking into it but a fix might not be incoming until next week some time. Could you illustrate what you are trying to do?

steinex commented 4 years ago

Sure. Right now, my workspaces look like this: without_spaces

With i3wsr, --no-names and separator = "", it looks like this: i3wsr

As you can see there is an extra space character between icons and a trailing space after the last icon of a workspace. I'd prefer if they would be absent - if one wants them, they could just use the new separator option for that too I guess.

Thank you very much!

roosta commented 4 years ago

So you'd like all whitespace removed between icons? I can remove the trailing whitespace no problem but I need some way of separating icons from the lead information in the workspace (workspace number etc) So if I remove spaces between icons i3wsr doesn't know when lead information ends and workspace names start, at least not with the current implementation

roosta commented 4 years ago

Oh, there is an extra whitespace char between them? Sorry, misunderstood there for a sec, I'll try to fix that. Thanks for your feedback :)

roosta commented 4 years ago

OK, I believe i fixed the issue in the whitespace branch. Could you pop over to that branch and test it and see if it works for you @steinex?

steinex commented 4 years ago

Can confirm it works! :)

I noticed that it will remove any whitespace between the icons now though, not just the extra one (at least it looks that way). However, when using separator = " " (mind the space) it's perfectly fine for me now and looks like on the first screenshot I posted above.

Just something to keep in mind, most people want to use something like separator = " | " now I guess so it doesn't look weird - or you bring just that one space back minus the extraneous one. :-)

roosta commented 4 years ago

The names should now only be separated by separator via some-vector.join() so there isn't any trailing whitespace that I can do anything about (you sure its not the your bar config?) The separator defaults to " | " unless something else is in the config so I think this should work for most users

steinex commented 4 years ago

Are you sure it defaults to " | "? When I set that explicitely it looks normal, if I uncomment that out or change it to "|" there is no single whitespace left, making it look squeezed.

It seems that with this branch, actually 2 spaces between the icons got removed instead of one. I can live fine with that using " ", I just want you to know so it doesn't change beharviour on users.

steinex commented 4 years ago

Oh, I missed your second commit in that branch that actually switches the default to " | " (8edb11a1aea82b8a06ddcc0a624f3ae9ce7d4bfa).

Just tested with this and everything looks good now!

Thanks for your patience and your work on this! :-)

roosta commented 4 years ago

Thank you for helpful feedback, I'll release a new version now

roosta commented 4 years ago

https://github.com/roosta/i3wsr/releases/tag/v1.2.2