aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-06 08:34:47 +1300
committerArslaan Pathan <[email protected]>2026-10-06 08:34:47 +1300
commitc03f2c4d645a1b36e4038cec933ded31546729af (patch)
treec83d90387bb0f49ae01b452d2a95d21b78903db1 /main.py
parentbbab545a8475d711a486afb0d47c561efb4434c3 (diff)
downloadremote-automation-c03f2c4d645a1b36e4038cec933ded31546729af.tar.xz
remote-automation-c03f2c4d645a1b36e4038cec933ded31546729af.zip
print queue
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index 960ac97..0a201b9 100644
--- a/main.py
+++ b/main.py
@@ -2,7 +2,7 @@ from evdev import InputDevice, list_devices, ecodes
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
-SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app"}
+SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1"}
device = None
last = 0x00
@@ -27,6 +27,8 @@ def do_action(action: str):
homelab_request("hack_this_club") # /j (test endpoint)
elif action == "play/pause":
homelab_request("music")
+ elif action == "1":
+ homelab_request("print_queue")
for path in list_devices():
candidate = InputDevice(path)