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

contrib/inactive-windows-transparency fixes #7197

Closed

Conversation

gibbz00
Copy link

@gibbz00 gibbz00 commented Oct 3, 2022

Pull request an attempt to collect a multitude of unresolved and conflicting pull requests into logical commits for one hassle-free merge. Namely:

#6924 by aelfsyg

  • set active opacity with -a or --active-opacity

Test: ./contrib/inactive-windows-transparency.py -a 0.9

  • add a list of applications to ignore with --ignore

Test: ./contrib/inactive-windows-transparency.py --ignore firefox gimp

  • override active opacity for specific applications with -A or --active-overrides

Test: ./contrib/inactive-windows-transparency.py -A firefox=0.95 gimp=1

  • override inactive opacity for specific applications with -I or --inactive-overrides

Test: ./contrib/inactive-windows-transparency.py -I firefox=0.75 gimp=0.7

#6500 by tstivers1990.

  • show only one window as active when using multiple monitors

Test plan:

Preparation: More than one outputs (monitor) is required. Start script, create two windows on each output.
Before: Move focus between outputs and observe that one window is active on each monitor.
After: Move focus between outputs and observe that only one window is active.

#7104 by anpandey

  • properly reset opacity of hidden scratchpads upon exit

Test plan:

Preparation: Start script, create scratchpad, and make sure that it is hidden.
Before: Stop script, open up scratchpad, and observe that it's opacity value remains.
After: Stop script, open up scratchpad, and observe that its opacity value does not remain.


Further explanations about each commit are expressed in their own commit message. If there is anything I've missed, just let me know.

Hidden windows in the scratchpad failed to have their transparency
reset upon program exit. This is because they are kept separetly in
`ipc.get_tree.scratchpad()`, and not in `ipc.get_tree.workspaces()`.
Script currently has the ability to show multiple windows as active,
wrongly implying that more than one window can be focused at the same
time. It happens when multiple outputs are configured such that multiple
workspaces can be simultaneously shown. Stemming from a conditional to
only change transparency values if the focus change is done on the same
workspace in which the previous focus change was made. (Introduced in:
6235423.) Commit is somewhat poor in
that it clumps multiple features into one commit, so it's hard to
understand what problem the author attempted to solve with the
conditional. I, for one, can not see any other reason for adding this
arguably incorrect behavior, as it goes directly against the script's
purpose. As such, it's regarded as a bug and the change will remove the
behavior entirely, not making it an option.
Opacity of active window can now be set with the -a or --active-ocacity
flag. Previous inactive opacity flag (-o) has changed to -i or
--inactive-opacity. Change will break for users using the old flag.
Works as the title suggests. `--ignore firefox vlc gimp` would as an
example completely ignore any opacity modifications to the respective
windows, defaulting to 1.
Adds application specific ovverides for both active and inactive window
opacities. Done by using -I / --inactive-overrides or -A /
--active-overrides with the option syntax 'app_id=opactiy_value'.
For example: -A firefox=0.95 kitty=0.7 -I firefox=0.3
@gibbz00 gibbz00 force-pushed the inactive-windows-transparency-fixes branch from 56f40b1 to 32bcfa5 Compare October 3, 2022 13:38
@gibbz00
Copy link
Author

gibbz00 commented Nov 25, 2022

@emersion any plans to get this merged? I know it's low priority for you, but I put quite some time for it to be a clean one, don't think there is much work left to do.

@bakhtiyarneyman
Copy link

Would be great to see this merged!

@gibbz00
Copy link
Author

gibbz00 commented Feb 9, 2023

Would be great to see this merged!

Unfortunately, I think you're better off copying the script yourself (and each time Sway is updated :/ ). One thing for devs to put this on their review backlog. But another to get completely ignored with no response whatsoever. Makes you really motivated to help fix open issues for a project that you love. /s

@emersion
Copy link
Member

emersion commented Feb 9, 2023

Sorry, but we don't have the bandwidth to review contrib/ material right now. We're having trouble even reviewing the bugfixes and minor core improvements. Please, understand that we are volunteers and that we cannot reply to everything.

Related: #7405

@emersion
Copy link
Member

emersion commented Aug 2, 2023

The contrib/ directory has been moved from Sway to a separate repository: https://github.com/OctopusET/sway-contrib

Please re-open your pull request against the new repository.

@emersion emersion closed this Aug 2, 2023
@gibbz00 gibbz00 deleted the inactive-windows-transparency-fixes branch September 22, 2023 16:04
@gibbz00 gibbz00 restored the inactive-windows-transparency-fixes branch September 22, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants