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

Using aliases to edit, not overwrite, names #30

Open
xathon opened this issue Aug 29, 2022 · 3 comments
Open

Using aliases to edit, not overwrite, names #30

xathon opened this issue Aug 29, 2022 · 3 comments

Comments

@xathon
Copy link

xathon commented Aug 29, 2022

I have a program with a pretty long name, that I often have running in multiple instances. I'd like to be able to alias this in a way that, for example, Window Title - Superlong Programname becomes Window Title - SLP. Currently I can only find the option to have it appear as SLP, without catching the rest of the name of the window.

@roosta
Copy link
Owner

roosta commented Aug 30, 2022

I'm not sure I understand the problem. Couldn't you just setup an alias for the whole thing window title - Super long Programname

If you mean that i3wsr should preserve parts of the title, how do you suppose that would work?

@xathon
Copy link
Author

xathon commented Aug 31, 2022

Yeah, sorry for not being clear. The Window Title part is dynamic, so it could be foobar - Superlong Programname, qwerty - Superlong Programname etc., and I'd like to catch only the Superlong Programname part.
The aliases, if I understand correctly, currently work like this - if one alias matches the class/instance/name of the window, it replaces the whole name with the value entered as alias. From how the readme looks like, I'd expect to have quoted strings
I understand that this might be a breaking change, but would it be possible to have at least the option to only have it replace the part of the property that the regex string matches? Like this:

# If the window title is 'New Tab - Google-chrome-unstable'
"^Google-chrome-unstable$" = "Chrome-dev" # doesn't match
"Google-chrome-unstable$" = "Chrome-dev" # new title is New Tab - Chrome-dev
".*Google-chrome-unstable" = "Chrome-dev" # new title is Chrome-dev

@roosta
Copy link
Owner

roosta commented Aug 31, 2022

OK, I understand better now. I can create an option to enable replacing only the matched part of the regex. I'll address this and some other stuff when I get the chance. I'm a bit bogged down with projects ATM, but I plan on doing some serious work on i3wsr when things slow down a bit.

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

No branches or pull requests

2 participants