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

Add brew installation #10

Open
mayurankv opened this issue Jan 26, 2024 · 4 comments
Open

Add brew installation #10

mayurankv opened this issue Jan 26, 2024 · 4 comments

Comments

@mayurankv
Copy link

It would be great if this were installable via brew install!

@szhu
Copy link

szhu commented Jul 15, 2024

I created a cask and confirmed that it's working and passes brew audit --cask --new widgettoggler.

Casks/widgettoggler.rb:

cask "widgettoggler" do
  version "1.2.0"
  sha256 "4a37bd84eb391c86e80a05b3b875dae6286418f2223970dbeff03abe310b5af9"

  url "https://github.com/sieren/WidgetToggler/releases/download/#{version}/WidgetToggler_#{version.split(".")[0...2].join(".")}.zip"
  name "widgettoggler"
  desc "macOS Sonoma Widget Toggler for the Tray Bar - Easily Show and Hide Widgets"
  homepage "https://github.com/sieren/WidgetToggler"

  depends_on macos: ">= :sonoma"

  app "WidgetToggler.app"
end

I didn't add the recommended brew livecheck stanza because I'm not familiar with the syntax yet, but it's not required.


Can someone submit this? It can be submitted this way:

  • You can submit this file to Homebrew/homebrew-cask. This will let users install it via brew install widgettoggler. Anyone can submit this file, I just don't have the time to do it.

  • Alternatively, the maintainer can create a new repo sieren/homebrew-widgettoggler and put this file into it. This will let users install it via brew install sieren/widgettoggler/widgettoggler.

@bobbymannino
Copy link

I will add this to brew but I need to know where anything is saved locally that persists, say settings?

Such as '~/.config/widgettoggler'

If there is nothing that saves to the device let me know and I will add the cask to brew

@szhu
Copy link

szhu commented Dec 26, 2024

A bit late to this reply, but I finally have an answer.

cd ~
find . \
  -path "./Library/Mobile Documents" -prune -o -path "./Library/CloudStorage" -prune \
  -o \
  -xdev -name '*WidgetToggler*' -print
Note: Why the long command?

You can just run find ~ -name '*WidgetToggler*' but I removed some potential headaches. The two paths to prune are the paths for iCloud Drive and third-party cloud drives (like Google Drive), respectively; if you don't skip them, find may try to download the entire contents of your drive. And -xdev skips any mounted devices, which is another typical way cloud drive apps manifest your online files on your computer.


Running the above command, I get:

./Library/Daemon Containers/5065A012-3ED9-430F-8F2A-F7CD4C15CAE2/Data/ActionTranscript/com.sieren.WidgetToggler
./Library/Preferences/com.sieren.WidgetToggler.plist

:zap should definitely include the preferences file.

Regarding the other file: I'm not sure what exactly the Daemon Containers folder is for, but the ID seems like it might vary for each user, so there's likely no reliable way to remove it.

I searched for some prior art:
https://github.com/search?q=repo:Homebrew/homebrew-cask+%22Daemon+Containers%22&type=code

It seems like there is one existing example, but it's wrong: The Daemon Containers pattern listed for Clop doesn't match the path where it resides on my computer.


Based on this, I think the two acceptable choices for the :zap stanza are:

  1. ~/Library/Daemon Containers/*/Data/ActionTranscript/com.sieren.WidgetToggler
    ~/Library/Preferences/com.sieren.WidgetToggler.plist
    

or just:

  1. ~/Library/Preferences/com.sieren.WidgetToggler.plist
    

@bobbymannino
Copy link

Homebrew/homebrew-cask#194012

should be able to close this now

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

3 participants