Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide icon via defaults not working? #37

Open
jimgraham opened this issue Jan 12, 2024 · 4 comments
Open

Hide icon via defaults not working? #37

jimgraham opened this issue Jan 12, 2024 · 4 comments

Comments

@jimgraham
Copy link

steps

  1. In the terminal defaults write com.oliverpeate.Bluesnooze hideIcon -bool true && killall Bluesnooze
    1. Bluesnooze killed, removed from menu bar
  2. Launch Bluesnooze from cmd+space type "bluesnooze"
  3. Icon reappears
bluesnooze.mp4

Expected

Bluesnooze app icon does not reappear

setup

  • 2023 14" MacBook M1 Pro
  • Sonoma 14.2.1
  • Bluesnooze installed via brew install bluesnooze

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>BuildMachineOSBuild</key>
        <string>22E261</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>en</string>
        <key>CFBundleExecutable</key>
        <string>Bluesnooze</string>
        <key>CFBundleIconFile</key>
        <string>AppIcon</string>
        <key>CFBundleIconName</key>
        <string>AppIcon</string>
        <key>CFBundleIdentifier</key>
        <string>com.oliverpeate.Bluesnooze</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>Bluesnooze</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.2</string>
        <key>CFBundleSupportedPlatforms</key>
        <array>
                <string>MacOSX</string>
        </array>
        <key>CFBundleVersion</key>
        <string>1</string>
        <key>DTCompiler</key>
        <string>com.apple.compilers.llvm.clang.1_0</string>
        <key>DTPlatformBuild</key>
        <string></string>
        <key>DTPlatformName</key>
        <string>macosx</string>
        <key>DTPlatformVersion</key>
        <string>13.3</string>
        <key>DTSDKBuild</key>
        <string>22E245</string>
        <key>DTSDKName</key>
        <string>macosx13.3</string>
        <key>DTXcode</key>
        <string>1431</string>
        <key>DTXcodeBuild</key>
        <string>14E300c</string>
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.utilities</string>
        <key>LSMinimumSystemVersion</key>
        <string>12.0</string>
        <key>LSUIElement</key>
        <true/>
        <key>NSHumanReadableCopyright</key>
        <string>Copyright © 2020 Oliver Peate. All rights reserved.</string>
        <key>NSMainNibFile</key>
        <string>MainMenu</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
        <key>NSSupportsAutomaticTermination</key>
        <true/>
        <key>NSSupportsSuddenTermination</key>
        <true/>
</dict>
</plist>
@ColinHebert
Copy link

ColinHebert commented Feb 1, 2024

Not a MacOS dev, but here's a "workaround":
ln -s ~/Library/Preferences/com.oliverpeate.Bluesnooze.plist ~/Library/Containers/com.oliverpeate.Bluesnooze/Data/Library/Preferences/com.oliverpeate.Bluesnooze.plist

Not sure what is the right way to have Bluesnooze's making the request for its container to have the config mounted

@tambourine-man
Copy link

Same here, icon is visible even after running the defaults write command. The value is being set, just ignored by the app:

defaults read com.oliverpeate.Bluesnooze hideIcon
1

@ColinHebert's suggestion didn't work for me

@cdaringe
Copy link

I got it working, but had to update the app.

Not sure exactly which change did the trick, but my hunch is removing the app "sandbox" from the xcode project.

The downside is that I couldn't get the LaunchAtLogin dep to work, but, you can still install it and set it up manually to get it to launch at startup.

Here's my recipe:

  • Open my fork https://github.com/cdaringe/bluesnooze in xcode
  • Product > Schems > BluesnoozeRelease
  • Product > Build
  • In the product navigator tab > Products > Bluesnooze (Right Click!) > Show In Finder
    • Drag to Applications folder
  • Mac system settings > Login Items > Add item > Select Bluesnooze!

Not a macos dev, just managed to hack this together. Surely some saintly mac person will find this atrocious, but it works!

@Baraujo25
Copy link

For me the solution was:

Pre-condition:

  • Bluesnooze running
  • Bluesnooze icon displayed
  • defaults read com.oliverpeate.Bluesnooze hideIcon does not return 1

Steps:

  1. Run defaults write com.oliverpeate.Bluesnooze hideIcon -bool true
  2. Quit app from Bluesnooze icon
  3. Reopen app with CMD + Space

Note: If I quit the app with killall Bluesnooze doesn't seem to do the trick, don't ask why (not mac dev here)

My environment:

  • Chip M3
  • Sonoma 14.2
  • Bluesnooze v1.2 via homebrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants