From 01c8c116ddbf2891a3d99996ebc469d5ffe2f021 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 1 May 2022 09:22:48 -0500 Subject: [PATCH] xinit: Trigger hudctrl at boot The *hudctrl* service remotely controls Firefox on the Basement HUD machine. It uses Firefox Marionette over TCP, and is itself controlled by an HTTP API. When the HUD machine starts up, it sends its monitor configuration to *hudctrl* and tells it the display is ready to be controlled remotely. For now, *hudctrl* is hosed on Rosalina. I will eventually move it to the new metrics server, once it's built. --- overlay/home/user/.xinitrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/overlay/home/user/.xinitrc b/overlay/home/user/.xinitrc index c944550..e410527 100644 --- a/overlay/home/user/.xinitrc +++ b/overlay/home/user/.xinitrc @@ -8,4 +8,13 @@ export TZ systemctl --user import-environment DISPLAY TZ systemctl --user start firefox-marionette.socket firefox + +BASE_URL=http://rosalina.pyrocufflink.blue:8000 +xrandr --listactivemonitors \ + | curl "${BASE_URL}"/display/monitors \ + -H 'Content-Type: text/plain' \ + --upload-file - +curl "${BASE_URL}"/display/up \ + -d port=2829 + exec openbox