Customise menu bar icons.

Joined
Oct 8, 2018
Messages
3
Reaction score
0
Points
1
Hi guys.
I'm looking to spice up Mojave a bit by adding colour to menu bar icons.
Namely Wi-Fi and Battery icons (since I hide the rest using Bartender 3).
I've navigated to System > Library > CoreServices > Menu Extras > Battery.menu > Contents > Resources , and found the following files:

UPSCharged.pdf
UPSCharging.pdf
UPSEmpty.pdf
UPSLevelBlack.pdf
UPSLevelRed.pdf

The problem is these files are Read-only. So I can open them in Illustrator and edit the colouring, but can't save and overwrite the files.
Does anyone know how to alter permissions and make the files Read & Write? Attempting to alter permissions on the 'Get Info' window results in this error:
"The operation can’t be completed because you don’t have the necessary permission."

I'm assuming the fix is a Terminal command or something.
Thanks in advance,
Jack
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Knowing the risks and owning whatever you break.

From the terminal, enter the following commands:
Code:
cd /System/Library/CoreServices/Menu Extras/Battery.menu/Contents/Resources
sudo chown 666 UPSCharged.pdf UPSCharging.pdf UPSEmpty.pdf UPSLevelBlack.pdf UPSLevelRed.pdf

Make your changes and then in the same Terminal window
Code:
sudo chown 644 UPSCharged.pdf UPSCharging.pdf UPSEmpty.pdf UPSLevelBlack.pdf UPSLevelRed.pdf

The sudo command will ask you for your login password (presumably the account you login with has Admin privileges), enter it and the permissions will be changed. You can confirm both changes through Finder Get Info.
 
OP
I
Joined
Oct 8, 2018
Messages
3
Reaction score
0
Points
1
What I've done is disabled System Integrity Protection and changed permissions on the respective files and their parent folders.
The colours have been changed but these changes do not appear on the menu bar icon. Will your terminal codes fix this?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,596
Reaction score
1,072
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
I can't answer your question about Terminal but did you reboot the Mac after making the changes? I don't know if that applies here but it often does for these types of changes.

BTW I assume that you made a good backup before changing the files.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
The terminal commands will not make any magic happen. You are assuming that these PDF files are indeed the ones displayed on the menu bar. If that were true, your changes would appear. I find it hard to believe that PDF files are used for this purpose since there are significantly lighter weight (and scalable) image formats for this purpose.
 
OP
I
Joined
Oct 8, 2018
Messages
3
Reaction score
0
Points
1
Well there's no other image files of any kind in the folder. Not sure where else to look
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
The resources are most likely not in a format that you can modify as they are likely embedded into something else. Possibly a sprite sheet or SVG with hard coded values directly in code (that's how I would do it).
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top