f.lux f.lux forum
    • Recent
    • Popular
    • Register
    • Login

    macOS Sierra - No more dark mode?

    macOS
    13
    25
    19.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • herfH
      herf
      last edited by

      Yes, I guess we should just let users edit an AppleScript to run at certain times of day.

      Previously: we could adjust the pref and just broadcast to tell everyone it changed. In 10.12, the broadcast doesn't seem to update the menubar, so AppleScript'ing System Prefs may be the "better" way.

      J 1 Reply Last reply Reply Quote 1
      • J
        jublonet @herf
        last edited by jublonet

        @herf You'd want this AppleScript for setting Light mode:

        on run {input, parameters}
        	
        	tell application "System Preferences"
        		reveal pane "com.apple.preference.general"
        	end tell
        	tell application "System Events"
        		tell first window of process "System Preferences"
        			tell checkbox 3 to if value is 1 then click -- checkbox was checked.
        		end tell
        	end tell
        	quit application "System Preferences"
        	return input
        end run
        

        And this AppleScript for Dark mode:

        on run {input, parameters}
        	
        	tell application "System Preferences"
        		reveal pane "com.apple.preference.general"
        	end tell
        	tell application "System Events"
        		tell first window of process "System Preferences"
        			tell checkbox 3 to if value is 0 then click -- checkbox was not checked.
        		end tell
        	end tell
        	quit application "System Preferences"
        	return input
        end run
        

        However on first run the user needs to grant accessibility access, unless you know how to set this in advance.

        Also, you might want to find a way to hide the System Preferences icon from appearing in the Dock shortly.

        T 1 Reply Last reply Reply Quote 0
        • T
          tochkinade @jublonet
          last edited by

          @jublonet I'm getting

          error "" number -1721
          

          for both, which means that "the wrong number of arguments was detected".

          T 1 Reply Last reply Reply Quote 0
          • T
            timomeh @tochkinade
            last edited by

            @tochkinade @jublonet @herf
            It's pretty simple to set dark mode with AppleScript:

            tell application "System Events"
                tell appearance preferences
                    set dark mode to true -- or false for light mode
                end tell
            end tell
            

            Doesn't need accessibility access or some other user-granted rights. No broadcasting, and all icons change immediately. I can confirm that it works like a charm since I use it in a small application which I've build just because I miss this feature in f.lux.

            T herfH 2 Replies Last reply Reply Quote 1
            • T
              tochkinade @timomeh
              last edited by

              @timomeh Thanks! But it doesn't switch dark/light mode automatically, depending on Sun position, right?

              T 1 Reply Last reply Reply Quote 0
              • T
                timomeh @tochkinade
                last edited by

                @tochkinade No, it doesn't switch automatically – it would be f.lux's task to execute this script depending on sunset/sunrise. I know self-advertising isn't well received here, but here's a link to the application I wrote which executes this script depending on sunset/sunrise. My intention is to just have this as interim solution until f.lux fixes this feature.

                1 Reply Last reply Reply Quote 0
                • herfH
                  herf @timomeh
                  last edited by

                  @timomeh Thanks we will do something like this in the next build!

                  Previously I had to enable accessibility to do this, but it seems to work pretty well.

                  1 Reply Last reply Reply Quote 0
                  • H
                    hcwest
                    last edited by

                    I am new to f.lux and so far think it is really helping with sleep! What is "dark mode" and can I still access it since I am using OS X Yosemite 10.10.5?
                    thanks.

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      timomeh @hcwest
                      last edited by timomeh

                      @hcwest Dark Mode is a native macOS / OS X Feature introduced with Yosemite. It makes your Menu Bar, your Dock, Spotlight and generally Menus appear dark. You can turn it on in System Preferences -> General -> "Use dark menu bar and Dock".

                      f.lux had an option which switched this dark mode on during night and off during day. The option isn't anymore available in macOS Sierra but they're working on getting it back, as you can read in this topic.

                      H 1 Reply Last reply Reply Quote 0
                      • H
                        hcwest @timomeh
                        last edited by

                        @timomeh thanks!

                        1 Reply Last reply Reply Quote 0
                        • herfH
                          herf
                          last edited by

                          Please try this one:
                          https://forum.justgetflux.com/topic/3466/f-lux-beta-39-6

                          T T 2 Replies Last reply Reply Quote 2
                          • T
                            timomeh @herf
                            last edited by

                            @herf Awww yeah, thanks! Works great.

                            1 Reply Last reply Reply Quote 0
                            • T
                              tochkinade @herf
                              last edited by

                              @herf Working good so far! It would be great if f.lux could make Notification Center dark as well (a function that Apple decided to disable this in Sierra)

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright © 2014 NodeBB Forums | Contributors