Skip to content

Commit

Permalink
deploy: 654eed8
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Nov 23, 2024
0 parents commit 603ccc0
Show file tree
Hide file tree
Showing 151 changed files with 67,712 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2f5068cc5310c22243102104d79ee44d
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/bar-plugin.doctree
Binary file not shown.
Binary file added .doctrees/benchmark.doctree
Binary file not shown.
Binary file added .doctrees/changelog.doctree
Binary file not shown.
Binary file added .doctrees/cli-parameters.doctree
Binary file not shown.
Binary file added .doctrees/code-of-conduct.doctree
Binary file not shown.
Binary file added .doctrees/configuration.doctree
Binary file not shown.
Binary file added .doctrees/contributing.doctree
Binary file not shown.
Binary file added .doctrees/development.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/falsehoods.doctree
Binary file not shown.
Binary file added .doctrees/history.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/install.doctree
Binary file not shown.
Binary file added .doctrees/license.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/meta_package_manager.doctree
Binary file not shown.
Binary file added .doctrees/meta_package_manager.managers.doctree
Binary file not shown.
Binary file added .doctrees/meta_package_manager.tests.doctree
Binary file not shown.
Binary file added .doctrees/modules.doctree
Binary file not shown.
Binary file added .doctrees/tests.doctree
Binary file not shown.
Binary file added .doctrees/todolist.doctree
Binary file not shown.
Binary file added .doctrees/usecase.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/angry-paper-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/swiftbar-flatmenu-standard-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/swiftbar-flatmenu-table-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/swiftbar-submenu-strandard-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/swiftbar-submenu-table-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/xbar-flatmenu-standard-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/xbar-flatmenu-table-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/xbar-submenu-strandard-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/xbar-submenu-table-rendering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/yo-dawg-meta-package-manager.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
385 changes: 385 additions & 0 deletions _modules/index.html

Large diffs are not rendered by default.

873 changes: 873 additions & 0 deletions _modules/meta_package_manager/bar_plugin.html

Large diffs are not rendered by default.

1,445 changes: 1,445 additions & 0 deletions _modules/meta_package_manager/base.html

Large diffs are not rendered by default.

431 changes: 431 additions & 0 deletions _modules/meta_package_manager/capabilities.html

Large diffs are not rendered by default.

1,910 changes: 1,910 additions & 0 deletions _modules/meta_package_manager/cli.html

Large diffs are not rendered by default.

542 changes: 542 additions & 0 deletions _modules/meta_package_manager/inventory.html

Large diffs are not rendered by default.

533 changes: 533 additions & 0 deletions _modules/meta_package_manager/labels.html

Large diffs are not rendered by default.

829 changes: 829 additions & 0 deletions _modules/meta_package_manager/managers/apm.html

Large diffs are not rendered by default.

708 changes: 708 additions & 0 deletions _modules/meta_package_manager/managers/apt.html

Large diffs are not rendered by default.

507 changes: 507 additions & 0 deletions _modules/meta_package_manager/managers/cargo.html

Large diffs are not rendered by default.

539 changes: 539 additions & 0 deletions _modules/meta_package_manager/managers/chocolatey.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions _modules/meta_package_manager/managers/composer.html

Large diffs are not rendered by default.

613 changes: 613 additions & 0 deletions _modules/meta_package_manager/managers/dnf.html

Large diffs are not rendered by default.

686 changes: 686 additions & 0 deletions _modules/meta_package_manager/managers/emerge.html

Large diffs are not rendered by default.

709 changes: 709 additions & 0 deletions _modules/meta_package_manager/managers/eopkg.html

Large diffs are not rendered by default.

580 changes: 580 additions & 0 deletions _modules/meta_package_manager/managers/flatpak.html

Large diffs are not rendered by default.

931 changes: 931 additions & 0 deletions _modules/meta_package_manager/managers/fwupd.html

Large diffs are not rendered by default.

637 changes: 637 additions & 0 deletions _modules/meta_package_manager/managers/gem.html

Large diffs are not rendered by default.

941 changes: 941 additions & 0 deletions _modules/meta_package_manager/managers/homebrew.html

Large diffs are not rendered by default.

566 changes: 566 additions & 0 deletions _modules/meta_package_manager/managers/mas.html

Large diffs are not rendered by default.

693 changes: 693 additions & 0 deletions _modules/meta_package_manager/managers/npm.html

Large diffs are not rendered by default.

544 changes: 544 additions & 0 deletions _modules/meta_package_manager/managers/opkg.html

Large diffs are not rendered by default.

631 changes: 631 additions & 0 deletions _modules/meta_package_manager/managers/pacman.html

Large diffs are not rendered by default.

689 changes: 689 additions & 0 deletions _modules/meta_package_manager/managers/pip.html

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions _modules/meta_package_manager/managers/pipx.html

Large diffs are not rendered by default.

815 changes: 815 additions & 0 deletions _modules/meta_package_manager/managers/pkg.html

Large diffs are not rendered by default.

638 changes: 638 additions & 0 deletions _modules/meta_package_manager/managers/scoop.html

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions _modules/meta_package_manager/managers/snap.html

Large diffs are not rendered by default.

439 changes: 439 additions & 0 deletions _modules/meta_package_manager/managers/steamcmd.html

Large diffs are not rendered by default.

559 changes: 559 additions & 0 deletions _modules/meta_package_manager/managers/uv.html

Large diffs are not rendered by default.

445 changes: 445 additions & 0 deletions _modules/meta_package_manager/managers/vscode.html

Large diffs are not rendered by default.

713 changes: 713 additions & 0 deletions _modules/meta_package_manager/managers/winget.html

Large diffs are not rendered by default.

734 changes: 734 additions & 0 deletions _modules/meta_package_manager/managers/yarn.html

Large diffs are not rendered by default.

673 changes: 673 additions & 0 deletions _modules/meta_package_manager/managers/zypper.html

Large diffs are not rendered by default.

862 changes: 862 additions & 0 deletions _modules/meta_package_manager/output.html

Large diffs are not rendered by default.

641 changes: 641 additions & 0 deletions _modules/meta_package_manager/pool.html

Large diffs are not rendered by default.

787 changes: 787 additions & 0 deletions _modules/meta_package_manager/sbom.html

Large diffs are not rendered by default.

776 changes: 776 additions & 0 deletions _modules/meta_package_manager/specifier.html

Large diffs are not rendered by default.

680 changes: 680 additions & 0 deletions _modules/meta_package_manager/version.html

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions _sources/bar-plugin.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Xbar and SwiftBar plugin

The Meta Package Manager project is actively maintaining a plugin that is both compatible with
[Xbar](https://github.com/matryer/xbar) and [SwiftBar](https://github.com/swiftbar/SwiftBar).

The plugin is written in Python and is a small wrapper around the `mpm` CLI.

```{hint}
I recommend SwiftBar, because Xbar has 2 outstanding issues:
- [`=` not allowed in variables defaults](https://github.com/matryer/xbar/issues/832)
- [Shell parameters over-escaping](https://github.com/matryer/xbar/issues/831)
```

## Configuration

The plugin is configurable with these environment variables:

| Variable name | Description | Type | Defaults | SwiftBar support | Xbar support |
| --------------------- | ----------------------------------------------------------------------------------------- | ------- | -------------------- | :--------------: | :------------------------------------------------: |
| `VAR_SUBMENU_LAYOUT` | Group packages into a sub-menu for each manager. | Boolean | `False` | ✅ | ✅ |
| `VAR_TABLE_RENDERING` | Aligns package names and versions in a table for easier visual parsing. | Boolean | `True` | ✅ | ✅ |
| `VAR_DEFAULT_FONT` | Default font to use for non-monospaced text. | String | Empty | ✅ | [❌\*](https://github.com/matryer/xbar/issues/832) |
| `VAR_MONOSPACE_FONT` | Default configuration for monospace fonts, including errors. Is used for table rendering. | String | `font=Menlo size=12` | ✅ | [❌\*](https://github.com/matryer/xbar/issues/832) |

## Screenshots

### SwiftBar

````{grid} 1 2 3 4
```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_SUBMENU_LAYOUT = False</code></span><br/><span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_TABLE_RENDERING = False</code></span>
:img-top: assets/swiftbar-flatmenu-standard-rendering.png
:link: assets/swiftbar-flatmenu-standard-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_SUBMENU_LAYOUT = False</code></span><br/><span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_TABLE_RENDERING = True</code></span></br>(default)
:img-top: assets/swiftbar-flatmenu-table-rendering.png
:link: assets/swiftbar-flatmenu-table-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_SUBMENU_LAYOUT = True</code></span><br/><span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_TABLE_RENDERING = True</code></span>
:img-top: assets/swiftbar-submenu-table-rendering.png
:link: assets/swiftbar-submenu-table-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_SUBMENU_LAYOUT = True</code></span><br/><span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_TABLE_RENDERING = False</code></span>
:img-top: assets/swiftbar-submenu-strandard-rendering.png
:link: assets/swiftbar-submenu-strandard-rendering.png
```
````

### Xbar

````{grid} 1 2 3 4
```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_SUBMENU_LAYOUT = False</code></span><br/><span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_TABLE_RENDERING = False</code></span>
:img-top: assets/xbar-flatmenu-standard-rendering.png
:link: assets/xbar-flatmenu-standard-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_SUBMENU_LAYOUT = False</code></span><br/><span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_TABLE_RENDERING = True</code></span></br>(default)
:img-top: assets/xbar-flatmenu-table-rendering.png
:link: assets/xbar-flatmenu-table-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_SUBMENU_LAYOUT = True</code></span><br/><span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_TABLE_RENDERING = True</code></span>
:img-top: assets/xbar-submenu-table-rendering.png
:link: assets/xbar-submenu-table-rendering.png
```

```{grid-item-card} <span class="sd-sphinx-override sd-badge sd-bg-success sd-bg-text-success"><code>VAR_SUBMENU_LAYOUT = True</code></span><br/><span class="sd-sphinx-override sd-badge sd-outline-success sd-text-success"><code>VAR_TABLE_RENDERING = False</code></span>
:img-top: assets/xbar-submenu-strandard-rendering.png
:link: assets/xbar-submenu-strandard-rendering.png
```
````

## Location

A copy of the latest stable version of the plugin is
[available on Xbar website](https://xbarapp.com/docs/plugins/Dev/meta_package_manager.7h.py.html)
and
[plugin repository](https://github.com/matryer/xbar-plugins/blob/master/Dev/meta_package_manager.7h.py).

Once `mpm` is installed on your system, it can dynamiccaly be located with the dedicated `--xbar-plugin-path` option:

```shell-session
$ mpm --bar-plugin-path
~/Library/Python/3.10/lib/python/site-packages/meta_package_manager/bar_plugin.py
```

This option is handy for deployment and initial configuration of Xbar/SwiftBar. I personally
[use this in my dotfiles](https://github.com/kdeldycke/dotfiles/blob/c04296d29e5f5ce48687f79554b265b3e89d5dbb/install.sh#L230) to symlink the plugin to its latest version:

```shell-session
$ ln -sf "$(mpm --bar-plugin-path)" "${HOME}/Library/Application Support/xbar/plugins/mpm.7h.py"
```

## Python `>=3.8` required

Xbar plugins are self-contained scripts. As such, it needs to be able to run without any extra
dependency, on the pre-installed Python distribution that ships with macOS.

With Python 3.7 being EOL and not receiving any security updates as of 2023-06-27, the plugin **requires Python 3.8 or newer**.

For reference:

- Xbar itself
[requires macOS Catalina or newer (>= 10.15)](https://github.com/matryer/xbar/blame/2d063e0e46a0e427aedef62dc047b0065602cd40/README.md#L9)
- Python 2.x is [deprecated since macOS Catalina (10.15)](https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes) and has been [removed in macOS Monterey 12.3](https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes#Python)
- It looks like since Monterey (macOS), there is no default Python version installed anymore, and the `python` CLI is a stub that points to the App Store to install Xcode:
```shell-session
$ python3 --version
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
```

## Development workflow

Active development of the plugin is happening here, as a side-project of
{command}`mpm` itself.

Releases of the plugin is synchronized with the package. Both share the exact
same version to simplify management. This explain why the plugin could appears
jumping ahead a couple of major/minor versions while providing tiny or no
changes at all.

A release is ready when both the package and the plugin reach a stable state.

If the plugin has been changed between releases, a
[copy of the plugin is pushed](https://github.com/matryer/xbar-plugins/pulls?q=is%3Apr%20%22Meta%20Package%20Manager%22)
under the name `meta_package_manager.7h.py`, to the
[official Xbar plugin repository](https://github.com/matryer/xbar-plugins/blob/master/Dev/meta_package_manager.7h.py).

## Release process

1. [Fork](https://help.github.com/articles/fork-a-repo/) the official
[Xbar plugin repository](https://github.com/matryer/xbar-plugins).

1. Fetch a local copy of the fork:

```shell-session
$ git clone https://github.com/kdeldycke/xbar-plugins
$ cd xbar-plugins
```

1. Create a new branch and switch to it:

```shell-session
$ git branch "meta-package-manager-v4.13.1"
$ git checkout "meta-package-manager-v4.13.1"
```

1. Replace existing copy of the plugin with the latest tagged version:

```shell-session
$ wget https://raw.githubusercontent.com/kdeldycke/meta-package-manager/v4.13.1/meta_package_manager/bar_plugin.py
$ mv ./bar_plugin.py ./Dev/meta_package_manager.7h.py
$ chmod 755 ./Dev/meta_package_manager.7h.py
```

1. Commit the new plugin:

```shell-session
$ git add ./Dev/meta_package_manager.7h.py
$ git commit -m "Upgrade to Meta Package Manager plugin v4.13.1"
```

1. Push new branch:

```shell-session
$ git push --set-upstream origin "meta-package-manager-v4.13.1"
```

1. [Create a pull-request](https://help.github.com/articles/creating-a-pull-request/)
in the original repository.
Loading

0 comments on commit 603ccc0

Please sign in to comment.