jackluke Posted September 18, 2018 Share Posted September 18, 2018 (edited) 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 4close 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 4close Terminal (CMD+Q) and any other app previously opened. Download attached here: mojavehld.zip Edited September 18, 2018 by jackluke 2 2 Link to comment Share on other sites More sharing options...
jackluke Posted September 18, 2018 Author Share Posted September 18, 2018 (edited) 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 September 18, 2018 by jackluke Link to comment Share on other sites More sharing options...
macq Posted September 18, 2018 Share Posted September 18, 2018 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 Link to comment Share on other sites More sharing options...
jackluke Posted September 18, 2018 Author Share Posted September 18, 2018 (edited) 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: without transparency: 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 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 September 18, 2018 by jackluke Link to comment Share on other sites More sharing options...
macq Posted September 18, 2018 Share Posted September 18, 2018 (edited) 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. Edited September 18, 2018 by macq Link to comment Share on other sites More sharing options...
jackluke Posted September 18, 2018 Author Share Posted September 18, 2018 (edited) 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 September 18, 2018 by jackluke Link to comment Share on other sites More sharing options...
jackluke Posted September 19, 2018 Author Share Posted September 19, 2018 (edited) 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: * without transparency: * after executing the script under default transparency mode: * after rebooting the system without restoring default transparency settings: 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 September 19, 2018 by jackluke Link to comment Share on other sites More sharing options...
tluck Posted October 3, 2018 Share Posted October 3, 2018 (edited) 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 October 3, 2018 by tluck Link to comment Share on other sites More sharing options...
jackluke Posted October 4, 2018 Author Share Posted October 4, 2018 (edited) 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 October 4, 2018 by jackluke Link to comment Share on other sites More sharing options...
jackluke Posted October 4, 2018 Author Share Posted October 4, 2018 (edited) 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 October 4, 2018 by jackluke 1 Link to comment Share on other sites More sharing options...
tluck Posted October 5, 2018 Share Posted October 5, 2018 nice. thank you. Link to comment Share on other sites More sharing options...
belodelo Posted November 4, 2018 Share Posted November 4, 2018 (edited) 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 November 4, 2018 by belodelo Link to comment Share on other sites More sharing options...
jinbingmao Posted December 29, 2018 Share Posted December 29, 2018 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". Link to comment Share on other sites More sharing options...
jinbingmao Posted December 31, 2018 Share Posted December 31, 2018 (edited) Edited December 31, 2018 by jinbingmao 2 Link to comment Share on other sites More sharing options...
Albert Eintein Posted January 10, 2019 Share Posted January 10, 2019 Many Thanks!!!! For me worked perfect on the first try! That grey dark Finder top menu and also the menu bars were very annoying!!!! Link to comment Share on other sites More sharing options...
Doofitator Posted April 14, 2019 Share Posted April 14, 2019 (edited) 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 April 14, 2019 by Doofitator Bugfix Link to comment Share on other sites More sharing options...
mimin30 Posted April 14, 2019 Share Posted April 14, 2019 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. Link to comment Share on other sites More sharing options...
alrunenwurzel Posted May 6, 2019 Share Posted May 6, 2019 (edited) 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 May 6, 2019 by alrunenwurzel Format Link to comment Share on other sites More sharing options...
WiiLF19 Posted July 4, 2019 Share Posted July 4, 2019 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. Link to comment Share on other sites More sharing options...
Recommended Posts