mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-13 10:10:47 +01:00
systemd user service watches RandR output events and puts every connected monitor at native resolution + max refresh, DP-0 primary on the left, unplugged outputs switched off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWXa4ytX9adN7qpMAop
18 lines
491 B
Desktop File
18 lines
491 B
Desktop File
[Unit]
|
|
Description=Every monitor at its best resolution and refresh rate, on hotplug
|
|
After=graphical-session.target
|
|
# An X restart kills the watcher (exit 1) and Restart= brings it back; a
|
|
# genuinely broken setup trips this limit and shows as a failed unit.
|
|
StartLimitIntervalSec=300
|
|
StartLimitBurst=5
|
|
|
|
[Service]
|
|
Type=simple
|
|
Environment=DISPLAY=:0
|
|
ExecStart=/usr/bin/python3 @FEATURES_DIR@/monitor_autoconfig.py
|
|
Restart=on-failure
|
|
RestartSec=3s
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|