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

Support for assigning class and their instances to tags #52

Closed
dakyskye opened this issue Jun 17, 2020 · 10 comments · Fixed by #130
Closed

Support for assigning class and their instances to tags #52

dakyskye opened this issue Jun 17, 2020 · 10 comments · Fixed by #130
Milestone

Comments

@dakyskye
Copy link
Contributor

dakyskye commented Jun 17, 2020

I am not really familiar with tagging system, but as a guy who used workspaces for months, I would like to assign some applications to certain tags by their class. This is useful if you start a couple of GUI/TUI applications at login, because if you don't assign them to tags, they will get launched in the same tag, and would be a mess! So, for example, this should do the job in the config file:

[[appRule]] # every class of Alacritty
class = 'Alacritty'
instance = ''

[appRule.assignment]
monitor = 1
tag = 3

[[appRule]] # cordless instance of Alacritty, overrides above ^
class = 'Alacritty'
instance = 'cordless'

[appRule.assignment]
monitor = 1
tag = 4

[[appRule]]
class = 'firefoxdeveloperedition'
instance = ''

[appRule.assignment]
monitor = 0
tag = 1
@dakyskye
Copy link
Contributor Author

dakyskye commented Jun 22, 2020

Titles should also be supported, because AFAIK instance and title may not match, and that makes sense.

@avahe-kellenberger
Copy link
Owner

One note, we should have it be tags and an array of tag numbers

@avahe-kellenberger
Copy link
Owner

avahe-kellenberger commented Sep 17, 2020

Another note, when talking to another user, they want to be able to set a window as floating in a similar fashion.
Should have an option for class and name.

@PMunch
Copy link
Collaborator

PMunch commented Sep 17, 2020

With some windows assigned to tags this way it may also make sense to be able to configure the default number of masters on a per-tag basis.

@avahe-kellenberger
Copy link
Owner

@avahe-kellenberger Self ping - combine with #68, but use the method daky suggested in this issue.

@avahe-kellenberger avahe-kellenberger pinned this issue Feb 10, 2021
@avahe-kellenberger
Copy link
Owner

@dakyskye What was your intention for instance, do you mean _NET_WM_NAME?

@dakyskye
Copy link
Contributor Author

The instance is the first value of WM_CLASS. For example: WM_CLASS(STRING) = "cordless", "Alacritty" means it's an instance of Alacritty class called cordless. So this can be useful when you want Nimdow to assign cordless to certain tag. The other way would be using WM title, but I'd prefer a terminal instance called cordless.

@avahe-kellenberger
Copy link
Owner

@dakyskye I was thinking of doing something like this:

[[appRule]] # every class of Alacritty
class = 'Alacritty'
monitor = 2
tags = [ 3, 4 ]

[[appRule]] # cordless instance of Alacritty, overrides above ^
class = 'Alacritty'
instance = 'cordless'
monitor = 2
tags = [ 4 ]

[[appRule]]
class = 'firefoxdeveloperedition'
monitor = 1
tags = [ 1 ]

Unless there was a reason to have an appRule and appRule.assignment. Thoughts?

@dakyskye
Copy link
Contributor Author

Yup @avahe-kellenberger that's cool. Should also support class = '*' or empty class + instance set, or title.

@avahe-kellenberger
Copy link
Owner

Started work on the app-rules branch.

Should be able to finish it this weekend, if nothing unexpected comes up.

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

Successfully merging a pull request may close this issue.

3 participants