dotfiles/services/.config/systemd/user/uni-notes-sync.service
Marty Oehme e5414cbadf
services: Fix flashfocus startup
Flashfocus did not start up correctly since it was not required for the
`default.target` which is the only (?) valid target when systemd
operates in user-mode.

Instead of overwriting just part of the flashfocus service file, and
subsequently having it enabled for default.target and a non-existent
graphical.target user environment, we overwrite the whole file and set
it to `default.target`.

Additionally, the service should be restarted when it fails and slow
down on its restart attempts (I kept 5 seconds for this one, since it is
not as time critical as others -- no one cares if windows only flash
5 seconds after starting the machine.)

Added (wishful) After components to many service units, in case I figure
out one day how to make a useful target for the systemd user mode.
2020-09-23 17:55:07 +02:00

13 lines
406 B
Desktop File

[Unit]
Description=Automatically commit notes in university directory
After=display-manager.service
[Service]
Type=simple
Environment=GS_TIME_TO_COMMIT=120 GS_UNCHANGED_RUNS_TO_PUSH=30
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c '%h/.local/share/services/git-sync %h/documents/notes/uni'
Restart=on-failure
[Install]
WantedBy=default.target