Friday, November 22, 2019

#1 2019-06-22 02:27:33 pm

roosterboy
Member
Registered: 2010-04-19
Posts: 10

Automator Dark Mode issue

I mostly prefer my Finder view options set to List View but some folders I want in Icon View. So I have an Automator workflow set up as a Service so I can right-click in the Finder to change the view options to how I want them on those folders.

Automator action - Set Folder Views

If you manually create a folder and set its view options to icon view in Finder, the background can be set to Default, which in Dark Mode gives a nice dark color to match the rest of the UI.

Finder - View Options dialog

But as you can see in the Automator action pictured above, the only options there are White, Color and Picture, which were the options available in Finder before Mojave introduced Dark Mode. Clearly, Apple didn't update the Finder's Automator actions. You can use the color picker to set Color to the same color you get through manually changing the view options, but the icon text stays black instead of turning white as it will when you manually set the options. And there's no way to set the text color.

Finder window - Background set manually
Finder window - Background set through Automator

The Finder's AppleScript dictionary also doesn't offer a solution, because again you can set the RGB values of the background but the text won't be adjusted. And there's apparently no way to set it to Default like you can manually.

So is there any way to automate the effect of selecting Default from the View Options window in Finder?

My current solution is to use AppleScript GUI scripting from a Keyboard Maestro macro, triggered by a key combination, but that means I need to go into each folder individually and trigger the macro... and that sucks for more than a handful of folders.

AppleScript: 2.7
Browser: Safari 605.1.15
Operating System: macOS 10.14

Offline

 

#2 2019-06-24 08:52:22 pm

CK
Member
From:: UK
Registered: 2018-11-04
Posts: 101

Re: Automator Dark Mode issue

Have you had a look at the default Finder preferences on the command-line ?  I'm on High Sierra so can't explore on your behalf, but if you go into Terminal, and type:

defaults read com.apple.Finder

you can scour through the various keys looking for one that sounds like it does what you want.  If you don't know how to set a key to a new value, seek some advice first because it's easy to overwrite multiple keys without meaning to if you're not sure what you're doing.

Offline

 

#3 2019-07-13 09:07:57 am

KniazidisR
Member
Registered: 2019-03-03
Posts: 724

Re: Automator Dark Mode issue

No need to set Dark Mode manually. From section Utilities select action Run AppleScript and drag it under your action Set Folder Views. Code is simiar to that

Applescript:


on run {input, parameters}
   tell application "System Events" to tell appearance preferences
       set dark mode to not dark mode
   end tell
   return input
end run

Last edited by KniazidisR (2019-07-13 09:09:11 am)


Model: MacBook Pro
macOS Mojave -- version 10.14.4
Safari -- version 12.1
Firefox -- version 70.0

Online

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)