How to undo "Disable for current app" ?



  • Hello everyone!

    Since I disabled flux for using Chrome once, it keeps disabling it now, always when I use Chrome. This is horrible because the screen switches to bright blue everytime I want to use the browser.

    The little flux logo in the upper bar disappears as soon as I open Chrome, so I can't use it to untick the command.
    I tried uninstalling and reinstalling but it keeps doing the same.

    Can you please help ? Thanks



  • Got the exact same issue, super annoying! :|

    I also noticed I can't see the Flux app being active on the top bar when I'm in the Chrome app. I do see it with all other apps though. When in Chrome, I have to click on my Desktop to be able to see the flux app and then I see Disable for Chrome is selected, but upon de-selecting the Chrome app (so flux should get activated again for Chrome) nothing actually happens. I also tried to switch off Flux and restart it but also doesn't do anything.

    The only reason I had to disable Chrome for a couple of minutes was to use a scanner for my bank which didn't work with the Flux filter on, so I had to disable the filter for Chrome for a few seconds. But unfortunately this setting never got activated again for Chrome. It would actually be great if you could add an option to disable Flux for 1 minute or a few minutes. To disable for 1 hour is way too long, it literally takes me less then 1 minute or perhaps max 5 minutes to fix it with the bank app.

    Would be great if this can be updated!!!



  • Yes a simpler way to disable is a good idea - we have a key combo on Windows but we didn't pick one yet on the Mac.



  • You can try typing/pasting

    defaults write $HOME/Library/Preferences/org.herf.Flux.plist disable-com.google.Chrome false
    

    into a terminal window and pressing enter.

    That should change the setting for F.lux so it stops deactivating for Chrome. I have tested it on my system and it worked for me. It was not necessary to restart any apps in my test.



  • Based on this technique it should be trivial to create a service using Automator to pause flux for a specific app for a limited time. It can also be activated by hotkey.

    It should be possible more or less like this: create a Automator workflow of the service type (so it becomes available in the menu bar and can be run from there) and choose the run shell script option with the following content:

    defaults write $HOME/Library/Preferences/org.herf.Flux.plist disable-com.google.Chrome true; sleep 300; defaults write $HOME/Library/Preferences/org.herf.Flux.plist disable-com.google.Chrome false
    

    (sleep 300 means it will wait for 300 seconds before turning of disable for Chrome.)

    This should also make it available in the services preference pane where you can assign a keyboard shortcut.


    You can do more or less the same with applescript to disable (and enable) Flux for all applications. This Alfred workflow contains a method to use applescript to use the "disable for an hour" option. You can use the same approach to enable it again after a shorter time period than the full hour.


    Or, a simpler and perhaps less elegant way is to use a shell script option like the previous example with something like

    killall Flux; sleep 300; open -a /Applications/Flux.app
    

    This will kill running processes with the name Flux (there is also a web design program with that name), wait for 5 min and then open the app at /Applications/Flux.app



  • I think applescript is much preferred.

    If you do mess with preferences please be aware that "disableCount" should be updated to indicate the number of disabled apps. When it's zero, we are able to do less work in the background.



  • Thanks @herf!
    Based on that I'd recommend against any of the "defaults write" methods as written above and would edit the posts to warn and say so if they weren't locked.
    I get the endorsement of the applescript gui scripting approach.


    With that said, it's possible to use them with the addition of using

    defaults read $HOME/Library/Preferences/org.herf.Flux.plist disableCount
    

    to get the current number of disabled apps and

    defaults write $HOME/Library/Preferences/org.herf.Flux.plist disableCount -integer 0
    

    to set it to zero. You can change 0 to whatever it should be based on the result from the defaults read command. And then combine this with the

    defaults write $HOME/Library/Preferences/org.herf.Flux.plist disable-com.google.Chrome false
    

    from my first comment.


    It's possible to create better solutions. And this one is apparently more fiddly than I thought it was when I commented my suggestion. My original goal was just to propose a simple solution for the people experiencing an issue w/ f.lux and chrome, but I got sucked in to the challenge(s). Hopefully F.lux for macOS will get an update that can solve them.
    And if using the defaults commands messes something up or seem complicated I guess deleting the $HOME/Library/Preferences/org.herf.Flux.plist file, loosing all your current settings in flux and just resetting them is also an option. Editing the file directly with a plist editing tool might also be an easier option, depending.


Log in to reply