services: Lower restart time to 2 seconds

Main issue the restart delay fixes is that services don't wait for X to
be ready on startup (which is bad if the application being started
requires X being ready to actually work.)

I have still not found a way to work around waiting for X being ready
other then the ugly delay hack (for systemd --user modules at least).

However, the delay can be --- in most cases --- smaller than 5 seconds.
All my machines start reasonably fast and have X up and running from
pressing login to staring at the wallpaper in a couple seconds at most.

If services don't start correctly and the error is X not being ready,
increase the startup delay once again.
This commit is contained in:
Marty Oehme 2020-09-12 17:37:43 +02:00
parent 755113f0f3
commit 34fca7670f
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Type=simple
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c 'alacritty --title "dropdown-terminal" --class Alacritty,scratchpad'
Restart=always
RestartSec=5
RestartSec=2
[Install]
WantedBy=default.target

View File

@ -6,7 +6,7 @@ Type=simple
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c 'alacritty --title "dropdown-todo" --class "Alacritty,scratchpad" -e nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F | :Limelight" %h/documents/records/todo.md'
Restart=always
RestartSec=5
RestartSec=2
[Install]
WantedBy=default.target