`~/.config/systemd/user/remove-thunderbird-dir.path`
[Unit]
Description=Watch for unwanted ~/thunderbird directory
[Path]
PathExists=%h/thunderbird
Unit=remove-thunderbird-dir.service
[Install]
WantedBy=default.target `~/.config/systemd/user/remove-thunderbird-dir.path`
[Unit]
Description=Watch for unwanted ~/thunderbird directory
[Path]
PathExists=%h/thunderbird
Unit=remove-thunderbird-dir.service
[Install]
WantedBy=default.targetFor 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...