├── .github ├── FUNDING.yml └── workflows │ ├── release.yml │ └── metrics.yml ├── Casks └── oh-my-posh.rb └── oh-my-posh.rb /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: jandedobbeleer 4 | ko_fi: jandedobbeleer 5 | -------------------------------------------------------------------------------- /Casks/oh-my-posh.rb: -------------------------------------------------------------------------------- 1 | cask "oh-my-posh" do 2 | desc "Prompt theme engine for any shell" 3 | homepage "https://ohmyposh.dev" 4 | arch arm: "arm64", intel: "amd64" 5 | version "28.4.0" 6 | url "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v#{version}/posh-darwin-#{arch}", 7 | verified: "github.com/JanDeDobbeleer/oh-my-posh/" 8 | sha256 arm: "90286486cc8f448c4839f9312376fada4fcf8f3964dc52b46d30c0d5502a0847", 9 | intel: "be0ec36ce4ff0239bf5f545a23ae66943cfc5807d578e13f52271e6aa7a6c0f1" 10 | name "oh-my-posh" 11 | binary "posh-darwin-#{arch}", target: "oh-my-posh" 12 | auto_updates true 13 | end 14 | 15 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Commit new version 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | version: 6 | description: 'The latest version' 7 | required: true 8 | 9 | jobs: 10 | release: 11 | runs-on: ubuntu-latest 12 | defaults: 13 | run: 14 | shell: pwsh 15 | working-directory: ${{ github.workspace }}/build 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v2 19 | - name: Adjust Formula 20 | run: ./build.ps1 -Version ${{ github.event.inputs.version }} 21 | - name: Commit changes 22 | uses: stefanzweifel/git-auto-commit-action@v4 23 | with: 24 | commit_message: "feat: Formula v${{ github.event.inputs.version }}" 25 | -------------------------------------------------------------------------------- /oh-my-posh.rb: -------------------------------------------------------------------------------- 1 | class OhMyPosh < Formula 2 | desc "Prompt theme engine for any shell" 3 | homepage "https://ohmyposh.dev" 4 | url "https://github.com/JanDeDobbeleer/oh-my-posh/archive/v28.4.0.tar.gz" 5 | head "https://github.com/JanDeDobbeleer/oh-my-posh.git", branch: "main" 6 | sha256 "3f30a5c0e1ec53d994dba573b1aea6566cca8b6341fc1eb0cb5349d7a7dfb491" 7 | license "MIT" 8 | version "28.4.0" 9 | 10 | depends_on "go@1.25" => :build 11 | 12 | def install 13 | Dir.chdir("src") do 14 | ENV["GOEXPERIMENT"] = "greenteagc,jsonv2" 15 | ENV["GOPROXY"] = ENV.has_key?("HOMEBREW_GOPROXY") ? ENV["HOMEBREW_GOPROXY"] : "" 16 | system("go build -buildvcs=false -o=oh-my-posh -ldflags=\"-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=28.4.0' -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Date=2025-12-20T11:40:40Z'\"") 17 | bin.install "oh-my-posh" 18 | end 19 | mv "themes", prefix 20 | end 21 | 22 | def caveats 23 | <<~EOS 24 | Thanks for installing Oh My Posh. 25 | Have a look at https://ohmyposh.dev/docs/ for detailed instructions for your shell. 26 | Sample themes can be found at $(brew --prefix oh-my-posh)/themes. 27 | 28 | If you're enjoying Oh My Posh, feel free to donate or become a sponsor. 29 | https://github.com/sponsors/JanDeDobbeleer 30 | 31 | In case you're looking for help, want to share how you use Oh My Posh, or find like-minded individuals, join our Discord community! 32 | https://discord.gg/n7E3DkXssv 33 | EOS 34 | end 35 | 36 | test do 37 | system "#{bin}/oh-my-posh", "--help" 38 | end 39 | end 40 | 41 | -------------------------------------------------------------------------------- /.github/workflows/metrics.yml: -------------------------------------------------------------------------------- 1 | name: Metrics 2 | on: 3 | schedule: 4 | - cron: "0 1 * * *" 5 | workflow_dispatch: 6 | 7 | jobs: 8 | metrics: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Install Node ⬇️ 12 | uses: actions/setup-node@v4 13 | with: 14 | node-version: 20 15 | - name: Install dependencies ⚙️ 16 | run: npm install applicationinsights 17 | - name: Fetch repo clones and report 📈 18 | uses: actions/github-script@v7 19 | env: 20 | APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING }} 21 | with: 22 | github-token: ${{ secrets.GH_PAT }} 23 | script: | 24 | let appInsights = require('applicationinsights'); 25 | appInsights.setup(); 26 | 27 | clones = await github.rest.repos.getClones({ 28 | owner: 'jandedobbeleer', 29 | repo: 'homebrew-oh-my-posh' 30 | }); 31 | 32 | const isSameDay = (first, second) => 33 | first.getFullYear() === second.getFullYear() && 34 | first.getMonth() === second.getMonth() && 35 | first.getDate() === second.getDate(); 36 | const parseDate = (timestamp) => new Date(Date.parse(timestamp)); 37 | const yesterday = ( d => new Date(d.setDate(d.getDate()-1)) )(new Date); 38 | 39 | yesterday_clones = clones.data.clones.find(clone => isSameDay(yesterday, parseDate(clone.timestamp))); 40 | console.log(yesterday_clones.uniques); 41 | 42 | let client = appInsights.defaultClient; 43 | client.trackMetric({name: "homebrew installs", value: yesterday_clones.uniques}); 44 | 45 | 46 | 47 | --------------------------------------------------------------------------------