-
-
Notifications
You must be signed in to change notification settings - Fork 591
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 foreground blurring (Privacy and Focus modes) #765
base: next
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## next #765 +/- ##
==========================================
+ Coverage 37.74% 39.02% +1.28%
==========================================
Files 48 46 -2
Lines 10869 9681 -1188
==========================================
- Hits 4102 3778 -324
+ Misses 6767 5903 -864
|
86363a2
to
cda8ca4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This is great work, I like how small the changes are for what it does.
Just a couple of concerns
Thanks! I can't take all the credit though. Sorry it took so long to fix the style issue, a few things came up all at once IRL. I'll see what I can do to resolve any issues later. |
Hi, looking for an update on this, does this PR have a future? I'm looking for this feature for quite a while and it's kind of disheartening to see this PR and its predecessor be practically dead. |
Hi Gabriel, I stopped work on this PR since I temporarily stopped using
Linux altogether for unrelated reasons. However, like my successor said, it
shouldn't be too much work to integrate my changes. Hope someone can pick
it up again and take focus mode to production! :)
…On Mon, Sep 19, 2022, 4:40 AM Gabriel ***@***.***> wrote:
Hi, looking for an update on this, does this PR have a future? I'm looking
for this feature for quite a while and it's kind of disheartening to see
this PR and its predecessor be practically dead.
—
Reply to this email directly, view it on GitHub
<#765 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJJ4AHNET5XQK3L3UIJ6KYTV7BGMBANCNFSM5MTRBCUA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, thanks for the response! |
cda8ca4
to
4bf45c3
Compare
@obsidianical Apologies, things came up after my first rebase in July and I forgot to push. I rebased again yesterday (only one new commit) and pushed just now after making sure it still works. Most conflicts were from new I plan to throw a test config together later today after some sleep to try the plain |
Adds an option to specify which windows will be blurred when inactive.
If --inactive-blur-include isn't specified, but --inactive-blur *is*, then the sensible default would be to blur all inactive windows. This commit does exactly that.
The property was already added in the first commit on this branch, but it wasn't defined so it would've had no effect. With this, the long conditional is easier to read and *should* update automatically.
4bf45c3
to
5ebb762
Compare
Moves the setting of `blur_foreground` to a new method which then calls a second to actually set the value and apply damage if it's different, similar to how the blur_background value/damage is handled.
Rather than overriding the background blur method, this will only use blur_method when it's already defined, otherwise creating a whole new blur context using the 'box' blur method with default size of 3. This fixes an issue where background blur would be forced even if unwanted. By placing the fgcontext code in picom.c rather than config_libconfig.c, this also fixes a segfault when passing `--inactive-blur` on the command line without having a blur method set either in an option or in config.
6dcb04d
to
45dc995
Compare
Finally(!) found enough time to get back to work on this again 🎉 @yshui I'm pretty sure everything's done now, but would you mind reviewing again in case I've missed anything? Thanks! |
Continuation/revival of #490 by @rajansaini691; see that PR for more background.
Differences in this PR:
next
branch, resolved conflicts--inactive-blur-include
option (see below)--inactive-blur-opacity
blur_foreground
property (added but unused in original PR)Option Rationale
Comments in the original PR called for an exclusion list to be added, but I couldn't see how that would be useful so opted for the inverse.
Doing it this way allows for two different behaviours - either "privacy" or "focus" mode.
Focus Mode
The easiest option, this will blur all inactive windows:
Privacy Mode
Combining both options will only blur windows defined in
--inactive-blur-list
.This can be useful for hiding sensitive data, eg communication or banking apps:
Closes #489