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

for_window rules are executed inconsistently #4346

Open
Airblader opened this issue Feb 13, 2021 · 6 comments
Open

for_window rules are executed inconsistently #4346

Airblader opened this issue Feb 13, 2021 · 6 comments
Labels
4.19 bug documentation missing-log Read the CONTRIBUTING.md file for instructions reproducible A bug that has been reviewed and confirmed by a project contributor

Comments

@Airblader
Copy link
Member

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

For some criteria, we re-evaluate for_window rules "at runtime", and this is even documented in the userguide, e.g. for changes to the title or role. However, other criteria such as "workspace" do not get triggered when a window is moved.

Expected Behavior

We should decide whether we want to either trigger rules for all changes covered in criteria, or document explicitly which criteria support what. Given that the latter is more simple, we can also document first and retain the option to adjust behavior as well.

Reproduction Instructions

# Config
for_window [title="tmp"] border pixel 10
for_window [workspace=test] border pixel 10

# Open a terminal and run
cd /tmp

# Open a terminal and run
i3 move window to workspace test
i3 workspace test

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.19.1 (2021-02-01) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.19.1 (2021-02-01) (pid 1678)
Loaded i3 config: /home/ingo/.i3/config (Last modified: Sa 13 Feb 2021 09:22:41 CET, 327 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
- Linux Distribution & Version: Manjaro
- Are you using a compositor (e.g., xcompmgr or compton): picom
@Airblader Airblader added bug documentation missing-log Read the CONTRIBUTING.md file for instructions reproducible A bug that has been reviewed and confirmed by a project contributor labels Feb 13, 2021
@i3bot i3bot added the 4.19 label Feb 13, 2021
@Airblader
Copy link
Member Author

I think we should aim to consistently trigger upon all changes covered by criteria. This is easier to reason with and will empower users to solve more use-cases, e.g. this question which led me to open this issue.

@Airblader
Copy link
Member Author

Also, it can be argued whether this is a bug or a feature request. I think the original intention was to run them, since "title" has been around forever and it works there, and we probably introduced criteria like "workspace" over time and just never thought to apply this behavior there. Either way, this is inconsistent, and inconsistency can also be seen as a bug – of the documentation at the very least.

@Airblader
Copy link
Member Author

One more point, I think we only run each assignment once per window. In terms of enabling such use-cases, we'd have to change that behavior as well. I think that well deserves its own issue, and should probably not be default behavior. I haven't given it much thought, though.

@Tonus1
Copy link

Tonus1 commented Feb 15, 2021

Have to investigate that. Especially the once for a window thing that seems odd to me...

@orestisfl
Copy link
Member

The "once for each window" thing is explicitly and intentionally done for criteria like title.

@mayfield
Copy link

mayfield commented Feb 5, 2023

Just wanted to chime in that this is by far my biggest issue with i3. Been a user for over a decade but the inexplicable for_window behavior makes me lose my mind every time I'm trying to accomplish very basic tasks like changing border style for floating windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.19 bug documentation missing-log Read the CONTRIBUTING.md file for instructions reproducible A bug that has been reviewed and confirmed by a project contributor
Projects
None yet
Development

No branches or pull requests

5 participants