diff --git a/Makefile b/Makefile index 4f43e8e..b53e887 100644 --- a/Makefile +++ b/Makefile @@ -23,13 +23,17 @@ MANDIR ?= $(DATADIR)/man # distribution that still keeps /lib separate from /usr/lib says so here - and # only guessed at when there is no systemd installed to ask. # -# A build with a prefix of its own keeps the units under that prefix instead. -# systemd searches $(PREFIX)/lib/systemd/user as well, and a file outside the -# prefix it was asked for is not this build's to place. +# A build with a prefix of its own keeps the units under that prefix instead, +# and under share rather than lib. systemd searches both for a system prefix, +# but only share for a home one: $XDG_DATA_HOME/systemd/user is a search path +# and ~/.local/lib/systemd/user is not, so an install into ~/.local that put +# the units in lib would leave the watcher impossible to enable. That prefix is +# the one an atomic distribution leaves a user - there is no writing to /usr on +# Bazzite or Silverblue without layering a package and rebooting. ifeq ($(PREFIX),/usr) USERUNITDIR ?= $(shell pkg-config --variable=systemduserunitdir systemd 2>/dev/null || echo /usr/lib/systemd/user) else -USERUNITDIR ?= $(PREFIX)/lib/systemd/user +USERUNITDIR ?= $(DATADIR)/systemd/user endif LINGUAS := de diff --git a/README.md b/README.md index 2bfccf1..502adf2 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,24 @@ sudo curl -fsSL -o /etc/yum.repos.d/middleclick-autoscroll.repo \ sudo dnf install middleclick-autoscroll ``` +**Bazzite and friends (for the ones who reboot to install things)** + +```bash +sudo curl -fsSL -o /etc/yum.repos.d/middleclick-autoscroll.repo \ + https://felitendo.github.io/middleclick-autoscroll/middleclick-autoscroll.repo +sudo rpm-ostree install middleclick-autoscroll +systemctl reboot +``` + +Don't want to layer a shell script into your image? Everything this thing does +happens in `$HOME` anyway, so it can just live there too - no root, no reboot +(needs `make`, otherwise grab it in a distrobox): + +```bash +git clone https://github.com/Felitendo/middleclick-autoscroll +cd middleclick-autoscroll && make install PREFIX=~/.local +``` + **Debian (for the elderly)** ```bash