NegativeScreen
NegativeScreen copied to clipboard
Negative per window
Is it possible for NegativeScreen to work on a per-window basis? I have many apps and webpages that use dark/night mode on their own, but certain apps on Windows don't have an option for dark/night theming.
Would it be possible to implement NegativeScreen on particular windows within Windows? For example, a particular shortcut key that will only enable NegativeScreen on the currently focused/active window.
Also, thank you for this awesome app, it's seriously indispensable for me and one of the first items installed on any new computer of mine.
It is technically possible to only invert a rectangle and not the entire screen, but generalizing that to invert a specific window, while properly handling the currently in focus window, potentially overlapping windows, etc, would be a lot of work. Also, windows are not necessarily rectangular, so this would be an (admittedly rare) problem. I'm also not quite sure the performance would be great.
So closing this means wontfix
?
I guess, or at least most likely wontfix
, as I don't see a practical way to implement this feature properly, and I don't plan to spend time to research it.
Since I see how having this feature could be useful, maybe I shouldn't have closed the issue though. I will reopen it. Having it still open will hopefully prevent future similar questions...
@rajsinghUSA this isn't what you're looking for, but you might agree that the next best thing for now is to invert monitors independently and this older version does just that:
https://0.x2a.yt/other/private/NegativeScreen-custom-multi-monitor.exe
It's a tad bit slower, but I'm also like you and need to toggle inversion on a per window basis. Simply put all your windows that don't need inversion on one monitor screen (assuming you have more than 1) and when you right click on the tray icon you can toggle inversion off for that monitor.
Runs for me great on Windows 7 with 8 GB ram and an i5 processor
I tried this tool, but once I open it, it dumped.
Hello, is still not doable on Windows 10 ? Thanks
There is no relation between this feature request and Windows 10 (or other versions of Windows).
Well, the website screenshots are Windows 7 screenshots so I thought maybe you didn't checked if the API would've been improved between 7 and 10.
I think there's a way to implement this feature:
- Detect the focused window position and name. Apply filter to the focused window area according to rules set for that window name.
- Apply a seperate filter to the rest of the screen. This filter could be a low contrast/low brightness filter which can be set independently (maybe it makes sense to change this on a per-window-basis). This makes sure that the rest of the screen won't dazzle the user.
Ok but again, what happens when your target window is not focused? When windows overlap?
Actually, what is the purpose of the requested feature?
I don't think it can work very well in a multi-tasking workflow, but maybe that's not actually necessary. It could work with only a few side by side windows, if they are not overlapping, but the magic would break as soon as windows overlap.
Would it fit the bill to ignore windows, and instead have the ability to define rectangular areas on the screen, each with a specific filter?
what is the purpose of the requested feature?
Making light apps dark without making already dark apps light.
The goal for me is multi-tasking. (E.g. splitscreen).
If we want to calculate complicated setups that's entirely possible: We can discribe Windows as rectangles and find out if they overlap. If they do we subdivide the area of the back window into (1,2, or more) smaller rectangles that are not overlapped. I think that would be a pretty fast calculation. And we don't have to support an infinite amount of windows. We could specify a maximum in the config file, which provides fast speed and still covers the main use cases.
It is possible to find out the order of the windows, right?
Btw: this feature is very important to me. There's a sickness called ME/CFS which, beneath many horrible symptoms, can cause increased sensitivity to light. Someone close to me has this illness and has problems with some programs that don't allow him to change their color and asked me for help. I have some experience with C# developing and I'm willing to invest time on this. I haven't looked at the code yet, I'll start on monday.
How is this guy able to invert color on a per-window basis with AutoIt? https://github.com/gileli121/WindowTop
Well, thank you for sharing this tool with us, I'm going to try right away.
How is this guy able to invert color on a per-window basis with AutoIt? https://github.com/gileli121/WindowTop
Mmh, not sure, but it might be using https://docs.microsoft.com/en-us/windows/win32/api/magnification/nf-magnification-magsetwindowfilterlist ... (I think all the interesting source code removed is mostly still present in the first commit of the linked repo)
Honestly, I'm more impressed by this: https://youtu.be/SkOq3-jjGf4 (Not the auto-toggle, but the part where images stay normal)
Wow, that software is awesome. Thanks @rajsinghUSA for sharing.
@mlaily Are you going to port this software's features into FLOSS ? :)
PS : regarding web browsing, you'd better use Brave which natively supports dark window colors, and the Dark Reader extension, which smartly force-dark websites.
@mlaily Are you going to port this software's features into FLOSS ? :)
I'm not interested in most features, but the ones related to dark mode might be a good fit if I can find a way to implement them reliably...
PS : regarding web browsing, you'd better use Brave which natively supports dark window colors, and the Dark Reader extension, which smartly force-dark websites.
I don't want to use Brave, but I have some dark mode extensions for Firefox and Chrome. They work well, but only in the browser.
the ones related to dark mode might be a good fit if I can find a way to implement them reliably
That's the only ones I also care about actually. But the other software is reliable, really. Multi-DPI is the only issue to be fixed.
I think he's also using the magnification api of windows. When moving the windows in his app you can see that the dark windows lag behind a little bit. Also when you select dark mode in a maximized window he will invert the whole screen (including the task bar).
I just went through the history and saw 53ae0fa. It seems like at that point you were just a function call to MagSetWindowFilterList away from having window specific color inversion.
Edit: Well, I tried to call MagSetWindowFilterList, turns out that won't give us any desireable results: The windows which are excluded from the filter will just be rendered invisible (instead of being shown normally). Here's the branch.
@mlaily Now I think I understand your conerns about non-rectangular and overlapping windows. I do think that it would make sense to do something similar like in 53ae0fa where there's a magnifierControl for every screen. Just instead of one window per screen we can cover exactly the area that we want by using multiple dynamically sized magnifier windows:
We can discribe Windows as rectangles and find out if they overlap. If they do we subdivide the area of the back window into (1,2, or more) smaller rectangles that are not overlapped.
Do you think that would work?
Btw I just wanted to tell you I have a lot of respect for all the work you have put into this project.
Do you think that would work?
It would work in theory, but I don't think having too many magnifier surfaces is a good idea, and I don't want to go this route. You are free to try!
I found this post from this thread using autohotkey in case anyone is still watching this. It looks like it uses MagSetColorEffect.