File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Required parameters:
4+ # @raycast.schemaVersion 1
5+ # @raycast.title Toggle Menu Icons
6+ # @raycast.mode silent
7+
8+ # Optional parameters:
9+ # @raycast.icon 🎛️
10+ # @raycast.packageName System Utilities
11+
12+ # Documentation:
13+ # @raycast.description Show or hide Tahoe menu icons
14+ # @raycast.author chrismessina
15+ # @raycast.authorURL https://raycast.com/chrismessina
16+
17+ set -euo pipefail
18+
19+ current_value=" $( defaults read -g NSMenuEnableActionImages 2> /dev/null || echo 1) "
20+ normalized=" $( echo " $current_value " | tr ' [:upper:]' ' [:lower:]' ) "
21+
22+ if [[ " $normalized " == " 0" || " $normalized " == " no" || " $normalized " == " false" ]]; then
23+ next_state=" true"
24+ else
25+ next_state=" false"
26+ fi
27+
28+ if ! defaults write -g NSMenuEnableActionImages -bool " $next_state " ; then
29+ echo " Failed to toggle menu action icons." >&2
30+ exit 1
31+ fi
32+
33+ killall Finder
You can’t perform that action at this time.
0 commit comments