Jump to content
jackluke

Mojave "light mode" hybrid transparency "patch" WORKING (with proof pictures)

23 posts in this topic

Recommended Posts

Those who use Mojave with an OpenGL (non-Metal) Video Card in "dark mode" have noticed that global transparencies are working fine, while in "light mode" encountered the "grey" Finder menu bar and sidebars issues, this patch is intended for those who want to use Mojave mainly in "light mode" saving some transparencies around, so here is my "hybrid reduce transparency" patch.

 

It is totally safe, harmless and reversible, it has been deeply tested and will 100% work until restart or logout, even after sleep lock screen it will still work.
To return with normal "transparency" you can also do that from Accessibility prefpane disabling the "reduce transparency" checkbox.
To use this patch just double click on this attached shell "mojavehld.command" and it will launch through Terminal.


[METHOD 1: Enable hybrid transparency]
After launch the mojavehld.command just follow these steps:
type 1
type 4

close Terminal (CMD+Q) and any other app previously opened.

(The choice number 3 is not mandatory)

[METHOD 2: Force hybrid transparency]
If for some reason after that you will still get Dock and Notification Center without "transparencies" then relaunch the mojavehld.command:
type 2
type 1
type 4

close Terminal (CMD+Q) and any other app previously opened.

 

Download attached here: mojavehld.zip

 

desert finder menu.png

desert notification bar.png

color finder menu.png

color notification.png

color finder dock.png

Edited by jackluke

Share this post


Link to post
Share on other sites
Advertisement

Hmm... ok, so all in all, all that your script does is apply the good old command that disables/enables transparency:

defaults write com.apple.universalaccess reduceTransparency -bool [true|false]

What's new? the partial restart of macOS functionalities?

Edited by Hervé

Share this post


Link to post
Share on other sites

Mine has a totally different purpose, is needed to fix the "grey" Finder menu bar on unsupported Metal GPUs for Mojave "light mode", it enables a "partial transparency reduction" while that link you posted is an applescript for "global transparency reduction".

 

And my "patch" doesn't require any "sudo" or "System Events" permissions.

 

The "new" is that you will have an opaque Finder menu while keeping all other elements like Dock, Notification Center and some other transparencies.

 

This is needed for Mojave "non-Metal" GPUs with only OpenGL rendering, as a workaround for the "light mode".

Edited by jackluke

Share this post


Link to post
Share on other sites

H,

Firstly thanks for all your effort to get Mohave goin on non metal older graphics.

 

 

But does not change anything here, screen shot attached .

But I lost trackpad control after applying this patch.

Restored back default and trackpad works again.

 

Regards

macq

 

 

Screenshot 2018-09-18 at 6.26.28 PM.png

Share this post


Link to post
Share on other sites

The default write com.apple.universalaccess reduceTransparency -boot [true|false] command just does what it's always done.

 

What leads to claim there is "hybrid transparency" is that, after executing the command to disable transparency, the script only restarts Finder and Spotlight, not the Dock or anything else. However, after a reboot, transparency is completely disabled, as anyone would expect, i.e. white Finder bar, dark Dock, etc.. So the "hybrid transparency" is only effective for as long as you run the script from a system with transparency enabled and you do not reboot.

 

You need to restore default transparency settings before a reboot or shutdown if you want to enjoy the results of that script again (i.e. you need to either run the script and select option 2, or enter the default write command to set reduction to false or use the Accessibility->Display PrefPane to untick Reduce transparency parameter). All in all, it's nice for a few times but probably rapidly quite annoying to do in the long run.

 

Example on non-Metal HD3000 system in light mode...

* with default transparency:

Default_transparency.thumb.png.87c8f80cc62a00275f8751c907df1462.png

 

* without transparency:

No_transparency.thumb.png.a2f2d85ecb1867c5419601a2726d03ad.png

 

* after executing the script under default transparency mode:

After_script.thumb.png.65407238bdb2b7e4cce879d3f6cdff00.png

 

* after rebooting the system without restoring default transparency settings:

No_transparency.thumb.png.a2f2d85ecb1867c5419601a2726d03ad.png

 

So, yes, the trick with Finder brings a nicer look but you have to restore default settings to avoid total loss of transparency on reboot. This would need to be refined through an automated process at boot and restart/shutdown to be properly usable.

 

Edited by Hervé

Share this post


Link to post
Share on other sites
4 hours ago, Hervé said:

No, it just does what it's always done. You just got the impression it does something else on non-Metal graphics but all it does is disable transparency like it does on any other systems.

 

Example on Metal-HD4000 system...

with transparency:With_transparency.png.675f9fcbcbfdefe6b65373ef8c6c91ed.png

 

without transparency:

 

Without_transparency.png

 

Of course HD4000 is Metal supported, you should instead try that on HD3000 that is OpenGL only (non-Metal), or any Legacy Nvidia Tesla or ATI with QE/CI.

 

Please try that on an HD3000 and you'll notice what I meant.

 

Anyway you evidenced the less important thing into your screenshot, my patch is working fine.

 

If you get offended because I called it "patch", call as you want, but I can assure that this little script does its own duty as workaround for Mojave "light mode".

You can't find a better solution till now to keep transparent Dock and at the same time a clear white opaque Finder menu bar in "light mode".

 

4 hours ago, macq said:

H,

Firstly thanks for all your effort to get Mohave goin on non metal older graphics.

 

 

But does not change anything here, screen shot attached .

But I lost trackpad control after applying this patch.

Restored back default and trackpad works again.

 

Regards

macq

 

 

Screenshot 2018-09-18 at 6.26.28 PM.png

 

Which GPU do you have ?

 

Try again these steps, launch the Terminal mojavehld.command then type followed by "enter key": 2, 1, 4

 

Probably when you lost the trackpad, if in the "meanwhile" you used an USB mouse you could notice that script was perfectly working.

Edited by jackluke

Share this post


Link to post
Share on other sites
17 minutes ago, jackluke said:

 

Which GPU do you have ?

 

Try again these steps, launch the Terminal mojavehld.command then type followed by "enter key": 2, 1, 4

Hi,

 

Mine is Nvidia gt 320m.

Specs in sig.

 

Edit, with this setting loose the transparency of the dock now, but trackpad working.

Screen shot attached.

 

Screenshot 2018-09-18 at 6.58.21 PM.png

Edited by macq

Share this post


Link to post
Share on other sites
45 minutes ago, macq said:

Hi,

 

Mine is Nvidia gt 320m.

Specs in sig.

 

Ok that's a legacy Nvidia Tesla so it works, but unluckily in your case probably there is conflict with your internal "trackpad", try with an USB mouse to notice that "hybrid transparency" is working.

 

45 minutes ago, macq said:

Edit, with this setting loose the transparency of the dock now, but trackpad working.

Screen shot attached.

 

Ok then go through "System Preferences - Accessibility prefpane - Display"

de-select the "reduce transparency" checkbox

Then relaunch my script and type 1, close Terminal, now it should give Dock and Notification Center transparencies and fix the greyed Finder menu.

Edited by jackluke

Share this post


Link to post
Share on other sites
20 hours ago, Hervé said:

The default write com.apple.universalaccess reduceTransparency -boot [true|false] command just does what it's always done.

 

What leads to claim there is "hybrid transparency" is that, after executing the command to disable transparency, the script only restarts Finder and Spotlight, not the Dock or anything else. However, after a reboot, transparency is completely disabled, as anyone would expect, i.e. white Finder bar, dark Dock, etc.. So the "hybrid transparency" is only effective for as long as you run the script from a system with transparency enabled and you do not reboot.

 

You need to restore default transparency settings before a reboot or shutdown if you want to enjoy the results of that script again (i.e. you need to either run the script and select option 2, or enter the default write command to set reduction to false or use the Accessibility->Display PrefPane to untick Reduce transparency parameter). All in all, it's nice for a few times but probably rapidly quite annoying to do in the long run.

 

Example on non-Metal HD3000 system in light mode...

* with default transparency:

Default_transparency.thumb.png.87c8f80cc62a00275f8751c907df1462.png

 

* without transparency:

No_transparency.thumb.png.a2f2d85ecb1867c5419601a2726d03ad.png

 

* after executing the script under default transparency mode:

After_script.thumb.png.65407238bdb2b7e4cce879d3f6cdff00.png

 

* after rebooting the system without restoring default transparency settings:

No_transparency.thumb.png.a2f2d85ecb1867c5419601a2726d03ad.png

 

So, yes, the trick with Finder brings a nicer look but you have to restore default settings to avoid total loss of transparency on reboot. This would need to be refined through an automated process at boot and restart/shutdown to be properly usable.

 

 

I did already tried to create an automated process in this way:

 

creating a mojavehld.plist in /Library/LaunchDaemons/ to execute a script before shutdown and startup

 

creating a mojavehld.sh in /Library/LaunchDaemons/ to execute the script to keep the "hybrid transparency"

 

pointing the mojavehld.plist to the mojavehld.sh

 

sudo chown 0:0 /Library/LaunchDaemons/mojavehld.plist

sudo chown 0:0 /Library/LaunchDaemons/mojavehld.sh

 

sudo launchctl load -w /Library/LaunchDaemons/mojavehld.plist

 

One little issue I've encountered is that I've to consider to edit this file before the loginwindow:

~/Library/Preferences/com.apple.universalaccess.plist

 

In Mojave this is not in plaintext but binary encoded, so it will result a bit invasive for most users.

 

 

For now I believe that the script I did on the main post is a good workaround for those who want to use a temporary "light mode" until a reboot of course, and even if a bit uncomfortable, relaunching the script after a restart to me is not a drama.

 

Edited by jackluke

Share this post


Link to post
Share on other sites

i was encouraged and I love command line stuff - but then got less excited for the future of my HD3000 system... as this seems to (almost) do what System Preferences/Accessibility/Display "Reduce Transparency" does? I say almost as the GUI enables and updates the full gamut of objects. 

 

by the way, i wish i knew what one needs to restart via command line to get immediate effect...

 

as I was trying to figure out how to switch from Light Mode to Dark Mode via command line so I could turn it on/off via a schedule.

 

this seems to be the key item  
defaults write "Apple Global Domain" "AppleInterfaceStyle" Dark

but after Dark is set, I need to logout/login so see effect.

 

 

 

Edited by tluck

Share this post


Link to post
Share on other sites
11 hours ago, tluck said:

i was encouraged and I love command line stuff - but then got less excited for the future of my HD3000 system... as this seems to (almost) do what System Preferences/Accessibility/Display "Reduce Transparency" does? I say almost as the GUI enables and updates the full gamut of objects. 

 

by the way, i wish i knew what one needs to restart via command line to get immediate effect...

 

as I was trying to figure out how to switch from Light Mode to Dark Mode via command line so I could turn it on/off via a schedule.

 

this seems to be the key item  
defaults write "Apple Global Domain" "AppleInterfaceStyle" Dark

but after Dark is set, I need to logout/login so see effect.

 

 

Yes, I have exploited the "reduce transparency" Accessibility feature discovering that doing it from Terminal until you don't relaunch Finder.app or Dock.app (I mean the CoreServices app) the GUI will keep a partial transparency, it's not a long run patch however it works and totally harmless for the system.

 

In your specific case I guess you refer to these dictionary keys:

  • Light mode: defaults delete Apple\ Global\ Domain AppleInterfaceStyle

  • Dark mode: defaults write Apple\ Global\ Domain AppleInterfaceStyle Dark

 

You can follow the method I used for create my script, to see the immediate effect without logout/login just type from Mojave Terminal:

 

defaults write com.apple.universalaccess reduceTransparency -bool false

killall Finder

killall Dock

killall NotificationCenter

killall Spotlight

 

 

While this is used only for the "light mode":

 

defaults write com.apple.universalaccess reduceTransparency -bool true

killall Finder

killall Spotlight

 

Edited by jackluke

Share this post


Link to post
Share on other sites

Here is my original method "translated" into an AppleScript so anyone can put it on Automator and it will do the trick switching between a full translucent "dark mode" and a semi-translucent "light mode":

 

tell application "System Events"

tell appearance preferences

if dark mode is false then

set dark mode to true

do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

do shell script "killall Finder"

do shell script "killall Dock"

do shell script "killall NotificationCenter"

do shell script "killall Spotlight"

else

set dark mode to false

do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

do shell script "killall Finder"

do shell script "killall Spotlight"

end if

end tell

end tell

 

 

Here is the Applescript already-ready to download: hybrid dark light switch.zip

 

 

Edited by jackluke

Share this post


Link to post
Share on other sites
On 10/4/2018 at 2:34 PM, jackluke said:

Here is my original method "translated" into an AppleScript so anyone can put it on Automator and it will do the trick switching between a full translucent "dark mode" and a semi-translucent "light mode":

 

tell application "System Events"

tell appearance preferences

if dark mode is false then

set dark mode to true

do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

do shell script "killall Finder"

do shell script "killall Dock"

do shell script "killall NotificationCenter"

do shell script "killall Spotlight"

else

set dark mode to false

do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

do shell script "killall Finder"

do shell script "killall Spotlight"

end if

end tell

end tell

 

 

Here is the Applescript already-ready to download: hybrid dark light switch.zip

Great work mate. Can you explain what I must do with Automator because I am a beginner with that staff. Thanks!

The script doesn't seem to work correctly. We want it to run the code when we press light mode and do nothing when we press dark mode. How do we do that?

 

Quote

 

Edited by belodelo

Share this post


Link to post
Share on other sites

Try the app I posted here. It's based on Jackluke's work and only applies to Light mode. It does nothing in Dark mode. It's created in Automator from the provided script. But maybe you don't know how to use the tool...

Edited by Hervé

Share this post


Link to post
Share on other sites

Mine has a totally different purpose, is needed to fix the "grey" Finder menu bar on unsupported Metal GPUs for Mojave "light mode", it enables a "partial transparency reduction" while that link you posted is an applescript for "global transparency reduction".

Share this post


Link to post
Share on other sites

I believe you're mistaken and must have missed something, especially as I explained what every line of the script did. You may also refer to Jackluke's explanations above.

 

Of course, if you want to compare things and/or enlighten us, well... show us yours!

Share this post


Link to post
Share on other sites

I don't know if anybody else has come across the issue, however upon installing this patch some third party applications such as Chrome made the menubar go back to it's broken state. I found out that it was because Chrome was still seeing the system as being in dark mode, and had adjusted its interface accordingly. To fix this, I wrote a small applescript program to force applications like chrome to act as they would in light theme.

 

Fix Dark Menubar in Third Party Apps.app.zip

Edited by Doofitator
Bugfix

Share this post


Link to post
Share on other sites
7 hours ago, Doofitator said:

I don't know if anybody else has come across the issue, however upon installing this patch some third party applications such   Audacity Find My iPhone Origin         as Chrome made the menubar go back to it's broken state. I found out that it was because Chrome was still seeing the system as being in dark mode, and had adjusted its interface accordingly. To fix this, I wrote a small applescript program to force applications like chrome to act as they would in light theme.

 

Fix Dark Menubar in Third Party Apps.app.zip

transparency is completely disabled, as anyone would expect, i.e. white Finder bar, dark Dock, etc.. So the "hybrid transparency" is only effective for as long as you run the script from a system with transparency enabled and you do not reboot.

Share this post


Link to post
Share on other sites

I added some lines for automatic settings when switching between light/dark mode and different machines.

 

set MacModel to (do shell script "system_profiler SPHardwareDataType | awk '/Model Identifier/ {print $3}'")

if MacModel is not "MacBookAir5,2" and MacModel is not "MacPro6,1" then --is the script run on a specific Mojave-supported machine?

  tell application "System Events"

    tell appearance preferences

      set reduceTransparency to get do shell script "defaults read com.apple.universalaccess reduceTransparency -bool"

      if dark mode is false then -- light mode is active

        if reduceTransparency is "1" then -- reduceTransparency was active

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

          do shell script "killall Dock"

          do shell script "killall NotificationCenter"

          delay 1

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

          do shell script "killall Finder"

          do shell script "killall Spotlight"

        else -- reduceTransparency was off

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

          do shell script "killall Finder"

          do shell script "killall Spotlight"

          display dialog "Please reboot manually to disable menu bar transparency." giving up after 5

        end if

      else -- dark mode is active

        if reduceTransparency is "1" then -- reduceTransparency was active

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

          do shell script "killall Finder"

          do shell script "killall Dock"

          do shell script "killall NotificationCenter"

          do shell script "killall Spotlight"

          display dialog "Please reboot manually to enable menu bar transparency." giving up after 5

        end if

      end if

    end tell

  end tell

end if

Edited by alrunenwurzel
Format

Share this post


Link to post
Share on other sites
On 5/6/2019 at 9:21 AM, alrunenwurzel said:

I added some lines for automatic settings when switching between light/dark mode and different machines.

 

set MacModel to (do shell script "system_profiler SPHardwareDataType | awk '/Model Identifier/ {print $3}'")

if MacModel is not "MacBookAir5,2" and MacModel is not "MacPro6,1" then --is the script run on a specific Mojave-supported machine?

  tell application "System Events"

    tell appearance preferences

      set reduceTransparency to get do shell script "defaults read com.apple.universalaccess reduceTransparency -bool"

      if dark mode is false then -- light mode is active

        if reduceTransparency is "1" then -- reduceTransparency was active

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

          do shell script "killall Dock"

          do shell script "killall NotificationCenter"

          delay 1

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

          do shell script "killall Finder"

          do shell script "killall Spotlight"

        else -- reduceTransparency was off

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool true"

          do shell script "killall Finder"

          do shell script "killall Spotlight"

          display dialog "Please reboot manually to disable menu bar transparency." giving up after 5

        end if

      else -- dark mode is active

        if reduceTransparency is "1" then -- reduceTransparency was active

          do shell script "defaults write com.apple.universalaccess reduceTransparency -bool false"

          do shell script "killall Finder"

          do shell script "killall Dock"

          do shell script "killall NotificationCenter"

          do shell script "killall Spotlight"

          display dialog "Please reboot manually to enable menu bar transparency." giving up after 5

        end if

      end if

    end tell

  end tell

end if

 This is perfect! While I did plan to make a slight change, I am more interested in tying this into the "Light Mode / Dark Mode Preference Panes" using this script as a event trigger as apposed to using this as a Login Item (check box Hidden). I'll see what I can do today. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By mrwlkr
      Hello everyone, I've an Acer Aspire E5-574 running Mojave at last update, everything is fine, except by the laggy mouse, as the attached, when the system needs the graphic card (Intel HD 520) it's generates a lag.
       
      Thanks

      final_5e2761c58c6b910015da7cf6_967905.mp4 Send me MacBook-Pro-de-Murilo.zip
    • By lizdav
      Hello People,
       
      I have a dual-boot system with both Win10 and MacOS on separate drives. MacOS on an SSD while Windows is on a standard laptop HD. At first it was working fine and I haven't thought much of it but recently MacOS started acting weird. The first thing I noticed was that Clover somehow "forgot" my primary boot drive. This wasn't a huge issue though, as it was booting just fine once I hit enter on the drive selected. I updated Windows 10 to a newer build, however, I did all of this with the SSD drive unplugged just to be sure. Now Windows is working properly while MacOS is having some quite frustrating errors which make it impossible for me to work...
       
      Anyway, the problems are the following:
       
      - random reboots
      - apps freeze or won't start just "bounce"
      - internet not working(eventhough every other device connects just fine)
      - system is laggy overall
       
      I have tried emptying NVRAM int Terminal but I only got a message saying 'Error clearing firmware variables'. I've been searching for solutions on the web for the issue at hand but struggled to find one... I would really appreciate some help.
       
      I attached my config.plist down below. If more information is required, please let me know.
       
      Thank you!!
       
       
       
      config.plist
    • By superdooper71
      Hi I wonder if you can help me out guys.
      I have few issues here
      • First
      when I boot the clover entry screen do not show the disk icons until i press enter
      (If I disconnect the keybord all is smooth, clover start, shows disk icons and boot from Mojave)
      • Second
      Randomly the keyboard and mouse become pretty unstable. The mouse cursor start flashing or the keyboard start to type repetedly <<<<<<<<<<< when i Press the spacebar or some other button
      (this behaviour is applied to all keyboard I have tried, actually 3 different ones)
      --------------------------------------------------------------------
      KB and Mouse are plugged on a USB 3.0 ports
      I have tried to reset the keyboard Pref but NO LUCK
      I have changed Keyboard - Same error
      --------------------------------------------------------------------
      I enclose IOREGregistry and config.plist
       
      MY CURRENT BUILD
      ASROCK Z270 PRO4
      i7 7700K
      32GB DDR4
      Gigabyte GTX 760
       
      I believe that there is some code conflict but I have no idea what is wrong
       
      Please HELP
      Cheers
      Franco
      config.plist
      iMac di imac27.ioreg.zip
    • By Bikash
      Hello.. 
      I am trying to install macOS Mojave in my laptop but the is very slow.. I tried different methods and tutorials but all have same result.
       
      Install of High Sierra, Sierra and El capitan is fast and have no issue.
       
      Specifications:
      hp notebook v5d75pa#acj
      i5-4210u
      Intel HD 4400
      4gb ram ddr3
    • By TorqueX86
      Hi guys,

      I'm at my wit's end. I really need a hand here.
      I found only one clover setup for my motherboard, and works absolutely flawlessly for Mojave.

      Today I added an Asus Thunderbolt EX3 card, and that won't even let me boot my Mojave installation.

      My config.plist in attachment. Let's solve at least the Thunderbolt issue for now.
       
      There are also other issues, but let's solve this one first.
       
      Asus WS Z390 PRO + i9 9900K
      32GB 3200
      Nvidia 2080Ti for Windows and AMD RX480 for MacOS.
      Samsung NVME 950PRO
      config.plist
×