- Rust 65.5%
- QML 17.8%
- TypeScript 8.3%
- Shell 5.1%
- JavaScript 3.1%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Minor: ZeroTier is a new VPN the panel drives on every desktop and in the TUI, behind a backend interface every provider now shares. The rest are fixes: one hung VPN no longer freezes the panel, GNOME network rows act on what they show, Plasma draws names as plain text, and the NetBird mark draws cleanly on Qt 6.6. The GNOME extension's integer version goes to 24. It is what EGO orders uploads by, and no version-string search can find it. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .cargo | ||
| .claude/skills | ||
| .github/workflows | ||
| brain | ||
| crates | ||
| gnome/[email protected] | ||
| omarchy/arzaroth.tailgauge | ||
| packaging | ||
| plasma/org.tailgauge.plasmoid | ||
| scripts | ||
| systemd | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| icon.svg | ||
| LICENSE | ||
| LICENSE-MIT | ||
| LICENSE-WTFPL | ||
| NOTICE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.gnome.json | ||
TailGauge
Tailscale in your KDE Plasma 6, GNOME Shell and Omarchy panel: connection state, on/off, account switching, exit nodes including Mullvad regions, machine browsing with copy actions, and Taildrop file sending.
It started as a port of the first-party omarchy.tailscale panel plugin that ships with Omarchy 4 (Quattro), moved off Hyprland/Quickshell onto the two big desktops. The Omarchy widget then came back: the same panel, rebuilt on this repository's shared model, for the shell it came from. The code has since been rewritten in Rust; NOTICE records the lineage.
There is no daemon and no service to run. All three frontends ask one binary, tailgauge, which drives the VPN CLI (Tailscale, NetBird or ZeroTier) and decides the whole panel.
Features
- Panel indicator: the mark of the VPN that is up, drawn natively (Tailscale's 3×3 dot grid, NetBird's bird or ZeroTier's ringed T), slashed when disconnected, badged when the device needs authorization. With several up it shows the one that connected first and a raised count. Optionally followed by the machine name.
- On/off: a switch at the top of the panel. The UI flips optimistically the instant you click, then reconciles with the next
tailscale status. - Login: when the device needs authorizing, the auth URL is scraped out of
tailscale upas it prints and opened in your browser. - This device: your own machine at the top of the panel, with the same copy actions its peers get, because copying your own tailnet address is what you came for half the time.
- Connections: switch between Tailscale profiles when more than one is signed in. Offers to
pkexec tailscale set --operator=$USERwhen the daemon refuses profile access. - Networks: on NetBird and ZeroTier, join or leave each network from its row.
- ZeroTier: the switch leaves every network you have joined and joins them back, since ZeroTier has no connection of its own to turn off. TailGauge remembers your networks in
$XDG_STATE_HOME/tailgauge/networks-zerotier.json(~/.local/state/tailgauge/networks-zerotier.jsonwhenXDG_STATE_HOMEis unset) (ZeroTier forgets one once it is left); one you leave from its row stays listed, switch on or off, and stays left when the switch comes back on. A network behind SSO is the row that opens its login page. Join a new one withtailgauge ctl --provider zerotier select-network <network id>. Machines are listed by ZeroTier address, as peer names live on the controller.zerotier-clineeds the service's token: until it has it, the panel says ZeroTier needs your permission and offers to copy the token to~/.zeroTierOneAuthTokenwithpkexec. - Exit nodes: every tailnet exit node, plus a shortlist of the Mullvad regions you actually use, plus a searchable picker for the full Mullvad fleet.
- Machines: every peer with its IP and MagicDNS name, copy actions for name / DNS name / IPv4 / IPv6, and a Taildrop send button where the tailnet allows file sharing. Offline machines sort to the bottom and say so, because a sleeping laptop's address is exactly what you need to wake it. Past eight machines the section grows a search field, over the name, the addresses and the OS.
- Taildrop receive: a systemd user service parks on
tailscale file get --wait, delivers into~/Downloads, and announces each file with a notification you can click to open. - Keyboard:
ttoggle,rrefresh, and on any row that offers themccopy IP,ncopy name,dcopy DNS name,ssend files. Arrows and Enter work as they do natively on each desktop.
Requirements
tailscale,netbirdorzerotier-clionPATH- KDE Plasma 6.0+, GNOME Shell 45+, or Omarchy 4 (Quattro)
zenityorkdialogfor the Taildrop file chooserwl-clipboard,xclip, orxselfor the copy actions- Taildrop enabled for the tailnet, to send files
Install
curl -fsSL https://raw.githubusercontent.com/Arzaroth/TailGauge/master/scripts/install.sh | bash
That installs the latest release: it downloads the archive for your architecture, checks it against the release's SHA256SUMS, and installs the binary into ~/.local/bin with the widget for the running desktop. Options go after bash -s --:
curl -fsSL https://raw.githubusercontent.com/Arzaroth/TailGauge/master/scripts/install.sh | bash -s -- --omarchy --placement=left
Pass --plasma, --gnome or --omarchy to force a desktop, --no-frontend for the binary alone, --no-taildrop to skip the receive service, and --version vX.Y.Z to pin a release (0.7.0 or later). From a clone, the same script builds the checkout instead:
git clone https://github.com/Arzaroth/TailGauge
cd TailGauge
scripts/install.sh
Packages
Each release has a .deb, an .rpm and an Arch package for x86_64 and aarch64. They install the binary and its aliases into /usr/bin, the Plasma widget and the GNOME extension system-wide, and the Taildrop unit, which is yours to enable:
| Distribution | Install |
|---|---|
| Debian, Ubuntu | sudo apt install ./tailgauge_X.Y.Z_amd64.deb |
| Fedora, RHEL, openSUSE | sudo dnf install ./tailgauge-X.Y.Z-1.x86_64.rpm (sudo zypper install on openSUSE) |
| Arch | sudo pacman -U ./tailgauge-bin-X.Y.Z-1-x86_64.pkg.tar.zst, or makepkg -si from the PKGBUILDs in tailgauge-vX.Y.Z-pkgbuild.tar.gz (tailgauge builds from source, tailgauge-bin repackages the release) |
systemctl --user enable --now tailgauge-receive.service
The .rpms, the Arch packages (a .sig beside each) and SHA256SUMS (in SHA256SUMS.asc) are signed with the release key packaging/tailgauge.asc, fingerprint 6342F5C2E27356FE3462208259F1EE16E8417BB6. Trust it once:
curl -fsSL https://raw.githubusercontent.com/Arzaroth/TailGauge/master/packaging/tailgauge.asc -o tailgauge.asc
gpg --import tailgauge.asc && gpg --verify SHA256SUMS.asc SHA256SUMS # any distribution
sudo rpm --import tailgauge.asc # Fedora, openSUSE
sudo pacman-key --add tailgauge.asc && sudo pacman-key --lsign-key 6342F5C2E27356FE3462208259F1EE16E8417BB6 # Arch
The binary is static, so the packages run on anything from Debian 12 and Ubuntu 22.04 up. Omarchy only loads third-party widgets from ~/.config/omarchy/plugins/, so no package can install one: run tailgauge --install-frontend omarchy and omarchy-plugin-enable arzaroth.tailgauge once, and tailgauge --install-frontend omarchy again after each package upgrade, since --update stops at the package manager before it would report the widget behind. A packaged binary upgrades through its package manager: --update refuses it, and the panel's banner says so instead of offering to install.
Moving from an install.sh install to a package, remove ~/.local/bin/tailgauge* and the per-user widgets first: Plasma and GNOME put ~/.local/bin ahead of /usr/bin on the PATH they run tailgauge from, and the desktops load a per-user widget over the system one.
Plasma: adds the widget to your library. Add it from Add Widgets. QML changes need the shell reloaded, and the unit name depends on how the session started it:
systemctl --user restart "$(systemctl --user list-units --no-legend 'app-plasmashell@*.service' | awk '{print $1}' | head -1)"
GNOME: installs the extension, then enable it:
gnome-extensions enable [email protected]
On Xorg, restart the shell with Alt+F2 r. On Wayland, log out and back in.
Omarchy: installs the widget into ~/.config/omarchy/plugins/ and enables it in the bar. Pass --placement=left|center|right to choose a section. Omarchy's own omarchy.tailscale covers the same ground, so drop it with omarchy plugin disable omarchy.tailscale. QML changes need omarchy-restart-shell. See omarchy/arzaroth.tailgauge.
Outside the panel
The Plasma and GNOME panels have no IPC and need none: they block on tailgauge watch, which listens on tailscaled's IPN bus and polls any other VPN it finds, so a change shows up in them within a second or two, whoever made it. tailgauge ctl drives the daemon from a key binding or a script, and the Omarchy widget additionally answers to omarchy-shell arzaroth.tailgauge toggleTailscale the way its first-party neighbours do.
tailgauge # the connection and the machines, at a glance
tailgauge ctl status # exits 0 connected, 3 not
tailgauge ctl toggle # off if it is on, on if it is off
tailgauge ctl up # opens the login page when it needs one
tailgauge ctl down
tailgauge ctl exit-node # print the current one
tailgauge ctl exit-node de-ber-wg-001.mullvad.ts.net
tailgauge ctl exit-node off
tailgauge ctl exit-nodes # what this tailnet offers
tailgauge ctl version # which version is installed
Everything TailGauge shells out to is one binary with a subcommand per job -
ctl, watch, notify, send, receive, file-select, copy, tui. Updating is
a flag rather than a subcommand, tailgauge --update. The installer drops a
symlink per subcommand beside the binary, so the older spelling tailgauge-ctl toggle still resolves: the binary reads the name it was invoked as.
Run from a key binding there is no terminal to print on, so up opens the login page itself and a failure arrives as a notification instead.
GNOME: Settings in the panel menu has a Shortcut row. It is empty until you set one, and it toggles the VPN the panel is showing.
Plasma: bind it as a custom command in System Settings > Keyboard > Shortcuts > Add > Command, with tailgauge ctl toggle - ~/.local/bin/tailgauge if that directory is not on the session's PATH. The widget's own popup is bindable without any of this, from Configure Keyboard Shortcuts in its context menu.
Distribution
The three frontends are QML and JavaScript their desktops install; the binary is one file in ~/.local/bin. Each store updates the frontend it carries, and tailgauge --update replaces the binary and refreshes whichever frontends are already installed.
| Channel | Installs | Updates |
|---|---|---|
| store.kde.org | the Plasma widget | Add Widgets shows updates; KNewStuff tracks the version |
| extensions.gnome.org | the GNOME extension | the Extensions app applies them on next session |
| GitHub releases | the Omarchy widget | tailgauge --update; there is no plugin store to go through |
| GitHub releases | everything, the binary included | tailgauge --update |
| Distro package | the binary, the Plasma widget, the GNOME extension, the Taildrop unit | the package manager |
Neither store can install the binary or the systemd unit - the KDE Store ships a kpackage, EGO ships an extension zip. Every frontend asks tailgauge panel for what to draw, so a store-installed widget needs the binary beside it, or it has nothing to show. Install it alone, leaving the store's widget where it is:
curl -fsSL https://raw.githubusercontent.com/Arzaroth/TailGauge/master/scripts/install.sh | bash -s -- --no-frontend
Updating
tailgauge --check-update # is there a newer release? prints the status as JSON
tailgauge --update # install it
tailgauge --install-frontend gnome # after switching desktops; `all` takes the set
--check-update serves a cached answer for six hours, so the panel polling it costs nothing; --force goes out anyway. All three panels show a banner when an update is out, with an Install it now row, or, on a packaged install, a row saying to upgrade it with the package manager.
--update reports each frontend by the version read back off disk, and splits the restart hints into the ones a shell restart covers and the one that needs the session. On the path where nothing was updated it still says whether an installed frontend disagrees with the binary, which is the skew the whole thing exists to catch:
$ tailgauge --update
Current version: 0.11.0
Checking for updates...
Already up to date (0.11.0).
Omarchy bar widget is still v0.4.0 - update it: tailgauge --install-frontend omarchy
It replaces the binary next to itself and reinstalls whichever frontends are already on the machine, from the payloads the same archive carries - so the binary and the QML it feeds cannot end up a release apart. A frontend that fails to install is reported rather than rolled into the binary's failure, and the old copy is moved aside rather than deleted, so a failed replacement leaves the one that was working.
Release assets
Tagging vX.Y.Z publishes:
tailgauge-vX.Y.Z-plasmoid.plasmoid-kpackagetool6 -t Plasma/Applet -i, and the KDE Store uploadtailgauge-vX.Y.Z-gnome-shell-extension.zip-gnome-extensions install, and the EGO uploadtailgauge-vX.Y.Z-omarchy-plugin.tar.gz- unpacks into~/.config/omarchy/plugins/tailgauge-vX.Y.Z-linux-x86_64.tar.gz,-linux-aarch64.tar.gz- the binary, the three frontend payloads underfrontends/, and the systemd unit. This is whatinstall.sh,--updateand--install-frontenddownload.tailgauge_X.Y.Z_amd64.deb,_arm64.deb,tailgauge-X.Y.Z-1.x86_64.rpm,.aarch64.rpm- built byscripts/package.shfrom the archives abovetailgauge-bin-X.Y.Z-1-x86_64.pkg.tar.zst,-aarch64.pkg.tar.zst, andtailgauge-vX.Y.Z-pkgbuild.tar.gzwith both PKGBUILDsSHA256SUMS- the checksum of every asset above, whichinstall.shchecks a download against before running it
A pull request that touches the release, the packaging or the installer runs the whole workflow short of publishing, and every release installs each package on a clean Debian 12, Ubuntu 22.04, Fedora and Arch before it goes out.
The distribution tests in crates/tailgauge/src/project.rs fail the build if those names stop matching what the updater asks for - the asset name is spelled by selvedge's own arch_target(), so the test compares the workflow against the running code rather than against a second copy of the name. The three manifests and Cargo.toml all declare the version, and a tag that disagrees with any of them refuses to publish.
The parity rule
The three frontends do not each decide what to draw, and none of them reads a VPN CLI. One call to the binary probes for the daemons, polls every installed one at once, and returns the whole panel:
tailgauge panel --json --ui '{"activeProviderId":…,"mullvadPickerOpen":…,"phraseIndex":…}'
-> {bar, header, status, sections: [{id, title, visible, empty, rows}], footer, navigation}
It owns which sections exist, in what order, when each is visible, which rows it holds, every label and empty state, which rows are cursor stops, and in what order. A row arrives fully formed - label, sublabel, icon, ornament state, busy state, tooltip, its actions and its copy options - and a frontend decides only which widget draws it. Keyboard traversal is an index into panel.navigation, so neither desktop carries a focus state machine the other could disagree with.
Strings arrive finished. There is no translator: the panel is English, written once, and each desktop keeps only the words its own settings dialog needs.
A frontend does three things the binary cannot. It draws. It filters the machine and region lists as you type, because a keystroke cannot wait on a process - which is why a row carries a pre-lowercased searchKey and the frontend does nothing but test the substring. And it holds the state only it knows, which it hands back on every call: which provider is being shown, what it is optimistically showing after a click, and what it has in flight.
This is enforced, not remembered. The parity tests in crates/tailgauge-core/tests/parity.rs fail the build if a user-visible string is written in two frontends, if any of them re-derives section visibility or the exit-node and copy-option lists, if one builds its own search haystack, or if one names a provider's binary in an argv. They are the rules that outlived the shared model they were written to guard.
Layout
crates/tailgauge-core/ the panel: the provider registry, the parsers, panel_spec
crates/tailgauge/ the binary every frontend shells out to
plasma/ the Plasma 6 plasmoid (QML)
gnome/ the GNOME Shell extension (GJS, TypeScript)
omarchy/ the Omarchy 4 bar widget (Quickshell QML)
systemd/ the Taildrop receive user unit
scripts/build.sh compiles the extension, then assembles build/
scripts/install.sh installs a release (piped) or builds the checkout (in a clone)
scripts/package.sh the .deb and .rpm, from a release archive
scripts/arch.sh the Arch packages
packaging/ nfpm.yaml and the PKGBUILDs
The two crates
tailgauge-core is the panel and nothing else: the table of providers TailGauge knows how to drive, the parsers for what their CLIs print, and panel_spec, which turns a gathered state into the sections every desktop draws. It shells out to nothing and has no opinion about how a row looks.
tailgauge is the binary. It runs the CLIs, assembles the state, calls panel_spec, and answers every other thing a frontend asks for - the connection, the exit node, Taildrop, the clipboard, the update. A symlink per subcommand sits beside it under the name the old shell helper had.
Upgrading from 0.4.0 or earlier
Run tailgauge-update twice. The first run is the old shell script: it
upgrades the widgets and replaces itself with a bootstrap. The second run is
that bootstrap, which installs the binary and removes itself. After that,
updating is tailgauge --update.
The shared crate
Updating the binary and reinstalling the desktop payloads is selvedge, pinned to a tag. TokenGauge drives the same machinery, and it lived in both repositories as two copies of 1,400 lines until it did not.
What stays here is crates/tailgauge/src/project.rs: the binary's name, the
repository its releases come from, and the three frontends it ships. To work on
both at once, copy .cargo/config.toml.example to .cargo/config.toml; it is
gitignored, and Cargo.lock still records the tag.
TypeScript
The GNOME extension is TypeScript, checked under strict, and is the only thing here that needs a Node toolchain. It is typed against @girs/gnome-shell, pinned to the newest shell the extension supports.
gnome/[email protected]/panel.ts declares the JSON the binary sends. The other side of that contract is a Rust struct, so there is nothing to generate it from and it is written out by hand - which makes it the one frontend where the panel's shape is checked rather than assumed.
Edit the .ts sources, never the copies under build/.
Settings
| Setting | Default | What it does |
|---|---|---|
| Refresh interval | 30s | How often the panel is re-read when nothing has signalled a change |
| Show the machine name | off | Plasma and GNOME: puts the machine name next to the panel icon |
| Recent Mullvad regions | - | Shortlist behind the exit node list, cleared from GNOME's preferences |
| Toggle shortcut | none | GNOME only: a global key that turns the shown VPN on and off. Plasma binds tailgauge-ctl toggle in System Settings instead |
Plasma stores these in the widget's own configuration, GNOME in org.gnome.shell.extensions.tailgauge, and Omarchy inline on the widget's entry in ~/.config/omarchy/shell.json.
Differences between the frontends
- The bar icon never toggles a connection. It describes the machine rather than one provider, so a click that turned something off would act on a provider you cannot see and leave the icon lit while the other stayed up. Right click on Omarchy and middle click on Plasma and GNOME cycle which provider the panel is about, and do nothing when only one is installed; middle click on Omarchy refreshes. Right click on Plasma opens the desktop's own context menu, which still carries the toggle and refresh as entries; on GNOME it opens the panel, as a left click does.
- GNOME uses native
PopupMenurows rather than a custom keyboard-driven panel, so arrows, Enter and type-ahead behave the way every other extension does. Machines and the Mullvad picker are submenus; the copy actions live inside a machine's submenu. - Clipboard goes through
tailgauge copyon all three, which pickswl-copy/xclip/xsel, so the copy actions also work in an X11 session. - No IPC on Plasma and GNOME.
tailgauge-ctl togglestands in there, but it drives tailscaled rather than the panel: nothing talks to a running widget. The Omarchy widget has the shell's IPC and uses it. - A machine's copy actions are a popup menu on Plasma and a submenu on GNOME. Both list the same options in the same order, because the binary resolves them once.
Development
How TailGauge works, in depth, is in brain/BRAIN.md; the rules a change can break are in CLAUDE.md.
cargo test # the panel, the parsers, the parity rules, distribution
cargo build --release # the binary
pnpm build # compile the extension and assemble build/
pnpm typecheck # tsc over the extension, emitting nothing
scripts/install.sh # build and install for the running desktop
tests/gnome/shell/run.sh --gnome 45 # the extension's menu in a real GNOME Shell
Almost everything is a cargo test. crates/tailgauge-core/tests/specification.rs says what the panel should do, against captures of what a real daemon said; parity.rs reads the three frontends' sources and fails the build when one of them starts deciding something the panel already decided.
The Node toolchain exists to compile the GNOME extension and nothing else. It is managed with pnpm, pinned by the packageManager field and pnpm-lock.yaml; scripts/build.sh falls back to npm install when pnpm is absent, so installing from a clone needs nothing beyond Node. That fallback is best-effort: npm cannot read pnpm-lock.yaml, so it may compile with a different TypeScript patch than CI did.
The node tests in tests/gnome load panel.js and provider.js, never extension.js, so only a real shell shows how the menu is drawn. tests/gnome/shell/run.sh runs the built extension in a headless GNOME Shell under podman or docker, screenshots the menu, and fails when it throws, runs off the monitor, or its scroll view is drawn empty or cannot reach its last row. --gnome 45 or later picks the shell, and GNOME 45 is the one that differs: its St.ScrollView is an St.Bin. It is local and opt-in, not part of CI, since it pulls a Fedora image.
CI runs cargo fmt, clippy -D warnings and cargo test on x86_64 and aarch64, qmllint for QML syntax on both QML frontends, tsc and node --check on the extension, and a check that the three manifests and Cargo.toml declare the same version. Tagging vX.Y.Z builds and publishes the plasmoid package, the GNOME extension zip, the Omarchy plugin tarball and a binary archive per architecture.
Plasma logs QML errors under the plasmashell identifier rather than a unit, because it usually runs as a transient app-plasmashell@<hash>.service:
journalctl --user --identifier=plasmashell -f
console.log from a plasmoid maps to qDebug and is filtered out by default. Use console.warn when adding a temporary probe, or nothing reaches the journal.
GNOME logs extension errors to:
journalctl --user -u org.gnome.Shell@wayland -f
Omarchy's shell logs its own QML errors, and a plugin that fails to load says so there:
qs log --pid "$(pgrep -f 'quickshell -n -p /usr/share/omarchy/shell')" -t 50
Linting QML needs qmllint from the Qt 6 declarative dev package (qt6-qtdeclarative-devel on Fedora, qt6-declarative on Arch).
License
Dual-licensed: use it under either the MIT License or
the WTFPL, whichever you prefer
(SPDX-License-Identifier: MIT OR WTFPL).
Portions derived from Omarchy stay under its MIT licence. NOTICE records that lineage and the attribution it carries.