igorkulman / changemenubarcolor Goto Github PK
View Code? Open in Web Editor NEWSimple utility to change macOS Big Sur and Monterey menu bar color by appending a solid color or gradient rectangle to a wallpaper image
License: MIT License
Simple utility to change macOS Big Sur and Monterey menu bar color by appending a solid color or gradient rectangle to a wallpaper image
License: MIT License
Any ideas to make sure the Menu Bar color is changed on all displays? Currently only changes the Menu Bar located on the Mac itself. If not, how may I set the menu bar color back to its default? Thank you in advance.
If no path is given it would be great, if your tool would default to the current wallpaper path.
This could be obtained with a small query using sqlite:
sqlite3 -readonly ~/Library/Application\ Support/Dock/desktoppicture.db \ 'SELECT * FROM data ORDER BY rowID DESC LIMIT 1;'
Additionally the new file could also be written to this path, so it would be automatically applied.
No good way to test image manipulation anyway
Hi, it would be great to have a small tweak in running the command ./ChangeMenuBarColor with optional -s parameter to run it silently.
I just updated the OS from Catalina to big sur now the menu bar icons takes up 3 times more space than it did previously. Even when using vanilla to hide icons it's still twice the size.
Is it possible that this could also be adjusted with this?
Make sure it works for all the displays.
Generate the adjusted wallpaper for each display
Need support for gradient with 3 colors :) left, center, right
Hi,
Would it be possible to apply a transparency option to the app? I was think that if you applied an ALPHA value to the color specified (maybe as an additional flag)?
./ChangeMenuBarColor TransparentColor "desired_hex_color" "4"
This could maybe work in 20% increments like this; 1-20% - 2-40% - 3-60% - 4-80% - 5-100%
If you are using something like ImageMagick in the background, then this can be done like this;
https://imagemagick.org/script/compose.php
Sorry to abuse the issues function in this way...
Cheers
Darren
When you run the tool in Terminal and forget that the SolidColor
argument requires double-quotes, there is no helpful error message. Instead, a segmentation fault or other unhandled exception gets dumped to the console.
This threw me (no pun intended), and I thought the file was not being seen as executable by Terminal or there were some security/permissions issues so I went on a wild goose chase for a while before realizing what the actual problem was.
$ ./ChangeMenuBarColor SolidColor #000000
Segmentation fault: 11
$ ./ChangeMenuBarColor SolidColor #000000
ChangeMenuBarColor(74179,0x1115e4e00) malloc: Incorrect checksum for freed object 0x7fcb7ad0d3c8: probably modified after being freed.
Corrupt value: 0x4ffffffe00000000
ChangeMenuBarColor(74179,0x1115e4e00) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
It may make more sense to catch this and have an error printed out expected regarding argument format. Or just print out the default command description (root level man page that shows when you just run ./ChangeMenuBarColor
)
Or figure out a way with the argument parser to accept it without needing the double-quotes?
Hi!
Is it possible to have an option that places a gradient on the Y-axis rather than the X-axis? So that it would be possible to make system-wide themes for macOS Big Sur a little for complete with a custom background the best we can do?
I haven't seen documentation for vertical gradients.. please excuse me if you already have that in place.
On a Retina Mac, the logical resolution (point size) is used as the size for the saved image.
For example: When running the program on a 27" Retina iMac (display resolution 5120x2880) in default scaling mode (2x), the resulting wallpaper is just 2560x1440 pixels big, instead of the full resolution, resulting in a blurry wallpaper.
Hello, now there is a little problem here when executing the second part of install mint, Hello, now there is a little problem here when executing the second part of install mint, the error message is displayed as follows:
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
๐ฑ Encountered error during "swift package resolve". Use --verbose to see full output
๐ฑ Failed to resolve ChangeMenuBarColor v1.0.1 with SPM
OS: macOS Big Sur (M1)
When I execute "swift build -c release" it receive this:
error: terminated(72): LC_TERMINAL=iTerm2 SHLVL=1 SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk _=/usr/bin/swift COLORTERM=truecolor HOME=/Users/admin LC_TERMINAL_VERSION=3.4.3 TERM=xterm-256color TERM_PROGRAM=iTerm.app LANG=en_AU.UTF-8 ITERM_PROFILE=Custom Terminal LOGNAME=admin __CF_USER_TEXT_ENCODING=0x1F5:0:15 XPC_FLAGS=0x0 COLORFGBG=7;0 CPATH=/usr/local/include TERM_PROGRAM_VERSION=3.4.3 ITERM_SESSION_ID=w0t0p0:B98AD1E5-A6DF-4DA4-B992-8268C6ED976F USER=admin TERM_SESSION_ID=w0t0p0:B98AD1E5-A6DF-4DA4-B992-8268C6ED976F PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BhijhDcIOO/Listeners OLDPWD=/Users/admin LIBRARY_PATH=/usr/local/lib XPC_SERVICE_NAME=0 PWD=/Users/admin/ChangeMenuBarColor TMPDIR=/var/folders/rt/cxkhbxq11051rn6gdmwqtgmw0000gn/T/ SHELL=/bin/bash /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
On my late-2016 13" MacBook Pro, wallpapers processed through ChangeMenuBarColor always render a single-pixel wide white line along the left edge of the wallpaper. Doesn't matter if the source image was a dynamic wallpaper or normal static image.
I have the screen res scaled at "More Space" 1680x1050 in System Preferences (up from the native res of 1440x900).
However on my desktop Mac running Catalina on a non-retina (native res) screen, this doesn't happen.
Without digging into the source code, I'm not sure what causes this but it may be related to subpixel coordinate rounding?
Zoomed in. You can see a solid white line 1 pixel wide, then a mid-point alpha blend of 1 pixel wide next to it.
If terminal is in full screen, the app will only change the menu bar color for terminal. If you swipe to any other app, the menu bar is still the old color (in my case, the solid color before I shifted to a gradient color). In order for the color to work, the command has to be re-run when terminal is not full screened. Thanks for such a great app!
Is there a simple way to undo any changes and go back to the default style?
My original file is a few megabytes, while the new file ends up being under 500 kilobytes or even less. This happens every time.
Clicking on the "latest published release" link in the README results in a 404.
Additionally, the 1.0.0 release does not include a binary download, it only includes links to source code downloads. The 0.9.0 release includes a binary download as expected.
I am seeming to be confused about how to uninstall or revert back to original menu bar. Anyway to add this to the instructions.
When choosing the "Reduce transparency" option under System Preferences > Accessibility > Display, it does not work, it just stays gray. I am on mac os 12.0 and I used the precompiled version 1.0.0 which otherwise works fine.
Using currently set macOS wallpaper file:///System/Library/Desktop%20Pictures/Solid%20Colors/Black.png
Generating sRGB IEC61966-2.1 colorspace 0 0 0 1 solid color image
When I execute ./ChangeMenuBarColor SolidColor "#000000", I'm not getting the hex color of "#000000" I'm getting "#1"
Hi,
So after a very frustrating 30 minutes of errors telling me it doesn't work, I tried turning off the "hide menu bar automatically in system preferences" and everything worked. So, I feel this should be noted in the README to prevent people from having to spend so much time on this. Thanks!
Since the readme does not specify the exact steps, I was wondering how can I remove the tool, in case I don't like it.
Your instruction for uninstalling/deleting the utility so to return to the default Menu Bar for Monterey is not clear... it simply says to "delete the folder with the utility and manually set any wall paper you want." Follow-up requests/issues simply point back to the original (#27) which says the above.
I cannot find the "folder with the utility"; can you be more specific (i.e. I see no folder with "ChangeMenuBarColor", where would I find it)? I tried the "mint uninstall" command, but that didn't do what i wanted (show it uninstalled, but didn't revert the color). Please add some instructions for full removal and reset. Thank you.
when i Say swift build -c release i get an strange error whitch i can't solve. here under is show the error.
error: terminated(72): LOGNAME=quentin USER=quentin SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk LIBRARY_PATH=/usr/local/lib XPC_SERVICE_NAME=0 HOME=/Users/quentin SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tZ0VL2uV5u/Listeners _=/usr/bin/swift OLDPWD=/Users/quentin LaunchInstanceID=8004D82A-7047-42B8-A96C-E413B245A7D3 SHLVL=1 PWD=/Users/quentin/ChangeMenuBarColor SHELL=/bin/zsh CPATH=/usr/local/include SECURITYSESSIONID=18770 TERM_PROGRAM_VERSION=440 TMPDIR=/var/folders/bz/bxfswftj3597r09r673yt05m0000gq/T/ __CFBundleIdentifier=com.apple.Terminal PATH=/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands XPC_FLAGS=0x0 TERM_SESSION_ID=8AAA91F2-6F41-424E-BDB2-067C62512057 __CF_USER_TEXT_ENCODING=0x1F7:0x0:0x5 TERM=xterm-256color TERM_PROGRAM=Apple_Terminal LANG=nl_NL.UTF-8 /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
Maybee someone know what't wrong
It might be a nice option to add gradient support simply by supplying more than one color
I don't believe it is a feature now. I have multiple wallpapers that change randomly every minute.
It would be great if it was possible to give the utility a path to a wallpapers folder. This way it wouldn't be necessary to run the command for every wallpaper separately.
And also if it is possible, the utility could then change the folder in system preferences to the newly created one with adjusted wallpapers. Although that can be easily done manually so it's not a must have.
Hello,
I had some trouble setting up the project (werent able to build the swift package) but now I did some changes to my Xcode and it compiled successfully. But the only problem I have (same with the prebuilt version) is that he always tells me that he cant find the ChangeMenuBarColor Command.
Any solutions?
// Edit:
MacBook Pro M1 with latest Swift and Xcode versions installed
error: package at '/Users/arthur/ChangeMenuBarColorMac' is using Swift tools version 5.3.0 but the installed version is 5.1.0
The ReadMe suggests that the Xcode Command Line tools is sufficient to build the executable.
I tried it on a M1 Mac where they are installed but where the Xcode application is not installed.
While executing the swift command, I faced this error:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
Searching on the web, it seems that it is required to install the Xcode application to have access to xctest.
It might be interesting to update the ReadMe to remove the "at least Xcode Command Line tools" as it might not be sufficient.
Fails catastrophically with a seg fault (the error message is "Segmentation fault: 11") under MacOS 11.2, executed with:
./ChangeMenuBarColor SolidColor #CCCCCC
Hi,
I've got a triple monitor setup. It does implement the SolidColor on my main display normally, but fails to do so on my other 2 displays, throwing the following error in the terminal when using the command with --all-displays
:
Could not create graphical context for solid color image
Could not generate new wallpaper screen 1
Could not create graphical context for solid color image
Could not generate new wallpaper screen 2
My primary monitor has the proper menu bar set, but my secondary screen is always black when using the --all-displays option. I've tried every possible combination of monitor settings to make it work.
would it be possible to run the command and provide a path to a directory filled with multiple files and run the command on all of the files?
I have a directory of 80+ wallpapers and dont want to have to run the command for each one.
This is an awesome tool.
As a heavy homebrew user, my first inclination to install it was brew install change-menu-bar-color
Are you open to adding this to homebrew? I can help if you need assistance.
Iโll create new Issue as this is not fixed in 0.9.0
Have same issue. Using external monitor 2560โรโ1440 px. When I set wallpaper (using static, stock one) and use ChangeMenuBarColor SolidColor "#CCCCCC" --all-displays
Iโm getting wallpaper with overlay color way too big on the external screen (internal screen is OK).
Originally posted by @the3ye in #44 (comment)
I cloned the latest version and followed the instructions.
I'm getting compile errors, starting with:
/Users/steve/Desktop/ChangeMenuBarColor: error: manifest parse error(s): <module-includes>:1:9: note: in file included from <module-includes>:1: #import "Headers/CoreFoundation.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43: #include <CoreFoundation/CFBase.h> ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73: #include <Block.h>
When I run the executable version it finishes the task and thats it:
OVERVIEW: A Swift command-line tool to create a custom menu bar color wallpaper
for macOS Big Sur
USAGE: ChangeMenuBarColor
OPTIONS:
-h, --help Show help information.
SUBCOMMANDS:
SolidColor Adds solid color rectangle
Gradient Adds gradient rectangle
See 'ChangeMenuBarColor help ' for detailed help.
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process finished]
Am I doing something wrong?
I have generated image but it is not visible
โก๏ธ99% at 09:39:31 PM โฏ ./ChangeMenuBarColor Gradient "#FF0000" "#00FF00" ~/Downloads/wallpaperflare.com_wallpaper.jpg
Starting up
Found 1 screens
Processing screen 1 of 1
Loaded /Users/thamaraiselvam/Downloads/wallpaperflare.com_wallpaper.jpg to be used as wallpaper image
Generating gradient image
Created new wallpaper for screen 1 in file:///Users/thamaraiselvam/Library/Application%20Support/ChangeMenuBarColor//wallpaper-screen1-adjusted-76224A37-A6C1-45FC-AAE5-1E89B179BFE5.jpg
Wallpaper set
All done!
Not visible after script executed
MIT?
Is it possible to add an option to set the same color for all virtual desktops? Thank you!
Just tried running this on 12.1 but got errors. Hoping this can be updated to add support. Thanks!
Zakirs-MacBook-Pro:~ zakir$ mint run igorkulman/ChangeMenuBarColor
๐ฑ Finding latest version of ChangeMenuBarColor
๐ฑ Cloning ChangeMenuBarColor v1.0.1
๐ฑ Resolving package
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
๐ฑ Encountered error during "swift package resolve". Use --verbose to see full output
๐ฑ Failed to resolve ChangeMenuBarColor v1.0.1 with SPM
Zakirs-MacBook-Pro:~ zakir$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.