Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

358.6. plasmoid-kdos-privacy-1.0.0

Privacy lamps for the system tray: microphone, camera and screen, naming the program and its box

Version 1.0.0, release 1
Source tree src/desktop/plasmoid-kdos-privacy/
Phase 50_desktop (Desktop), 59 of 92 in build order
Licence MIT
Homepage https://github.com/kunaldawn/kdos
Build time 0.1 SBU
Installed size 350.8 KiB in 1 file
Recipe src/desktop/plasmoid-kdos-privacy/kpkgbuild

About

plasmoid-kdos-privacy is the Privacy Lamps applet, org.kdos.privacy, a compiled Plasma applet in the system tray that tells you when something is listening or watching. It shows three lamps, microphone, camera and screen, each only while something is capturing it, and names what is: “Firefox in box www”.

What is capturing comes from kdos privacy --watch --json, which kdos-tools provides: one line of JSON at once and another each time a capture starts, stops or is muted. The helper reads

The applet does not poll: it keeps the helper running and starts it again when it exits, waiting longer each time it fails quickly. Muting and stopping run kdos privacy mute|unmute|stop <id> for a capture the helper listed, and offer only what the helper says can be done to it.

Why it is in KDOS

The comment above it in script/phases/50_desktop/packages.txt:

Microphone, camera and screen lamps in the tray, naming the program and its box.

Sources

None: the port builds from its own directory, /kdos/src/desktop/plasmoid-kdos-privacy.

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kcoreaddons, ki18n, kirigami, libplasma, plasma-workspace, kdos-tools.

Required by (1): kde-plasma.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/50_desktop/phase.env && kpkg install plasmoid-kdos-privacy'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /kdos/src/desktop/plasmoid-kdos-privacy.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/plasmoid-kdos-privacy
SRC=$SRC_ROOT/plasmoid-kdos-privacy-1.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -S "$PORT_SRC" -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/plasmoid-kdos-privacy, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf plasmoid-kdos-privacy-1.0.0-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/plasmoid-kdos-privacy, and runs the triggers its paths call for.

Other files in the port directory, read by build.sh: CMakeLists.txt, metadata.json, qml/, src/, tests/.

Notes

The applet is EnabledByDefault with a notification-area category, which is what puts it in every tray without a layout naming it. Plasma’s own microphone indicator, plasma-pa’s status item plasmashell_microphone, and its camera indicator applet, org.kde.plasma.cameraindicator, name the program but never its box, so each KDOS desk’s tray configuration (the layout.js of the desks in kdos-plasma-look) hides both and only these lamps light.

An id from the helper goes back to it as one argument of its own. One that starts with - would be read as an option, so such an entry is dropped rather than shown with a button that cannot work. A line of a version the applet does not know is ignored: a helper whose fields change meaning leaves the lamps dark rather than wrong. When the helper exits 2, the kdos installed has no privacy command; the tooltip says so and the applet does not start it again.