├── hide_finder_trash_dock_icons_scpt.app └── Contents │ ├── PkgInfo │ ├── MacOS │ └── applet │ ├── Resources │ ├── applet.icns │ ├── applet.rsrc │ ├── Scripts │ │ └── main.scpt │ └── description.rtfd │ │ └── TXT.rtf │ └── Info.plist ├── LICENSE.txt ├── hide_finder_trash_dock_icons_scpt.scpt.txt └── README.md /hide_finder_trash_dock_icons_scpt.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPLaplt -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/MacOS/applet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesscxc/hide-finder-trash-dock-icons/HEAD/hide_finder_trash_dock_icons_scpt.app/Contents/MacOS/applet -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/Resources/applet.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesscxc/hide-finder-trash-dock-icons/HEAD/hide_finder_trash_dock_icons_scpt.app/Contents/Resources/applet.icns -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/Resources/applet.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesscxc/hide-finder-trash-dock-icons/HEAD/hide_finder_trash_dock_icons_scpt.app/Contents/Resources/applet.rsrc -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/Resources/Scripts/main.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesscxc/hide-finder-trash-dock-icons/HEAD/hide_finder_trash_dock_icons_scpt.app/Contents/Resources/Scripts/main.scpt -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/Resources/description.rtfd/TXT.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf610 2 | {\fonttbl} 3 | {\colortbl;\red255\green255\blue255;} 4 | {\*\expandedcolortbl;;} 5 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 Jessica Cummins 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted. 5 | 6 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 7 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 8 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 9 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 10 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 11 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 12 | PERFORMANCE OF THIS SOFTWARE. 13 | -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | applet 11 | CFBundleIconFile 12 | applet 13 | CFBundleIdentifier 14 | com.apple.ScriptEditor.id.hide-finder-trash-dock-icons-scpt 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | hide_finder_trash_dock_icons_scpt 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | aplt 25 | LSMinimumSystemVersionByArchitecture 26 | 27 | x86_64 28 | 10.6 29 | 30 | LSRequiresCarbon 31 | 32 | WindowState 33 | 34 | bundleDividerCollapsed 35 | 36 | bundlePositionOfDivider 37 | 0.0 38 | dividerCollapsed 39 | 40 | eventLogLevel 41 | 2 42 | name 43 | ScriptWindowState 44 | positionOfDivider 45 | 421 46 | savedFrame 47 | 25 58 771 672 0 0 1366 745 48 | selectedTab 49 | description 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /hide_finder_trash_dock_icons_scpt.scpt.txt: -------------------------------------------------------------------------------- 1 | # .metadata (file_metadata (name hide_finder_trash_dock_icons_scpt.scpt) ((created ty13.12zm6s) (creators jesscxc) (updaters jesscxc) (updated ty19.8.29.23.57pzm4d4s ty21.5.4.7.11.13azm4d2s ty21.5.4.7.20.27azm4d2s ty21.5.4.7.36.16azm4d2s ty21.5.4.7.42.48azm4d2s ty21.5.4.7.53.24azm4d2s ty21.5.4.8.16.41azm4d2s) (filename_extension scpt) (filetype AppleScript) (repo_link https://github.com/jesscxc/hide-finder-trash-dock-icons) (creator_site NoLiesPlease.com) (creator_github_link https://github.com/jesscxc))) 2 | 3 | # .meta In macOS, hides the Finder and Trash icons on the Dock. 4 | 5 | # .meta Rename this file "hide_finder_trash_dock_icons_scpt.scpt" to run as AppleScript. 6 | 7 | -- .meta optional 8 | -- .meta to turn off, everywhere in file change to: -- .meta my toggle_indicator_lights() 9 | my toggle_indicator_lights() 10 | 11 | do shell script "killall Dock" 12 | 13 | -- .meta delay to wait for the icons to load after logging in before hiding them 14 | delay 3 15 | 16 | tell application "System Events" 17 | tell UI element "Finder" of list 1 of process "Dock" 18 | -- .meta open Finder menu 19 | perform action "AXShowMenu" 20 | -- .meta click "Remove from Dock" 21 | click the last menu item of menu 1 22 | end tell 23 | end tell 24 | 25 | tell application "System Events" 26 | tell UI element "Trash" of list 1 of process "Dock" 27 | -- .meta open Trash menu 28 | perform action "AXShowMenu" 29 | -- .meta click "Remove from Dock" 30 | click the last menu item of menu 1 31 | end tell 32 | end tell 33 | 34 | -- .meta optional 35 | -- .meta to turn off, everywhere in file change to: -- .meta my toggle_indicator_lights() 36 | my toggle_indicator_lights() 37 | 38 | on toggle_indicator_lights() 39 | tell application "System Preferences" 40 | set current pane to pane id "com.apple.preference.dock" 41 | tell application "System Events" 42 | tell process "System Preferences" 43 | tell first window 44 | click checkbox 3 45 | end tell 46 | end tell 47 | end tell 48 | end tell 49 | quit application "System Preferences" 50 | end toggle_indicator_lights 51 | 52 | 53 | # .meta . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Hide Finder and Trash Dock Icons 3 | 4 | This script hides the Finder and Trash icons on the macOS Dock. 5 | 6 | Originally developed for Mac OS X Mavericks (v10.9). Also tested on macOS High Sierra (v10.13.6). 7 | 8 | 9 | 10 | ## Overview of script 11 | 12 | - turns off Dock indicator lights (little dots next to icon) 13 | - restarts Dock 14 | - hides Finder and Trash icons 15 | - turns on indicator lights (so there is not a floating dot where the Finder icon was) 16 | 17 | 18 | 19 | ## Installation 20 | 21 | First you need to add the "Remove from Dock" option to Finder and Trash. 22 | - Helpful instructions at: 23 | 24 | - More detailed: 25 | 26 | 27 | Basically (to quote [softwater](https://github.com/softwater) and [donedamned](https://github.com/donedamned)): 28 | 29 | 30 | 1.) Make a backup of the `DockMenus.plist` file:
31 | 32 | 1a.) Create a copy of the file located at:
33 | `/System/Library/CoreServices/Dock.app/Contents/Resources/DockMenus.plist` 34 | 35 | 1b.) Rename this new file to:
36 | `DockMenus.backup.plist` 37 | 38 | 39 | 2.) Open `DockMenus.plist` file with a text editor (eg macOS TextEdit, or the powerful and free [Sublime Text](https://www.sublimetext.com)). 40 | 41 | 42 | 3.) Add the "Remove from Dock" menu items: 43 | 44 | 3a.) Search for `finder-running` and add at the end (right before the ``): 45 | ``` 46 | 47 | command 48 | 1004 49 | name 50 | REMOVE_FROM_DOCK 51 | 52 | ``` 53 | 54 | 3b.) Search for `trash` and add at the end (right before the ``): 55 | ``` 56 | 57 | command 58 | 1004 59 | name 60 | REMOVE_FROM_DOCK 61 | 62 | ``` 63 | 64 | 65 | 66 | 4.) To make it run at log in: 67 | 68 | (Note: macOS may have issues with Installation step 4 (random inconsistencies, it seems). Systematically keep trying different ways if it doesn't work, is what I suggest.) 69 | 70 | 4a.) Save script to computer (can [download GitHub repo as .zip](https://www.itprotoday.com/mobile-management-and-security/how-do-i-download-files-github) and uncompress, then use the .txt file, or use the premade .app and skip to step 4e). 71 | 72 | 4b.) Change script name from `hide_finder_trash_dock_icons_scpt.scpt.txt` to `hide_finder_trash_dock_icons_scpt.scpt` (to take off the `.txt`). 73 | 74 | 4c.) Open file with [AppleScript Script Editor app](https://www.google.com/search?q=open+applescript+script+editor). 75 | 76 | 4d.) Script Editor -> File -> Export -> File Format -> Application -> Save 77 | 78 | 4e.) Turn on assistive access for the .app file in macOS via Administrative Assistance: 79 | 80 | 4e1.) Run .app. Click `OK` to accept that it's not allowed Assistive Access yet. 81 | 82 | 4e2.) Open [System Preferences app](https://www.google.com/search?q=macos+open+system+preferences) ((Apple in top left of screen) -> System Preferences...). 83 | 84 | 4e3.) System Preferences -> Security & Privacy -> (Privacy tab) -> (click lock in bottom left to unlock if necessary) -> (make sure .app file is checked to have access) -> (click lock in bottom left) 85 | 86 | 4e4.) System Preferences -> Users and Groups -> (click lock in bottom left to unlock if necessary) -> (Login Items tab) -> (plus symbol: +) -> (find and add the .app file) -> (click lock in bottom left) 87 | 88 | 89 | 90 | ## Configuration 91 | 92 | If you don't want to toggle the indicator lights (the little icons next to the apps): 93 | 94 | 1.) Open script with AppleScript Script Editor. 95 | 96 | 2.) Change at 2 places: `my toggle_indicator_lights()` to `-- .meta my toggle_indicator_lights()`. This comments out (turns off) that function. 97 | 98 | 3.) Make the .app from the script using Installation step 4d, then continue with the rest of the installation guide. 99 | 100 | 101 | 102 | ## Issues 103 | 104 | Not sure how to remove the left-over separator icon, yet, or if it's even possible. 105 | 106 | 107 | 108 | ## To uninstall 109 | 110 | If you want to undo the entire procedure: 111 | 112 | 1.) Delete the `DockMenus.plist` file. 113 | 114 | 2.) Rename `DockMenus.backup.plist` to `DockMenus.plist` 115 | 116 | 2.) In [macOS Terminal](https://www.google.com/search?q=open+macos+terminal) run `killall Dock` 117 | 118 | 3.) If the .app was added to run at log in (via Installation step 4), do step 4e4 but use the minus symbol ("-") to remove the .app from startup. 119 | 120 | 121 | 122 | ## License 123 | 124 | This is dedicated to the public domain (via the [0BSD license](https://choosealicense.com/licenses/0bsd/)). 125 | 126 | 127 | 128 | ## Contact info 129 | 130 | If you have any issues, my contact info is at: [NoLiesPlease.com](http://NoLiesPlease.com/about) 131 | 132 | 133 | 134 | ## Thanks to 135 | 136 | - [softwater](https://github.com/softwater) 137 | - [donedamned](https://github.com/donedamned) 138 | - Alexandr Mazanov 139 | --------------------------------------------------------------------------------