Skip to content
AngelaIVLPublic

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tryx-control

TRYX Panorama SE installed in case

TRYX ships their cooler with a 6.67" curved AMOLED on the pump block and a Windows-only control app called Kanali. cute. I run Linux Mint and was not about to dual-boot just to change wallpapers, so I built my own stack: a wrapper CLI, a systemd-driven cycler, and a GTK4 gallery that lets me click a tile and have anime girls show up on my radiator in under a second.

what's in here

tryx-control/
├── README.md
├── LICENSE
├── .gitignore
├── gui/
│   └── tryx-gallery               # GTK4 thumbnail grid, click-to-play
└── service/
    ├── tryx-screen                # the CLI — main entrypoint
    ├── tryx-keepalive             # shuffle-bag cycler (timer-driven)
    ├── tryx-display-loop          # ExecStart helper for reed-tpse.service
    ├── setup-tryx-panorama.sh     # one-shot installer for the reed-tpse driver
    └── systemd/
        ├── reed-tpse.service           # display + keepalive (long-running)
        ├── tryx-keepalive.service      # one-shot: pop next pick off the shuffle queue
        ├── tryx-keepalive.timer        # fires the cycler every 10 min
        └── tryx-screen-startup.service # picks a random video on login

Two pieces I wrote — the service layer (service/) and the gallery GUI (gui/) — sitting on top of one upstream piece I didn't:

reed-tpse — the userspace driver that actually speaks the cooler's serial protocol and pushes files via ADB. By @fadli0029, MIT. not mine. service/setup-tryx-panorama.sh clones, builds, and installs it for you. nothing in this repo would work without it. give them a star.

how it fits together

┌─────────────────────────────────────────────────────────────────┐
│  GUI (gui/tryx-gallery)                                         │
│  GTK4 thumbnail grid, click-to-play, search, transport          │
└────────────────────────────────┬────────────────────────────────┘
                                 │  shells out to
                                 ▼
┌─────────────────────────────────────────────────────────────────┐
│  CLI wrapper (service/tryx-screen)                              │
│  fuzzy match, shuffle-bag, history, locking, status             │
└────────────────┬───────────────────────────────┬────────────────┘
                 │                               │
                 │  triggers                     │  shells out to
                 ▼                               ▼
┌──────────────────────────────────┐   ┌──────────────────────────┐
│  systemd user units              │   │  reed-tpse (upstream)    │
│  ├─ reed-tpse.service            │   │  C++ binary at           │
│  │   (display + keepalive loop)  │   │  /usr/local/bin/         │
│  ├─ tryx-keepalive.service       │   │  reed-tpse               │
│  │   (cycles to a new random)    │   │                          │
│  ├─ tryx-keepalive.timer         │   │  speaks the cooler's     │
│  │   (fires the cycler every     │   │  protocol over           │
│  │    10 min)                    │   │  /dev/ttyACM* and pushes │
│  └─ tryx-screen-startup.service  │   │  media via adb to        │
│      (sets a random video at     │   │  /sdcard/pcMedia/        │
│       login)                     │   │                          │
└──────────────────────────────────┘   └────────────┬─────────────┘
                                                    │
                                                    ▼
                                       ┌──────────────────────────┐
                                       │  TRYX Panorama SE        │
                                       │  (USB CDC ACM + ADB,     │
                                       │   internal USB 2.0 hdr)  │
                                       └──────────────────────────┘

why three units instead of one

The cooler reverts to its default screen if it doesn't get a handshake every ~60s. A naive setup just runs reed-tpse daemon, but then every video switch flickers (daemon stops → display sets → daemon restarts). gross. so:

  • reed-tpse.service runs tryx-display-loop, which calls reed-tpse display <video> --keepalive once. The display config goes out on startup, then it's just handshake pings forever. zero flicker.
  • tryx-keepalive.timer fires every 10 min and runs tryx-keepalive, which pops the next video from the shuffle bag and pokes the same serial connection with a display command — no service restart, no flash on switch.
  • tryx-screen-startup.service runs once at login (5 s after desktop ready) to pick an initial random video.
  • Every unit has hard CPUQuota, MemoryMax, Nice 19, and IOSchedulingClass=idle caps. a wedged USB cable is not taking down my session.

A flock on /tmp/tryx-screen.lock serializes anything that needs exclusive serial access (brightness, upload-all, device-list, device-delete).

shuffle-bag, not RNG

tryx-screen random and the cycler both pull from a shuffle-bag queue: every video plays exactly once before any repeats. Queue lives at ~/.config/reed-tpse/tryx-shuffle-queue. When the bag empties, the next shuffle is pre-built with the just-played video excluded, so you never get back-to-back repeats on the wrap-around. Last 50 plays go to ~/.config/reed-tpse/tryx-screen-history which is what tryx-screen prev walks backward through.

linux support

Daily-driven on Linux Mint 22.x (Ubuntu 24.04 base). Should work anywhere you have:

  • systemd user services
  • access to /dev/ttyACM* (your user in dialout on Debian/Mint/Ubuntu, uucp on Arch)
  • GTK4 + PyGObject for the gallery (the service layer is pure shell)

Upstream reed-tpse reports clean runs on Arch 6.17 and Bazzite 6.17 too. The installer script (service/setup-tryx-panorama.sh) is apt-flavored — on Arch/Fedora just install cmake g++ git adb ffmpeg make yourself and run cmake -B build && cmake --build build && sudo cmake --install build inside the cloned reed-tpse repo.

install

git clone <this repo> ~/code/tryx-control
cd ~/code/tryx-control

# 1. reed-tpse: clones upstream, builds, installs to /usr/local/bin,
#    adds you to dialout, drops a default config
./service/setup-tryx-panorama.sh

# log out / log back in for dialout to stick (or: newgrp dialout)

# 2. wrapper + GUI into your $PATH
install -Dm755 service/tryx-screen        ~/.local/bin/tryx-screen
install -Dm755 service/tryx-keepalive     ~/.local/bin/tryx-keepalive
install -Dm755 service/tryx-display-loop  ~/.local/bin/tryx-display-loop
install -Dm755 gui/tryx-gallery           ~/.local/bin/tryx-gallery

# 3. systemd user units
mkdir -p ~/.config/systemd/user
cp service/systemd/*.service service/systemd/*.timer ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now reed-tpse.service
systemctl --user enable --now tryx-keepalive.timer
systemctl --user enable        tryx-screen-startup.service

# 4. GUI deps (Mint/Ubuntu)
sudo apt install python3-gi gir1.2-gtk-4.0 ffmpeg

# 5. drop your videos in
mkdir -p ~/tryx-videos
# ... toss .mp4s in. needs to be 2240x1080, h264, no audio.

Convert anything to the format the cooler wants:

ffmpeg -y -i input.mp4 \
  -vf "scale=2240:1080:force_original_aspect_ratio=increase,crop=2240:1080,setsar=1" \
  -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -an -movflags +faststart \
  ~/tryx-videos/my-new-video.mp4

new files drop into the shuffle automatically. no restarts.

usage

CLI

tryx-screen list                  # everything in ~/tryx-videos, marks current
tryx-screen show miku             # fuzzy match — partials work
tryx-screen random                # shuffle-bag pick
tryx-screen next                  # next in the queue
tryx-screen prev                  # back one in history
tryx-screen gui                   # launch the gallery
tryx-screen cycle 120             # foreground cycle, 120s each
tryx-screen brightness 75         # 0–100
tryx-screen status                # current video, daemon, cycler, device
tryx-screen on / off              # start/stop keepalive + cycler
tryx-screen upload-all            # push every local video to the cooler
tryx-screen device-list           # files stored on-device
tryx-screen device-delete <name>  # nuke one

GUI

tryx-gallery — GTK4 thumbnail grid

tryx-gallery                      # or: tryx-screen gui
key action
click tile switch the cooler to that video
Ctrl+F focus search
Escape clear search

Transport bar has Prev / Next / Shuffle and an Auto toggle that flips the 10-min tryx-keepalive.timer on/off live. The currently-playing tile gets a purple border + badge, polled every 3 s off the state file so it stays honest even if you change videos from the CLI in another terminal.

files & locations

what where
videos ~/tryx-videos/*.mp4
reed-tpse binary /usr/local/bin/reed-tpse
wrapper + GUI ~/.local/bin/tryx-{screen,keepalive,display-loop,gallery}
systemd units ~/.config/systemd/user/{reed-tpse,tryx-keepalive,tryx-screen-startup}.service, tryx-keepalive.timer
reed-tpse config ~/.config/reed-tpse/config.json
current video / timestamp ~/.config/reed-tpse/tryx-screen-state
shuffle queue ~/.config/reed-tpse/tryx-shuffle-queue
play history (last 50) ~/.config/reed-tpse/tryx-screen-history
serial lock /tmp/tryx-screen.lock
thumbnail cache ~/.cache/tryx-gallery/thumbs/

license

service/ and gui/ are CC0 — public domain, do whatever. see LICENSE.

The installer pulls down upstream reed-tpse (MIT, @fadli0029) — credit and copyright there belong to its author. none of their source is vendored into this repo.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages