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

Reload of config file? #19

Open
HelenFoster opened this issue Sep 11, 2019 · 3 comments
Open

Reload of config file? #19

HelenFoster opened this issue Sep 11, 2019 · 3 comments

Comments

@HelenFoster
Copy link

Hi, many thanks for this useful software!

I've been working on some colour matrices for NegativeScreen. ColorMatrix Viewer can be used to give immediate feedback on the result of changing a number; but in NegativeScreen it's useful to have the effect applied to the whole desktop environment while working on it.

I set up a script to exit and reload NegativeScreen when the config file changes. This almost works, but the colour effect switches off during the time between exit and reload. When working on a dark theme, this means flashing a light in your eye, and prevents comparison between old and new.

So I was thinking it would be really useful if NegativeScreen could reload the config file itself, without any gaps. With a keyboard shortcut, an API command, and possibly an internal option to watch the config file for changes.

@HelenFoster
Copy link
Author

Here's my current PowerShell script, based on https://superuser.com/a/844034

$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "C:\NegativeScreen"
$watcher.Filter = "negativescreen.conf"
$watcher.IncludeSubdirectories = $false
$watcher.EnableRaisingEvents = $true  

$action = {
    stop-process -name NegativeScreen -force
    Invoke-Item C:\NegativeScreen\NegativeScreen.exe
}

Register-ObjectEvent $watcher "Changed" -Action $action
while ($true) {sleep 0.5}

@mlaily
Copy link
Owner

mlaily commented Sep 12, 2019

Mmh, this seems like a lot of work to support an edge case.

There is a reason why creating new color effects is not built into NegativeScreen: if you input a wrong matrix, your screen may go blank, and unless you know the shortcut to exit the application, you may get stuck there.

ColorMatrix Viewer is supposed to be the way to go when editing color matrices. I'm curious what you are missing in it that you have with your method?

@HelenFoster
Copy link
Author

OK, makes sense that creating effects is out of scope. I also didn't notice mlaily/ColorMatrixViewer#1 (comment) before posting.

I was having some difficulty mentally translating the results from ColorMatrix Viewer to what it would look like when applied to everything. I'll think about why, and create issue(s) over there if I come up with any concrete proposals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants