v2 release prep: installer, README, packaging, notes; retire the v1 scripts
Installer rewritten around a preflight: distro, package manager, display manager, window manager, terminal, tmux, cargo, git, screen locker, touch device, device permissions and free disk are all checked BEFORE anything is installed, and the total cost is printed once for a single confirmation. Prompts read /dev/tty so they still work when the script is piped from curl, and fall back to defaults with a notice when there is no terminal at all. Several "[ test ] && action" statements were set -e landmines: under set -e an AND-OR list that ends up false aborts the script, so a box with no lightdm, no i3 or nothing to install would have exited silently partway through detection -- which is exactly the fresh-Debian case the installer exists for. Rewritten as if-statements and verified against a stripped PATH with no tmux, cargo, git or package manager present. Also fixed cargo detection reporting blank instead of NOT INSTALLED: the status of `cargo --version | cut` is cut's, and cut succeeds on empty input, so the fallback never fired. Device access now defaults to a udev rule matching touchscreens only, rather than the input group, which grants access to every input device including the keyboard and needs a full logout. README rewritten for someone who has not seen the project: what the photo shows, the hardware, install, then a config built up step by step, each step with the YAML and the resulting map. Every example is verified verbatim against the binary, and every relative link resolves. The mechanism and the reasoning move to notes/: DESIGN.md, HARDWARE-NOTES.md, V1-BASH.md, TODO.md. cad/README.md was a verbatim copy of the one inside geeekpi_rack_adapter_release_v1/, so every path in it -- including the screenshot -- was broken from where it sits. Corrected to its own level, and it now states once that the 9-inch screen, the 10-inch mini-rack mount and the 19-inch rack are three different measurements. The v1 shell implementation is removed; it stays recoverable at tag v1.2 and notes/V1-BASH.md carries the setting-by-setting migration table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Installed by socktop-swipe.
|
||||
#
|
||||
# Reading touch events means reading /dev/input directly. The usual advice is
|
||||
# to join the 'input' group, but that grants access to EVERY input device --
|
||||
# including the keyboard, which is a keylogger's worth of access -- and it needs
|
||||
# a full logout to take effect.
|
||||
#
|
||||
# This grants access to touchscreens only, and applies the moment the device
|
||||
# appears. Change GROUP to a group the dashboard user is in if 'input' is not
|
||||
# suitable; the point is the narrower device match, not the group name.
|
||||
#
|
||||
# Reload with: sudo udevadm control --reload && sudo udevadm trigger
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_TOUCHSCREEN}=="1", GROUP="input", MODE="0640"
|
||||
@@ -0,0 +1,29 @@
|
||||
# systemd --user unit for the gesture daemon, as an alternative to starting
|
||||
# socktop-swipe from the window manager's autostart.
|
||||
#
|
||||
# cp packaging/socktop-swipe.service ~/.config/systemd/user/
|
||||
# systemctl --user enable --now socktop-swipe
|
||||
#
|
||||
# This runs the DAEMON only: it drives a session that something else built and
|
||||
# attached (see socktop-swipe build / attach). If you would rather have one unit
|
||||
# do everything, change ExecStart to `socktop-swipe run` and drop ExecStartPre --
|
||||
# but then the terminal is a child of the unit, and restarting the unit closes
|
||||
# the dashboard.
|
||||
[Unit]
|
||||
Description=socktop-swipe touchscreen gesture daemon
|
||||
Documentation=https://gt.wittyoneoff.com/jason/socktop-swipe
|
||||
After=graphical-session.target
|
||||
PartOf=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# Only needed if `terminal:` is set and the terminal is an X client. The gesture
|
||||
# path itself reads evdev directly and needs no display connection at all.
|
||||
Environment=DISPLAY=:0
|
||||
ExecStartPre=/usr/local/bin/socktop-swipe build
|
||||
ExecStart=/usr/local/bin/socktop-swipe daemon
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
Reference in New Issue
Block a user