|
|
|
|
|
by projektfu
3 days ago
|
|
So often the answer to "Can systemd just do that?" is "yes." But before AI, it was hard to surface the way to do it. Now I can get a lot done just by asking Claude for a few ways of doing something, and often the systemd answer is there. |
|
For this file, it's pretty straight forward to read. I'm telling you because I think it'll change your mind.
The file name ends in ".path"[0] (it starts with `~/.config/systemd` so it is a user process with user permissions), meaning it monitors paths. Simple!
Then what matters is what's in `[Path]`. `PathExists` is the path being monitored. `Unit` is what service runs. In this case whatever is in `~/.config/systemd/user/remove-thunderbird-dir.service` but guess what, `Unit` is completely optional here. It will default to that. You can probably guess `%h` means `$HOME`. The `[Install]` is necessary though, but that's going to be common and everywhere.
Cumbersome? Yes. Annoying? Mildly, but it's worth it and just minorly inconvenient. Difficult? No. Powerful? YES
[0] https://www.freedesktop.org/software/systemd/man/latest/syst...