A DankMaterialShell bar widget for the CodexBar Linux desktop app. This is a community project, not maintained by CodexBar.
The pill shows each displayed provider's logo, tinted to the warning color when that
provider's quota runs low, for every configured provider (turn off Icons only to
add the quota text, limited by barProviders); the popout lists every provider's
windows, reset times and local spending, and opens the Usage & Spend and Settings
windows. One codexbar-linux process owns provider polling, settings,
notifications and spending scans, including when several bars show the widget.
You need a CodexBar Linux CLI and either a CodexBar checkout with the Linux desktop
app built or an extracted CodexBarDesktop release archive; see the CodexBar
Linux installation guide.
Then run:
git clone https://github.com/quantmind-br/codexbar-dms
python3 codexbar-dms/install.py --codexbar /path/to/CodexBarDesktop --cli /absolute/path/to/codexbar--cli may be omitted when CodexBar already knows its CLI or codexbar is on
PATH. --binary, --provider and --no-autostart are passed to the CodexBar
Linux installer.
The installer runs the CodexBar Linux installer (launcher, autostart, linux.json),
turns off the standalone tray to avoid a duplicate indicator, and copies the plugin
and the CodexBar provider SVG logos to ~/.config/DankMaterialShell/plugins/codexBar.
An existing copy is archived under ~/.config/DankMaterialShell/backups. Enable
CodexBar in DMS Settings → Plugins and add it to a bar. Rerun it after upgrading
CodexBar to pick up new provider logos.
The widget reads the backend's private IPC snapshot (codexbar-linux --snapshot)
every five seconds; it never runs provider queries itself. When the backend is
absent it starts codexbar-linux --background, at most once a minute, because not
every compositor runs XDG autostart entries. Left click opens the popout, right
click requests one shared backend refresh. Unknown quota stays unavailable, old
data carries a ! stale marker, and a lane under the notification threshold turns
the marks to the theme's warning color. The popout stays within 80% of the screen
height: its provider list scrolls, keeping spending and the window buttons visible.
The plugin settings hold only the backend executable (default codexbar-linux),
whether to start it, icons only (default on), and the snapshot interval. Providers
and their order, accounts, refresh interval, notifications and bar detail
(showBarDetail, showScopedCaps, barProviders) are the backend's; change them
in the CodexBar Settings window or with codexbar-linux --configure '<json>'.
Remove ~/.config/DankMaterialShell/plugins/codexBar and its bar entry. The desktop
app and its autostart are independent; see the CodexBar Linux README for their
uninstall instructions.
The tests run the real CodexBar Linux installer against a temporary home:
CODEXBAR=/path/to/CodexBar python3 test_install.pyMIT. Provider logos are copied at install time from CodexBar, which is MIT licensed.
