main 5cdf11a

shrmt

shrmt is a GTK4 + layer-shell remote control app for NVIDIA SHIELD TV.

Runtime dependencies

  • gtk4
  • gtk4-layer-shell

Arch:

sudo pacman -S gtk4 gtk4-layer-shell

Build

make build

This writes the binary to ./bin/shrmt.

Install

make install

This installs shrmt to ~/.local/bin/shrmt by default.

Run

Launch the GTK app:

shrmt

Run from source:

go run ./cmd/shrmt

CLI examples:

shrmt discover
shrmt pair --host <shield-ip>
shrmt key home --host <shield-ip>

Remote layout

Top to bottom: Volume and Power toolbar (Volume reveals Vol-, Mute, Vol+), D-pad with OK, Back/Home/Menu, Rewind/Play-Pause/Fast-forward, app shortcuts, Close. Power sends a single toggle; the SHIELD decides on or off. sleep and wakeup remain available in the CLI.

Power and app shortcuts over the NVIDIA protocol

Power and app shortcuts use NVIDIA's own protocol (TLS port 8987), the one the official app uses, which also wakes the SHIELD from sleep. Pair it once with the PIN shown on the TV:

go run ./cmd/beyonderprobe pair --host <shield-ip>

Without these credentials, Power and app shortcuts fall back to the Android TV remote protocol. Other buttons always use the Android TV remote protocol. See research/beyonder-protocol.md.

Keyboard: arrows, Enter/Space (OK), Backspace (Back), h (Home), Menu key (Menu), , (Rewind), . (Fast-forward), p (Play/Pause), m (Mute), +/- (Volume).

Credentials and target storage

shrmt uses:

  • ~/.config/shrmt/androidtv-client-cert.pem
  • ~/.config/shrmt/androidtv-client-key.pem
  • ~/.config/shrmt/target.json
  • ~/.config/shrmt/beyonder-client-{cert,key}.pem, beyonder-device-id (NVIDIA protocol)

Testing

make test

Mocks

Mockery v3 config lives in .mockery.yaml.

make mock

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. On pages with a side panel: into the panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit; in a file, click a line number to select it, shift-click for a range
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 1

↑↓ moveenter openesc close