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

Rewrite the preferences to a more modern look, and add options #180

Merged
merged 29 commits into from
Apr 2, 2022

Conversation

aunetx
Copy link
Owner

@aunetx aunetx commented Jan 25, 2022

This is a big rewrite of the extension, nearly every component is changed.

This will fix #54, and will permit to complete #39 to select which window is blurred from the preferences :)

@aunetx aunetx added the enhancement New feature or request label Jan 25, 2022
@aunetx
Copy link
Owner Author

aunetx commented Jan 29, 2022

@CorvetteCole you may want to check here, a lot have changed, including but not limited to:

  • use gresources to load external files (not very useful for the moment, but maybe more when preferences are correctly done), and better makefile
  • per-component brightness/sigma preferences if the user wants to (through gsettings for the moment)
  • a lot of refactor (limit of 80 characters per line when possible, enforce the use of semicolon everywhere)
  • applications blur enhanced:
    • xprop format changed to have a more extensible API (you can see in details in the code, I commented a lot), now you need to set mutter hint to blur-provider=sigma:20,brightness:0.6 for example, or blur-provider=s:20,b:0.6 equivalently
    • possibility to select permanently-blurred applications (through gsettings for the moment)
    • fixed some bugs that did not appeared with non-permanently blurred apps

These are some very big changes, including to the PR you submitted, so tell me what you think about all of this!

For the moment, the main part of this PR is not done (you can check preferences... it's pretty empty :p); but all these changes will eventually permit this.

You can test this, it works pretty well (apart from some bugs, like applications blur not being correctly applied after extension restart due to how I connected everything together; I will need to change some more things in order to prevent that).

Edit: if you want to test changing preferences without the GUI, you can use gsettings with:

make build
gsettings --schemadir build/schemas set org.gnome.shell.extensions.blur-my-shell property value

I post this here because it took me some time to get it right, changing gsettings without the associated schemas is unbelievably hard to do...

@CorvetteCole
Copy link
Collaborator

that's great! I'll definitely take a look. I previously took the sigma from the applications and the brightness from the extension settings so this works for sure.

I'd love to help with the settings rewrite too! Glad to be working with you on this

Components are enabled when the shell is entirely loaded
Can now update applications blur dynamically
@aunetx
Copy link
Owner Author

aunetx commented Feb 1, 2022

Apps blur should now work pretty well, the blur now updates when dconf is changed, etc... the UI preferences are probably the only big missing chunk now.

Apps are still not blurred on overview etc, but I guess this will wait some time (this PR will probably not include this), and I may add a way to add transparency to blurred windows if the user wants to (or if xprop wants).

BTW, no need to change glasstron, this should normally be fully backward-compatible with blur-provider.

@bertin0
Copy link

bertin0 commented Feb 2, 2022

How would I go about testing the application-blur with this new PR? What else do I need to do other than setting applications-blur to true and the whitelist to my app through gsettings be enough? Also, can I do that in the schemadir ~/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/schemas, or is it necessary to do it before installing in the build folder?

@aunetx
Copy link
Owner Author

aunetx commented Feb 2, 2022

Well, I guess after installing from this branch, these two things should be enough! You can find your app name with xprop (it's the WM class name iirc), and simply put that with gsettings.

If that works from the extensions dir then that's enough, although I don't remember if I included everything needed in it (but else, just make build and take it from build/schemas)

@bertin0
Copy link

bertin0 commented Feb 2, 2022

Thanks! It does work from the extension folder, my only issue was I didn't have the correct app name, and yes the WM_CLASS is the right one. One issue though: doesn't seem to work on wayland. Is it because xprop is X11 specific? If so, is there any way you could implement it on wayland?

Edit: On a first search on this topic I found this gnome-specific API to query the currently active windows, maybe this could be used to implement this on wayland?

@aunetx
Copy link
Owner Author

aunetx commented Feb 2, 2022

In what way doesn't it work in wayland? To get the window name with xprop? Once the settings is updated, there will be an option to directly select the window from there -- so no need to use xprop or anything :)

@aunetx
Copy link
Owner Author

aunetx commented Feb 2, 2022

(and to get the WM name from gjs, I already did that, so the only thing missing is a way to select a window from the prefs, similarly to the window selector for the new screenshot tool)

@bertin0
Copy link

bertin0 commented Feb 2, 2022

Blurring alacritty for example doesn't work for me on wayland. I have set the whitelist to Alacritty (as per WM_CLASS) and on x11 it works perfectly as soon as I set the gsetting, but reloggint into wayland it has no blur, so that's why I assumed that xprop was used internally to determine what apps to apply blur to. Nevermind, setting the whitelist again made it work on wayland too, but it doesn't seem to stick (if I restart the app I need to set the whitelist again to a different string for it to pick it up)

@CorvetteCole
Copy link
Collaborator

hey @aunetx is there anything here in particular you'd like me to have a go at? I'm going to have quite a bit of free time for the next week or so, looking for a project!

@CorvetteCole
Copy link
Collaborator

I can always in general just work on polishing this PR as well

@aunetx
Copy link
Owner Author

aunetx commented Mar 28, 2022

hey @aunetx is there anything here in particular you'd like me to have a go at? I'm going to have quite a bit of free time for the next week or so, looking for a project!

Hello @CorvetteCole, sorry for the delay, as you may see I am quite busy but I try to find some time to continue this PR!

For the moment, the main thing to do is implementing the preferences UI, if you want you can spend some time doing this -- although this is pretty hard for the moment, as I have not finalized how I would like the UX to be (I still wonder about how I should place some buttons).

Except this (which I will work on anyway, and I begin to understand libadwaita so I should do something ok), you may want to try working on :

@CorvetteCole
Copy link
Collaborator

thanks for the to-do list. I'll take a look this evening. Might take a look at #171 because I have multiple monitors and can easily test it. If you're okay with me doing some UX design I've got a bit of a knack for that so I might give that a go as well! We'll get this done

- add dash-to-dock background override option
- add overview components stylize option (to make dash, search, ... semi-transparent)
- remove `dash` components, as its only effect is managed by components stylizing now
@aunetx aunetx marked this pull request as ready for review April 2, 2022 17:02
@aunetx
Copy link
Owner Author

aunetx commented Apr 2, 2022

@CorvetteCole if you have the time, could you test this PR and see if everything works? It is now fully ready :)

@aunetx aunetx requested a review from CorvetteCole April 2, 2022 17:29
@aunetx aunetx merged commit c2ac8b2 into master Apr 2, 2022
aunetx referenced this pull request Apr 3, 2022
@bertin0
Copy link

bertin0 commented Apr 3, 2022

I still have issues with blur not sticking on wayland as i mentioned above.

Demonstration (Tried using the new preferences on gnome 42 too but have reverted to 41 since):

blur-not-sticking.mp4

Basically it seems that the blur only gets applied to the windows open when the whitelist is first set, and that it doesn't properly check new windows.

@aunetx aunetx deleted the preferences-rewrite branch April 11, 2022 12:13
pull bot pushed a commit to TheRakeshPurohit/blur-my-shell that referenced this pull request Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to adjust panel brightness/sigma independently
3 participants