[Unit]
Description=Watch power source and switch power profiles
After=graphical-session.target
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/absolute/path/to/power-profile-watcher
Environment=RUST_LOG=info
Restart=on-failure
RestartSec=2

[Install]
WantedBy=graphical-session.target
