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.
This commit is contained in:
parent
bf80c9ecf3
commit
e5414cbadf
7 changed files with 17 additions and 3 deletions
|
@ -0,0 +1 @@
|
||||||
|
../flashfocus.service
|
|
@ -1,5 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Alacritty window hidden on i3 scratchpad
|
Description=Alacritty window hidden on i3 scratchpad
|
||||||
|
After=display-manager.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Todo.md floating vim instance
|
Description=Todo.md floating vim instance
|
||||||
|
After=display-manager.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
12
services/.config/systemd/user/flashfocus.service
Normal file
12
services/.config/systemd/user/flashfocus.service
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Perform windows animations on focus
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/flashfocus
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -1,2 +0,0 @@
|
||||||
[Service]
|
|
||||||
RestartSec=5
|
|
|
@ -1 +1 @@
|
||||||
/usr/lib/systemd/user/flashfocus.service
|
/home/marty/.config/systemd/user/flashfocus.service
|
|
@ -1,5 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Automatically commit notes in university directory
|
Description=Automatically commit notes in university directory
|
||||||
|
After=display-manager.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
Loading…
Reference in a new issue