Initial commit: swipe-to-zoom touchscreen navigation for socktop

Tiled socktop dashboard where a right-to-left swipe zooms into each host
full-screen and left-to-right walks back out.

The carousel is tmux pane zoom rather than separate socktop instances, so
there is one process per host: half the processes, no reconnect delay when
swiping back, and constant polling load on the monitored hosts.

Gestures come from lisgd because libinput emits gesture events only for
touchpads, never touchscreens, which rules out libinput-gestures entirely.

Documents the four gotchas found while building this: panels reporting 2-3
contacts for a one-finger swipe, X needing to ignore the panel so the
terminal and socktop stop competing for the same touches, tmux mouse mode
being incompatible with swipes, and lisgd not grabbing the device
exclusively so two instances double-fire.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
jasonwitty
2026-08-09 01:22:23 -07:00
commit 18ddd39184
11 changed files with 735 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Run the real gesture daemon in the foreground, with logging, so you can watch
# the display while you swipe. Ctrl-C to stop.
#
# Expect: swipe right-to-left -> zooms in one host at a time
# swipe left-to-right -> walks back out to the overview
# "Execute ..." in the output means a gesture matched and fired.
#
# Make sure no other instance is running first -- two copies fire every swipe
# twice, which looks like the carousel skipping.
set -eu
if pgrep -x lisgd >/dev/null 2>&1; then
echo "!! lisgd is already running (pid: $(pgrep -x lisgd | tr '\n' ' '))." >&2
echo "!! Two instances make every swipe fire twice. Stop it first:" >&2
echo " pkill -x lisgd" >&2
exit 1
fi
exec "$(dirname "$0")/../socktop-gestures" -v