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

add toggle-window-rule-opacity action #991

Merged
merged 1 commit into from
Jan 23, 2025
Merged

add toggle-window-rule-opacity action #991

merged 1 commit into from
Jan 23, 2025

Conversation

Faervan
Copy link

@Faervan Faervan commented Jan 16, 2025

Add an action that toggles the opacity of the active window (or the window with the given id).

@Faervan Faervan changed the title add toggle-opacity action add toggle-window-opacity action Jan 16, 2025
@phisch
Copy link

phisch commented Jan 17, 2025

Could possibly be done if something like this was implemented: #1001

@Faervan
Copy link
Author

Faervan commented Jan 17, 2025

Could possibly be done if something like this was implemented: #1001

well as I understand #1001 it would only allow to toggle a config block on or off. The point of this pr is to enable a per-window toggle of the opacity. The global opacity toggle can already be accomplished by making a custom script using sed (as YaLTeR pointed out on matrix) or smth similar, but a per-window toggle without this pr would require setting config rules for the focused window using the app-id and title, which would be a really hacky and ugly workaround I imagine.
This pr is a more elegant and 100% working solution to archive this.

niri-ipc/src/lib.rs Outdated Show resolved Hide resolved
src/layout/mod.rs Outdated Show resolved Hide resolved
src/window/mapped.rs Outdated Show resolved Hide resolved
wiki/Configuration:-Window-Rules.md Outdated Show resolved Hide resolved
wiki/Configuration:-Key-Bindings.md Outdated Show resolved Hide resolved
niri-ipc/src/lib.rs Outdated Show resolved Hide resolved
@Faervan Faervan requested a review from YaLTeR January 19, 2025 14:40
@Faervan Faervan changed the title add toggle-window-opacity action add toggle-window-rule-opacity action Jan 19, 2025
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 23, 2025

Did some small fixes, particularly when the opacity window rule becomes 1, the ignore flag is reset to avoid surprises later on. Let's merge this.

@YaLTeR YaLTeR merged commit a10705f into YaLTeR:main Jan 23, 2025
9 checks passed
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 23, 2025

Thanks!

@Faervan
Copy link
Author

Faervan commented Jan 23, 2025

thank you for merging this :)

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 this pull request may close these issues.

3 participants