mirror of
https://github.com/RustyRaptor/deckrotate.git
synced 2026-12-03 15:55:20 -07:00
Go daemon reads the controller's accelerometer from hidraw (re-enabling the IMU that Steam switches off), debounces it into an orientation and rotates eDP-1 through kscreen-doctor in auto mode, or offers a layer-shell tap-to-rotate button in manual mode, with a persistent lock. Includes a D-Bus service, a CLI for global shortcuts (kglobalaccel service file), a Plasma system tray applet, a systemd user unit and hardware notes from probing the Deck OLED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
705 B
Bash
Executable File
21 lines
705 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs the plasmoid's DBusBackend against the real Go service on a private bus.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [[ -z "${DECKROTATE_IN_PRIVATE_BUS:-}" ]]; then
|
|
exec env DECKROTATE_IN_PRIVATE_BUS=1 dbus-run-session -- "$0" "$@"
|
|
fi
|
|
|
|
bin=$(mktemp -d)
|
|
trap 'kill "${svc:-}" 2>/dev/null || true; rm -rf "$bin"' EXIT
|
|
go build -o "$bin/testservice" ./internal/service/testservice
|
|
|
|
coproc SVC { exec "$bin/testservice"; }
|
|
svc=$SVC_PID
|
|
read -r -t 10 line <&"${SVC[0]}"
|
|
[[ "$line" == ready ]] || { echo "testservice did not start" >&2; exit 1; }
|
|
|
|
QT_QPA_PLATFORM=offscreen /usr/lib/qt6/bin/qmltestrunner -input plasmoid/itests 2>&1 | grep -v Fontconfig
|
|
exit "${PIPESTATUS[0]}"
|