• Das kreative Thema des Monats Oktober wird vor allem diejenigen unter Euch besonders ansprechen, denen Do-it-yourself quasi im Blut liegt. Zeigt uns Eure Improvisationskünste oder fotografiert, was andere Leute sich so im Alltag zusammengestrickt haben. --> Zum Mitmachen bitte hier klicken

Mac OS Golden Gate mit alter Optik

gillem

Jonagold
Registriert
21.09.14
Beiträge
19
Da ich keine Lust hab mich ewig an neue Icons zu gewöhnen und mich durch unmengen Bloatware zu kämpfen
Hab ich ja schon lange ein Script das mit einem Klick die MacOS Optik nach einem Update wieder aufs gewohnte
ändert. Und es klappt auch unter Mac OS 27 ( Developer Beta2) ohne Probleme , auch bei den Systemapps:

_ 2026-06-26 um 20.21.24.jpg

Ist ein einfaches Script:

AppleScript:
--
--  MacOS GUI-script 04.07.2026
--  
--
--(c) 2019-2026 [email protected]
--
-------------------------------------------------------------------------------------------------
--csr-util

set csrCheck to do shell script "csrutil status"
set fileLines to paragraphs of csrCheck
repeat with csrCheckStatus in fileLines
    if (csrCheckStatus contains "status: disabled") then
        --status: disabled
    else
        display dialog "Systemprotection must be disabled first!"
        return
    end if
end repeat

set csrCheck to do shell script "csrutil authenticated-root status"
set fileLines to paragraphs of csrCheck
repeat with csrCheckStatus in fileLines
    if (csrCheckStatus contains "status: disabled") then
        --status: disabled
    else
        display dialog "csrutil authenticated-root must be disabled first!"
        return
    end if
end repeat

-------------------------------------------------------------------------------------------------
--admin password

set AdminNamePre to display dialog "Admin Username:" default answer "" with title "Admin Username"
set AdminName to text returned of AdminNamePre as text
set AdminPassPre to display dialog "Password:" default answer "" with title "Admin Password"
set AdminPass to text returned of AdminPassPre as text

-------------------------------------------------------------------------------------------------
--mount system-snapshot

try
    set diskList to do shell script "diskutil list "
    set fileLines to paragraphs of diskList
    set snapshotDiskAll to "Protected systemcontainer not found"
    set snapshotDiskAll2 to ""
    set snapshotDisk to ""
    repeat with diskListDisks in fileLines
        if (diskListDisks contains "com.apple") and (diskListDisks contains "APFS Snapshot") then
            set snapshotDisk to word -1 of diskListDisks
            set snapshotDisk to text 1 thru 7 of snapshotDisk
            set snapshotDisk1 to word -1 of diskListDisks
            set snapshotDisk2 to word -2 of diskListDisks
            set snapshotDisk3 to word -3 of diskListDisks
            set snapshotDisk5 to word -5 of diskListDisks
            set snapshotDiskAll to snapshotDisk5 & " - " & snapshotDisk3 & " - " & snapshotDisk2 & " - " & snapshotDisk1
            try
                set diskList to do shell script "diskutil list "
                set fileLines to paragraphs of diskList
                repeat with diskListDisks in fileLines
                    if diskListDisks contains snapshotDisk then
                        set snapshotDisk to word -1 of diskListDisks
                        set snapshotDisk to text 1 thru 7 of snapshotDisk
                        set snapshotDisk1 to word -1 of diskListDisks
                        set snapshotDisk2 to word -2 of diskListDisks
                        set snapshotDisk3 to word -3 of diskListDisks
                        set snapshotDiskAll2 to "Systemcontainer - " & snapshotDisk3 & " - " & snapshotDisk2 & " - " & snapshotDisk1
                        exit repeat
                    end if
                end repeat
            end try
        end if
    end repeat
end try

tell application "Finder"
    set fileNameTest2 to "/Users/" & AdminName & "/mount/System/Applications/App Store.app"
    set fileNameTest2 to POSIX file fileNameTest2 as string
    try
        set dateiAlias to fileNameTest2 as alias
    on error
        set theResponse to display dialog snapshotDiskAll2 & "
" & snapshotDiskAll & "

Protected systemcontainer:" default answer snapshotDisk with icon note buttons {"Cancel", "Continue"} default button "Continue"
        do shell script "mount -o nobrowse -t apfs /dev/" & (text returned of theResponse) & " /Users/" & AdminName & "/mount" user name AdminName password "" & AdminPass with administrator privileges
    end try
end tell

-------------------------------------------------------------------------------------------------
--hide unwanted

set theFile to "/Users/" & AdminName & "/Documents/Restore/Configs/hide_app.cfg"
set fileContent to read theFile as string
set fileLines to paragraphs of fileContent
repeat with fileName in fileLines
    tell application "Finder"
        set fileNameTest to "/Users/" & AdminName & "/mount/System/Applications/" & fileName
        set fileName to "chflags hidden \"/Users/" & AdminName & "/mount/System/Applications/" & fileName & "\""
        set fileNameTest2 to POSIX file fileNameTest as string
        try
            set dateiAlias to fileNameTest2 as alias
            do shell script fileName user name AdminName password AdminPass with administrator privileges
        on error
            -- ignore error
        end try
    end tell
end repeat

try
    do shell script "rm -rf  /Users/.localized" user name AdminName password AdminPass with administrator privileges
    do shell script "chflags hidden /Users/" & AdminName & "/mount/System/Library/CoreServices/Applications/Feedback\\ Assistant.app" user name AdminName password AdminPass with administrator privileges
on error
    -- ignore error
end try

-------------------------------------------------------------------------------------------------
--change App-icons

use framework "Foundation"
use framework "AppKit"
use scripting additions
set PathU to "/Users/" & AdminName & "/mount/System/Applications/Utilities/"
set PathL to "/Users/" & AdminName & "/mount/System/Library/"
set PathA to "/Users/" & AdminName & "/mount/System/Applications/"
set PathI to "/Users/" & AdminName & "/Documents/Restore/Restore-icons/"

set theFile to "/Users/" & AdminName & "/Documents/Restore/Configs/change_icons.cfg"
set fileContent to read theFile as string
set appIconPairs to paragraphs of fileContent
set variablePaare to {}
repeat with aLine in appIconPairs
    set lineString to aLine as string
    if lineString is not "" then
        set AppleScript's text item delimiters to "<-->"
        set keyValuePair to text items of lineString
        if (count of keyValuePair) is 2 then
            set appName to item 1 of keyValuePair
            set value to item 2 of keyValuePair
            set end of variablePaare to {appName:appName, value:value}
        end if
    end if
end repeat

set AppleScript's text item delimiters to ""
repeat with i from 1 to count of variablePaare
    set appIconPair to item i of variablePaare
    set destPath to (appIconPair's appName)
    set sourcePath to (appIconPair's value)
    set destPath to replace_text((replace_text((replace_text(destPath, "/PathA/", PathA)), "/PathL/", PathL)), "/PathU/", PathU)
    set sourcePath to replace_text(sourcePath, "/PathI/", PathI)
    tell application "Finder"
        set fileNameTest2 to POSIX file destPath as string
        try
            set dateiAlias to fileNameTest2 as alias
            -- original Mod to a+rw
            set filePermissions to do shell script "ls -l " & quoted form of destPath
            set octalPermissions to do shell script "stat -f %A " & quoted form of destPath
            set fileMod to "chmod a+rw \"" & destPath & "\""
            do shell script fileMod user name AdminName password AdminPass with administrator privileges
            -- change Icon
            set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
            (current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
            -- a+rw to original Mod
            set fileMod to "chmod " & octalPermissions & " \"" & destPath & "\""
            do shell script fileMod user name AdminName password AdminPass with administrator privileges
            --
        on error
            -- ignore error
        end try
    end tell
end repeat

-------------------------------------------------------------------------------------------------
--copy Icons

set theFile to "/Users/" & AdminName & "/Documents/Restore/Configs/copy_icons.cfg"
set fileContent to read theFile as string
set appIconPairs to paragraphs of fileContent
set variablePaare to {}
repeat with aLine in appIconPairs
    set lineString to aLine as string
    if lineString is not "" then
        set AppleScript's text item delimiters to "<-->"
        set keyValuePair to text items of lineString
        if (count of keyValuePair) is 2 then
            set appName to item 1 of keyValuePair
            set value to item 2 of keyValuePair
            set end of variablePaare to {appName:appName, value:value}
        end if
    end if
end repeat

set AppleScript's text item delimiters to ""
repeat with i from 1 to count of variablePaare
    set appIconPair to item i of variablePaare
    set destPath to (appIconPair's appName)
    set sourcePath to (appIconPair's value)
    set destPath to replace_text((replace_text((replace_text(destPath, "/PathA/", PathA)), "/PathL/", PathL)), "/PathU/", PathU)
    set sourcePath to replace_text(sourcePath, "/PathI/", PathI)
    set searchvar to "*"
    if sourcePath contains searchvar then
        do shell script "cp " & sourcePath & " " & destPath user name AdminName password AdminPass with administrator privileges
    else
        do shell script "cp \"" & sourcePath & "\" \"" & destPath & "\"" user name AdminName password AdminPass with administrator privileges
    end if
end repeat

-------------------------------------------------------------------------------------------------
--Iconcachereset

try
    do shell script "defaults write -g NSSplitViewItemSidebarDefaultsToFloatingAppearance -bool false"
    do shell script "defaults write -g NSConvolutionOverride1 -float 10"
    do shell script "sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \\;" user name AdminName password AdminPass with administrator privileges
    do shell script "killall Dock"
on error
    -- ignore error
end try

-------------------------------------------------------------------------------------------------
--umount , write snapshot

tell application "Finder"
    set fileNameTest2 to "/Users/" & AdminName & "/mount/System/Applications/App Store.app"
    set fileNameTest2 to POSIX file fileNameTest2 as string
    try
        set dateiAlias to fileNameTest2 as alias
        do shell script "bless --mount /Users/" & AdminName & "/mount/ --setBoot --create-snapshot" user name AdminName password AdminPass with administrator privileges
        do shell script "umount /Users/" & AdminName & "/mount" user name AdminName password AdminPass with administrator privileges
    on error
        display dialog "MacOS GUI Restore not done

MacOS GUI-script
 ©2019-2026 by [email protected]"
    end try
end tell
display dialog "MacOS GUI Restore done

MacOS GUI-script
 ©2019-2026 by [email protected]"

-------------------------------------------------------------------------------------------------
--functions

on replace_text(this_text, findText, replaceText)
    set this_text to do shell script "sed 's|" & quoted form of findText & "|" & quoted form of replaceText & "|g' <<< " & quoted form of this_text
    return this_text
end replace_text

-------------------------------------------------------------------------------------------------

Dazu nur noch ein Verzeichnis mit den Icons und eins mit den drei Configs.
Eine Config welche Icons geändert werden sollen bei Apps
Eine Config mit Icons die einfach kopiert werden ( wie z.b. Findericon u.s.w. )
Und eine Config welche Bloatware versteckt werden soll.
 
Zuletzt bearbeitet:
Was ist das denn?
Unnötige Apple-Apps die man nicht braucht und den Programmeordner nur unnötig unübersichtlich machen.
Hier sieht man ja welche Apps ich im Programmordner versteckt hab und welche ich nur sehen muss:


_ 2026-07-05 um 15.04.33.jpg
_ 2026-07-05 um 15.04.49.jpg


Die Apps stehen in meiner Config zum Script die versteckt werden sollen :
Automator.app
Books.app
Calendar.app
Chess.app
Contacts.app
Dictionary.app
FaceTime.app
FindMy.app
Home.app
Image Capture.app
Mail.app
Music.app
Maps.app
Messages.app
News.app
Notes.app
Photos.app
Podcasts.app
Reminders.app
Shortcuts.app
Siri.app
Stickies.app
Stocks.app
Apps.app
Journal.app
Games.app
Phone.app
TV.app
VoiceMemos.app
Weather.app
Mission Control.app
Image Playground.app
Font Book.app
App Store.app
Photo Booth.app
Freeform.app
iPhone Mirroring.app
Tips.app
Passwords.app
Utilities/Bluetooth File Exchange.app
Utilities/ColorSync Utility.app
Utilities/Digital Color Meter.app
Utilities/Grapher.app
Utilities/Magnifier.app
Utilities/Migration Assistant.app
Utilities/VoiceOver Utility.app
 
Zuletzt bearbeitet:
Ist ja in den Configs für jeden individuell anpassbar. Ich brauch im Programmordner z.b. kein AppStore Icon wenn er sowieso immer in der Menuleiste des Desktop verfügbar ist. Und ne Menge Apps brauch ich nunmal gar nicht. 1000 Icons wovon man nur 10 braucht sind nunmal unübersichtlich. Außerdem hab ich keinen Bock mit AQnfang 60 mich ständig an neue Icons zu gewöhnen um schnell was zu starten.

Das sind meine Configs:
Apps die versteckt werden in der "hide_app.cfg":
Code:
Automator.app
Books.app
Calendar.app
Chess.app
Contacts.app
Dictionary.app
FaceTime.app
FindMy.app
Home.app
Image Capture.app
Mail.app
Music.app
Maps.app
Messages.app
News.app
Notes.app
Photos.app
Podcasts.app
Reminders.app
Shortcuts.app
Siri.app
Stickies.app
Stocks.app
Apps.app
Journal.app
Games.app
Phone.app
TV.app
VoiceMemos.app
Weather.app
Mission Control.app
Image Playground.app
Font Book.app
App Store.app
Photo Booth.app
Freeform.app
iPhone Mirroring.app
Tips.app
Passwords.app
Utilities/Bluetooth File Exchange.app
Utilities/ColorSync Utility.app
Utilities/Digital Color Meter.app
Utilities/Grapher.app
Utilities/Magnifier.app
Utilities/Migration Assistant.app
Utilities/VoiceOver Utility.app

Icons die einfach kopiert werden in der "copy_icons.cfg":
Code:
/PathL/CoreServices/Finder.app/Contents/Resources/Finder.icns<-->/PathI/___Dock/Finder.icns
/PathL/CoreServices/DiskImageMounter.app/Contents/Resources/diskimage.icns<-->/PathI/App-Icons/diskimage.icns
/PathL/CoreServices/CoreTypes.bundle/Contents/Resources<-->/PathI/___CoreTpesBundle_icons/*
/PathL/CoreServices/Dock.app/Contents/Resources<-->/PathI/___Dock/*
/PathL/Extensions/IOStorageFamily.kext/Contents/Resources<-->/PathI/___IOStorageFamily_kext_icons/*


(System)App Icons die geändert werden in der "change_icons.cfg":
Code:
/PathA/Image Capture.app<-->/PathI/App-Icons/ImageCapture.icns
/Applications/Affinity.app<-->/PathI/App-Icons/Affinity.icns
/Applications/Little Snitch.app<-->/PathI/App-Icons/LittleSnitch.icns
/Applications/Utilities/Blackmagic Disk Speed Test.app<-->/PathI/App-Icons/BlackMagic.icns
/Applications/Utilities/Restore MacOS<-->/PathI/App-Icons/Restore.icns
/Applications/Audio/GarageBand.app<-->/PathI/App-Icons/GarageBand.icns
/Applications/Epson Software/Epson Scan 2.app<-->/PathI/App-Icons/Scanner.icns
/Applications/Audio/Logic Pro.app<-->/PathI/App-Icons/LogicPro.icns
/Applications/Audio/Plex Media Server.app<-->/PathI/App-Icons/PlexMediaServer.icns
/Applications/WhatsApp.app<-->/PathI/App-Icons/WhatsApp.icns
/Applications/Microsoft Word 2024.app<-->/PathI/App-Icons/Word.icns
/Applications/Microsoft Excel 2024.app<-->/PathI/App-Icons/Excel.icns
/Applications/Utilities<-->/PathI/App-Icons/UtilitieFolder.icns
/Applications/Audio<-->/PathI/App-Icons/AudioFolder.icns
/Applications/Commander One.app<-->/PathI/App-Icons/CommanderOne.icns
/Applications/Utilities/Apple Configurator 2.app<-->/PathI/App-Icons/Apple Conf.icns
/Applications/Utilities/The Unarchiver.app<-->/PathI/App-Icons/Unarchiver.icns
/Applications/Audio/TunePat Music One.app<-->/PathI/App-Icons/TunePat.icns
/Applications/Audio/MainStage.app<-->/PathI/App-Icons/Mainstage.icns
/Applications/Audio/Plex.app<-->/PathI/App-Icons/Plex.icns
/Applications<-->/PathI/App-Icons/Program-Folder.icns
/Applications/Firefox.app<-->/PathI/App-Icons/Firefox.icns
/Applications/TV.app<-->/PathI/App-Icons/TV.icns
/Applications/Smarthome Control.app<-->/PathI/App-Icons/Smarthome.icns
/Applications/Amiga OS 3.2.3.app<-->/PathI/App-Icons/Amiga.icns
/Applications/Utilities/Raspberry Pi Imager.app<-->/PathI/App-Icons/RASPi.icns
/Library<-->/PathI/App-Icons/Library-Folder.icns
/Users<-->/PathI/App-Icons/Users-Folder.icns
/PathU/Activity Monitor.app<-->/PathI/App-Icons/ActivityMonitor.icns
/PathU/Audio MIDI Setup.app<-->/PathI/App-Icons/AudioMIDISetup.icns
/PathU/Screenshot.app<-->/PathI/App-Icons/Screenshot.icns
/PathU/Screen Sharing.app<-->/PathI/App-Icons/ScreenSharing.icns
/PathU/Print Center.app<-->/PathI/App-Icons/Printcenter.icns
/PathU/Disk Utility.app<-->/PathI/App-Icons/DiskUtility.icns
/PathU/Console.app<-->/PathI/App-Icons/Console.icns
/PathU/Script Editor.app<-->/PathI/App-Icons/ScriptEditor.icns
/PathU/System Information.app<-->/PathI/App-Icons/SystemProfiler.icns
/PathU/Terminal.app<-->/PathI/App-Icons/Terminal.icns
/PathA/QuickTime Player.app<-->/PathI/App-Icons/QuickTimePlayerX.icns
/PathA/System Settings.app<-->/PathI/App-Icons/Systempreferences.icns
/PathA/TextEdit.app<-->/PathI/App-Icons/TextEdit.icns
/PathA/Time Machine.app<-->/PathI/App-Icons/Timemachine.icns
/PathA/Clock.app<-->/PathI/App-Icons/clock.icns
/PathA/Preview.app<-->/PathI/App-Icons/Preview.icns
/PathA/Calculator.app<-->/PathI/App-Icons/calculator.icns
/PathA/Utilities<-->/PathI/App-Icons/UtilitieFolder.icns
/PathA/Mail.app<-->/PathI/App-Icons/Mail.icns
/PathA/Music.app<-->/PathI/App-Icons/Music.icns
/Users/dwight/mount/System<-->/PathI/App-Icons/System-Folder.icns
/PathL/CoreServices/Finder.app<-->/PathI/App-Icons/Finder.icns
/PathL/CoreServices/Applications/Archive Utility.app<-->/PathI/App-Icons/Unarchiver.icns
/PathL/CoreServices/Applications/About This Mac.app<-->/PathI/App-Icons/SystemProfiler.icns
 
ich bin wohl ein zu unkritischer Applenutzer.
Konnte mich bis jetzt eigentlich immer mit der GUI arrangieren welche mir Apple vorgibt.

Aber ist natürlich eine individuelle Sache.
Mir wärs zu aufwendig.
 
Was ist daran aufwändig nach einem Systemupdate/Neuinstallation einmal das Script laufen zu lassen. Hier bei 7 eigenen und 13 Applesystemen im Studio ist es jedenfalls so schnell ohne Aufwand erledigt.
 
Cool, dass das geht. Schöner Proof of Concept.
Persönlich brauche ich das nicht - mich haben die aktuellen Icons nie gestört. Wenn ich ehrlich bin habe ich hier Änderungen in vielen Fällen gar nicht so bewusst wahrgenommen.
 
  • Like
Reaktionen: tornesch
Wenn man mit PPC Macs angefangen hat als die aktuell waren, damals gab es ja sogar mit dem
Umax SuperMac S900/200 die ich hier eingesetzt hab Licensenachbauten von Macs und der Umax hatte sogar noch vor Apple selber Dual-CPU, über die ersten OS X Versionen bis zum heutigen Mac OS, und sie immer täglich produktiv einsetzt, fallen einem die ständigen Änderungen schon auf.
 
Gibt’s auch ein Script um das mit einem Klick wieder zurückzustellen?

Für mich persönlich sind in dieser Aufstellung auch zu viele Programme bei die meiner Meinung nach essenziell sind. Dafür hab ich ja auch Apple als All in One Paket.

Mail, Messages, Nachrichten, Word & Excel etc. unter Bloatware einzusortieren …. Ok…ist schon speziell,
aber wenn man es so sieht und für sich anpasst, eine interessante Option.
 
Word und Excel blende ich nich aus. Mail hab ich das Icon im Dock da brauche ich es nicht noch mal in Programme. Und man kann die Config was versteckt werden soll ja anpassen, dafür ist sie da. Klar könnte man auch "mal eben" ein Script erstellen was eben die Apps in der Config nicht versteckt sondern sichtbar macht.
 
Zuletzt bearbeitet:
Was ist daran aufwändig nach einem Systemupdate/Neuinstallation einmal das Script laufen zu lassen. Hier bei 7 eigenen und 13 Applesystemen im Studio ist es jedenfalls so schnell ohne Aufwand erledigt.
Vermutlich nix.
Habe immer irgendwie die Befürchtung, dass solche Veränderungen zu tief ins System eingreifen und dieses dann instabil macht.

Noch eine Frage am Rande:
Die Änderungen bleiben auch nach einem Neustart erhalten?
 
Da ja der Systemsnapshot neu geschrieben wird bleibt es auch beim Neustart und was soll ein System unstabil machen nur weil man ein Icon ändert oder eine Datei auf "hidden" setzt.