Files
ericek111andClaude Opus 5.5 1c273fc881 Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 22:46:43 +01:00

30 lines
1006 B
Bash
Executable File

#!/bin/sh
# Installs the udev rule (needs sudo) and a systemd user service that starts
# trackscreen with your graphical session. Extra arguments are passed to
# trackscreen.py, e.g. ./install.sh --speed 1.3 --rotate 90
set -e
DIR=$(cd "$(dirname "$0")" && pwd)
sudo install -m 644 "$DIR/70-trackscreen.rules" /etc/udev/rules.d/70-trackscreen.rules
sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=input --subsystem-match=misc --action=change
mkdir -p "$HOME/.config/systemd/user"
cat > "$HOME/.config/systemd/user/trackscreen.service" <<UNIT
[Unit]
Description=Trackscreen - touchscreen as touchpad (five-finger tap to toggle)
PartOf=graphical-session.target
After=graphical-session.target
[Service]
ExecStart=/usr/bin/python3 $DIR/trackscreen.py $*
Restart=on-failure
RestartSec=2
[Install]
WantedBy=graphical-session.target
UNIT
systemctl --user daemon-reload
systemctl --user enable --now trackscreen.service
systemctl --user --no-pager status trackscreen.service | head -n 12