hammunition-tray-qt¶
Tray switches for parking and waking radio devices on Xfce, LXQt, LXDE, MATE and Cinnamon — the Hammunition family's own
- Version recorded: 0.5.0
- Categories:
device-support - Upstream: https://github.com/Renegade-Penguin/hammunition-tray
- Needs first:
python3-pyqt6,pkexec - Desktops: Xfce, LXQt, LXDE, MATE, Cinnamon only — read from the session files at plan time; deferred from a profile on a machine with none of them, refused by name (see desktops); elsewhere,
hammunition-tray
What it does¶
A system-tray icon with a menu entry for each catalogued device Hammunition can park that is plugged in -- a GPS receiver, a cellular modem, a Bluetooth controller or a camera. Choosing a device's entry detaches it so the kernel drops it and its port can suspend, or brings it back. A device kept off across reboots reads "kept off", and one that is unplugged while kept offers Forget. The icon is the same penguin with a handheld radio as the Plasma applet's, and it goes grey while anything is parked. A Time section (D-058, needs Hammunition 0.18.0 or later) shows what the clock follows and lets you choose one of the four GPS-time modes. The same menu has the Controls panel's Services group (the GPS daemon, the clock, the GPS tether, the rig service) and Radios group (mobile broadband, Wi-Fi, Bluetooth).
Why you would want it¶
The Plasma applet's switch on a lighter desktop: parking a GPS or a modem you are not using saves battery on a field laptop, in one click and one password prompt. It is a front end for hammunition hardware park and wake (D-056), sharing the applet's rules and texts, so it does exactly what those do and nothing else.
Before it will work¶
Xfce, LXQt, LXDE, MATE or Cinnamon, with a panel that has a system tray (Xfce's Status Tray plugin, LXQt's Status Notifier, lxpanel's system tray). A polkit authentication agent must be running for the password prompt; the tray says so, and names the package, when none is. This unit installs the device helper and the polkit action the menu calls (from the same release archive, D-056); the device and service lists it reads are written by hammunition hardware apply, which also hands over to this helper rather than writing its own. The helper runs as root through the engine's own Python, so the engine's virtualenv must not be writable by any account but its owner: the install asks one yes that --yes cannot answer when it belongs to one account, and refuses when any account can write it.
How it installs¶
- prebuilt tarball from https://github.com/Renegade-Penguin/hammunition-tray/archive/refs/tags/v0.5.0.tar.gz
- Spreads the tray over /usr/share/hammunition-tray-qt, /usr/local/bin, /usr/share/applications, /etc/xdg/autostart (not shown in Plasma) and /usr/share/icons/hicolor (each file printed in the plan), and installs the device helper the menu calls, through /usr/bin/pkexec: the code under /usr/local/lib/hammunition-devctl, the wrapper at /usr/local/libexec/hammunition-devctl and the polkit action (the plan names the interpreter the wrapper runs as root, and says when another installer's helper is already there and is left alone). It runs nothing as root itself.
Known problems¶
Not yet run on any of the desktops it lists; the Xubuntu and Lubuntu VM checklist in docs/reference/vm-campaign-desktops.md is that check. Where the desktop has no system tray (GNOME without the AppIndicator extension) it prints one line and exits rather than showing nothing forever. It starts at the next login after installing; start it now from the application menu entry Hammunition Devices or by running hammunition-tray-qt. Left click opening the menu is unmeasured on Wayland; right click is the menu everywhere.
Keeping it current¶
- probe: github release (
Renegade-Penguin/hammunition-tray) - strategy: reinstall
- Released together with hammunition-tray: one tag, both .debs and one SHA256SUMS. A release is a new digest for each; re-pin both units. The v0.5.0 release's .deb assets were not published when this was pinned, so the pin is the tag's own source archive.
Where to get help with the software itself¶
Issues on the GitHub repository. For "the menu does nothing", run hammunition hardware state first: the tray shows what that command reports.