summarylogtreecommitdiffstats
path: root/display-switch.service
blob: a08d336a9dc14b707ed222bf358afcc4a4007cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[Unit]
Description=display-switch automatic DDC display switcher

[Service]
Type=simple
StandardOutput=journal
Restart=always

DynamicUser=yes
SupplementaryGroups=i2c

LogsDirectory=display-switch
StateDirectory=display-switch

# There's a lot of finagling to get display_switch to put the files in a normal place.
Environment=HOME=/var/lib/display-switch

ExecStartPre=mkdir -p /var/lib/display-switch/.config/display-switch
ExecStartPre=ln -sf /etc/display-switch/display-switch.ini /var/lib/display-switch/.config/display-switch
ExecStartPre=mkdir -p /var/lib/display-switch/.local/share/
ExecStartPre=ln -sf /var/log/display-switch /var/lib/display-switch/.local/share/display-switch
ExecStart=/usr/bin/display_switch

[Install]
WantedBy=multi-user.target