Commit Graph
2 Commits
Author SHA1 Message Date
brad f95853dc25 Add GPL-3.0 licensing and prepare for a public repository
metadata.json claimed MIT while no LICENSE file existed, so the repository
had no effective licence at all. It is now GPL-3.0-or-later: the full FSF
text in LICENSE, the identifier in metadata.json, and REUSE-style
SPDX-FileCopyrightText and SPDX-License-Identifier headers on all 33 source
files, which is the convention KDE itself uses.

Worth recording that GPL-3.0 is a preference here rather than an obligation.
Nothing in the dependency graph forces it: linkctl is MIT and is invoked as a
subprocess rather than linked, and the KDE QML modules the applet imports are
LGPL.

Removed two things that should not ship in a public repository. tests's QML
linter had an absolute sandbox path, /tmp/pyside/PySide6/qmllint, baked into
its search list; it now looks for Qt's qmllint and PySide6's pyside6-qmllint
on PATH and honours a QMLLINT override, and says how to install one when it
finds nothing. The systemd unit carried a Documentation= URL pointing at a
host that does not exist, and its ExecStart silently assumed a particular
checkout directory; the URL is gone and the path is now an obvious
PATH/TO/CHECKOUT placeholder next to the comment telling you to edit it.

Added a Credits section naming the work this is built on, since the project
is mostly glue: linkctl does the camera control, schlarpc's firmware teardown
documents the extension-unit protocol, and vrwallace's controller established
that the Link 2 needs both pan and tilt axes in a single VIDIOC_S_EXT_CTRLS
call, which is the detail the whole thing depends on.

Also made the two Python tests executable, matching the other scripts.

Audited for operator-specific detail: no credentials, tokens, private
hostnames, IP addresses or absolute home paths in any tracked file or
anywhere in the history's diffs. Three merge commits do carry Reviewed-on and
Reviewed-by trailers naming a private forge, added by the forge at merge
time; those are commit metadata rather than file content and are handled
separately.

Tested: 169 checks across seven suites plus the QML linter, all passing after
the header insertion, which confirms it did not disturb the order-sensitive
`.pragma library` line in logic.js or the qmldir module definitions.
shellcheck clean.
2026-10-13 20:54:23 -07:00
brad f7e42f7132 Add OBS and KDE hotkey integration for linkctl
Wraps linkctl so the Insta360 Link 2's AI tracking and gimbal presets are
reachable from a keypress and from OBS, instead of a terminal.

bin/linkctl-macro resolves the linkctl binary itself, because a desktop
shortcut is launched with a far sparser PATH than an interactive shell and
would otherwise just fail silently. It defaults to --force on the grounds
that a deliberate keypress means "act now" even when nothing holds the
camera open, which is precisely the state the Link parks itself in. Results
go to a desktop notification, since tracking state and gimbal position are
invisible otherwise, and linkctl's documented exit codes are mapped to
actionable text.

kde/install-shortcuts.sh registers Plasma global shortcuts via .desktop
entries plus kglobalshortcutsrc. These work under Wayland, where OBS's own
hotkeys only fire while OBS has focus. It writes with the shortcut daemon
stopped, because the daemon rewrites that file on exit and would discard the
entries. Supports --dry-run, --list and --uninstall.

obs/obs-linkctl.lua adds OBS hotkeys, test buttons, and scene-to-action
mapping, so switching scenes can set the camera state unattended. Its
startup action defaults to loading the home preset, which undoes the
gimbal's idle parking when OBS launches. Commands are backgrounded so the
OBS UI thread never waits on the camera, and identical commands within
250ms are collapsed to absorb the repeated events studio mode emits.

Tested: 22 offline Lua checks over shell quoting, action tokenizing, scene
map parsing and command construction; the wrapper exercised against a stub
linkctl for every documented exit code; the KDE installer dry-run, install,
list and uninstall paths run against stubbed Plasma tools in a throwaway
HOME. shellcheck clean. Not yet run against a live camera or a real Plasma
session.
2026-10-07 09:46:15 -07:00