Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#!/bin/bash# ac-blink — Flash the Docker host screen red then green# Usage: ac-blink # red→green (default)# ac-blink green # just green# ac-blink red # just red# ac-blink red green # red then greenDOCKER_HOST_IP="${AC_HOST_IP:-172.17.0.1}"SSH_USER="${AC_HOST_USER:-me}"COLORS="${*:-red green}"# Python script that creates a fullscreen colored overlay, brieflyPYSCRIPT='import tkinter as tkimport sys, timecolors = sys.argv[1:]if not colors: colors = ["red", "green"]root = tk.Tk()root.attributes("-fullscreen", True)root.attributes("-topmost", True)root.configure(cursor="none")root.overrideredirect(True)# Map color names to hexcmap = { "red": "#ff2222", "green": "#22ff22", "blue": "#2222ff", "white": "#ffffff", "yellow": "#ffff22", "orange": "#ff8800", "purple": "#aa22ff",}for i, c in enumerate(colors): hex_c = cmap.get(c, c) delay_ms = i * 200 root.after(delay_ms, lambda hc=hex_c: root.configure(bg=hc))root.after(len(colors) * 200, root.destroy)root.mainloop()'ESCAPED_PY=$(printf '%s' "${PYSCRIPT}" | sed "s/'/'\\\\''/g")ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o LogLevel=ERROR \ "${SSH_USER}@${DOCKER_HOST_IP}" \ "DISPLAY=:0 python3 -c '${ESCAPED_PY}' ${COLORS} 2>/dev/null" &exit 0