aunetx / blur-my-shell

Extension that adds a blur look to different parts of the GNOME Shell, including the top panel, dash and overview
https://extensions.gnome.org/extension/3193/blur-my-shell/
GNU General Public License v3.0
1.58k stars 88 forks source link

Make folder view in app menu transparent #92

Closed KoNickss closed 3 years ago

KoNickss commented 3 years ago

Could you please add an option to make the folder box in the app menu blurry? or at least publish a summary on the codebase so I can make the pull request myself pls, in general a code overview is a good idea if you want people to contribute

aunetx commented 3 years ago

I would love to do so, but I can't get to open looking glass while an app folder is opened, so I have no way to easily test this... And I don't know at all where to get app folder's code in GJS :/

And about the code summary, this is something I should effectively do! TBH I don't have the motivation right now, and the code is not very hard -- at least, if you know some gjs basics I guess I will try to do the summary soon, and to search more for the app folder blur!

KoNickss commented 3 years ago

thats great! I'll do some research myself and maybe open a PR if I figure it out

aunetx commented 3 years ago

I'm currently searching in gnome shell gjs tree to see which function we could overwrite to add a blurred effect to the apps display widget opened; if you need somewhere to begin, it would be here I guess :)

aunetx commented 3 years ago

I have the beginning of an idea, but it's not very great for the moment (and I need to find a signal to connect to, so that I can do what I want every time an app folder is opened).

I can use in order (not tested, but I believe):

And ofc the inverse thing, when I receive the signal but the dialog is not displayed, so I can destroy my blur effect.

aunetx commented 3 years ago

Last commit added appfolders blur, but I still need to make some improvements before releasing it (see the commit's description for more infos)

aunetx commented 3 years ago

Will need to remove background colour for the "edit" icon too, looks weird being grey now...

KarkanAlzwayed commented 3 years ago

I second this. I was about to open a new issue about it, but searched first and found this issue already opened. Blurring an opened app folder background would go perfectly with this extension as it currently looks out of place. If you need help testing, please let me know.

aunetx commented 3 years ago

I second this. I was about to open a new issue about it, but searched first and found this issue already opened. Blurring an opened app folder background would go perfectly with this extension as it currently looks out of place. If you need help testing, please let me know.

@KarkanAlzwayed if you want to test what it would look like (I'm not sure about the style, so I'm open to ideas), you can install the extension with the latest commits on github

It is not fully implemented yet, as I will make a switch to be able to disable it, remove some artefacts and maybe make the blur less blurry, but it should work OK anyway.

As an alternative implementation, I could blur the background image instead, so that the background is the exact same as when we are in overview; it may look great (and be less buggy, as it would be a static blur), but less "understandable" from an UX pov

KarkanAlzwayed commented 3 years ago

I don't know much about github (still learning), where is the download? Or should I just "git clone" it then "make install"? EDIT: Ok, so it was "git clone". So, I installed it and it does blur the folder, but the it also blurs the whole background. The folder background is dark blurred and it matches the whole overview background. Here is what I get:

Screenshot from 2021-07-03 21-49-07

And I think that it should be like this with the ability to tell between the folder and the folder background. Meaning the folder background should be either blurred light (what I would prefer to make it stand out more) or dark blurred.

Screenshot from 2021-07-03 21-51-02

aunetx commented 3 years ago

Ok thanks for the reply! Will definitively need to improve the look, but I still can't get to remove the dark background to be honest...

I think doing what you said would be doable (pretty easily actually), but it may be confusing in the same time (as, like you said, it would be harder to tell if we are in a folder or not, because we would not see the icons behind)

KarkanAlzwayed commented 3 years ago

Do your thing and I'm here to test for you. Just let me know when to pull another commit whenever you make changes.

Ferryistaken commented 3 years ago

Same here I'm down to test, this feature would be greatly appreciated

aunetx commented 3 years ago

I moved development to branch blur-appfolders to fix #101

aunetx commented 3 years ago

I could not find any way to add a static background to the appfolders, sorry... But I managed to get a proper blur, and animated it properly (I say this, because it took me my entire night TBH :p )

@KarkanAlzwayed @Ferryistaken if you want to test the last commit on branch blur-appfolders, this is what the final UI should look like! Is that good enough for you?

Of course, I still need to remove artefacts, add a switch in preferences to disable appfolders blur if wanted and to find a way to make the CSS selector for appfolders only apply if appfolders blur is enabled (it will be quick, I just need to sleep before doing anything more).

BTW, if anybody find a way to remove (in CSS) the grey background of the 'edit' button (and its editable textbox) which is shown inside each appfolder, please tell me! It harasses me to see it, but I'm too lazy to search more for now...

aunetx commented 3 years ago

before Capture d’écran de 2021-07-21 03-25-05

after Capture d’écran de 2021-07-21 03-23-29

:D

aunetx commented 3 years ago

Everything seems fixed, time to move on :) I merge this into master and close the issue, please reopen it or open another issue if something is wrong

KarkanAlzwayed commented 3 years ago

This looks very good. A suggestion, though (if at all doable). Wouldn't it be better if you took the folder background in the "before" screenshot and made it slightly blur (keeping the gray-ish) background, just make the blur percentage different from the whole background, that way the folder could still be distinguishable and doesn't blend in with the whole blurred background. Just a thought, though. I hope that makes sense.

aunetx commented 3 years ago

Thanks for the review! This is a good idea, although blurring it would not be possible (as we would then have non-rounded corners, which is not very great...)

We could just add some opacity to the folder, although it may look less clean

If you want to test it, you can change in .local/share/gnome-shell/extensions/blur-my-shell@aunetx/stylesheet.css the .transparent-app-folder-dialogs thing by:

.transparent-app-folder-dialogs {
    background-color: rgba(0, 0, 0, 0.18);
}

And then restart, and maybe change 0.18 by what you want. TBH, I prefer without it, so if I add this it may be with a switch for it (but it may be harder then, as it would not involve only css...)

KarkanAlzwayed commented 3 years ago

I'll mess with it after work today. I'll post what I come up with here and see. Cheers 🍻

aunetx commented 3 years ago

Ok thanks!

KarkanAlzwayed commented 3 years ago

How does this look? By the way, you don't really need to reboot after each change, you just need to save, disable and re-enable the extension from the "extensions" app 😉 Screenshot from 2021-07-21 21-59-59

KarkanAlzwayed commented 3 years ago

Just wanted to report that the folders are lagging since the latest update. They open just fine, but when closed it lags noticeably

https://user-images.githubusercontent.com/49320606/126910218-c8fc8e9d-bcab-4fe6-a478-6aed046b9095.mp4

Ferryistaken commented 3 years ago

It doesn't lag at all for me, (sorry for bad quality I didn't want to make the file size too big) and I have a bunch of other extensions.

OS: Gnome 40 on Fedora Workstation 34 using X window system, Blur my shell version 21 Specs: Ryzen 9 3900x, 64gb ram, RTX 2080 Super

I know that it might be because I have a beefy pc, so I don't "see" the lag

https://user-images.githubusercontent.com/47927670/126910553-2c507088-975c-4bb0-ab65-dcc638b72f51.mp4

KarkanAlzwayed commented 3 years ago

@Ferryistaken that's probably what it is. I have an 8th gen Intel i7 with UHD 620 graphics on a 4k screen. Could be it, I don't know. Same here, fedora 34 on xorg. I don't know if there is a way to optimize it for lower end cpus or something like. It is not a big deal honestly, just something worth mentioning. I'm still enjoying it 😁

Ferryistaken commented 3 years ago

This is my cpu graph while opening and closing various folders, and I know that it's not the best way to diagnose this, but maybe the cpu is not the problem? It seems to me like on my pc opening and closing have roughly the same impact on the cpu. Maybe it could be the GPU?

image

Every peak is me opening a folder, when it stays high for a long time it's me keeping the folder open, and the peak after that is me closing the folder, here I opened and closed a folder twice. In the second case it even looks like opening it had a bigger impact on the cpu, but again this is a suboptimal way of diagnosing this

KarkanAlzwayed commented 3 years ago

Could be the gpu, as I don't have the Nvidia drivers installed (because I hate them and they do nothing for me but cause problems) and I'm running purely on the Intel UHD 620 iGPU on a 4k screen. Btw, this is a fresh install of Fedora 34

Ferryistaken commented 3 years ago

Maybe the maintainers can give us more info on this since they probably know how gnome handles blur. I'd also like to trash nvidia gpus if it wasn't for CUDA, I need it for that sweet machine learning perfomance. And my install isn't fresh, I had it for almost 8 months now

aunetx commented 3 years ago

I'm sorry, I'm very tired and can't answer more right now, just for info which monitor refresh rate do you have? 60Hz or more?

KarkanAlzwayed commented 3 years ago

60Hz

Ferryistaken commented 3 years ago

I think I'm on 85hz right now

aunetx commented 3 years ago

I just tested it, and effectively on my i5/intel gpu/3k screen, there is a subtle lag when going out of app folders... This is surely due to the animation timing, which I will check once again to verify everything is as it should (especially during its last frames)

I think that this happens when going in app folder view too, but just that we see it a lot more when going out -- because we see a lot more changes between 0 and 10 or 10 and 20 sigma, than between 90 and 100