Files
monitor-lets-go/monitor-lets-go.example.yaml
T
Maksim Totmin ab6cad0505 feat: serial:/size: external matching, exclude Hyprland FALLBACK output
- external list now accepts serial: and size: prefixes; desc: matches
  serial too. Fixes docked-mode deadlock where Hyprland's synthetic
  FALLBACK output (created when the built-in is disabled by a stale
  docked config) was treated as a real external monitor, leaving the
  daemon stuck in docked after undocking.
- modes name resolution gains serial: prefix (resolveSerial).
- add -log-level flag for observability.
- add unit tests for external matching and name resolution.
- update README and example config.
2026-08-06 12:25:47 +07:00

99 lines
3.1 KiB
YAML

# monitor-lets-go example configuration
# Copy to ~/.config/monitor-lets-go/config.yaml and adjust for your hardware.
# Backend selection: "auto" (recommended), "hyprland", or "sway".
backend: auto
# Quiet period after the last hotplug event before re-evaluating.
# Docking stations fire multiple events; debounce coalesces them.
debounce: 1200ms
# Polling fallback interval. The daemon listens for compositor events
# but also polls as a safety net. Set to 0 to disable polling.
poll_interval: 5s
# Whether to restore the portable layout when the daemon shuts down.
restore_on_exit: true
# Backend-specific options. Keys depend on the selected backend.
# Hyprland supports:
# output_path — path to the generated monitor config file
# (default: ~/.config/hypr/monitors.lua)
# Sway supports no backend-specific options (uses swaymsg commands directly).
# backend_config:
# output_path: ~/.config/hypr/custom-monitors.lua
# External monitors that trigger docked mode.
# Plain name: matches the connector name (e.g. DP-1, HDMI-A-1).
# desc: prefix: matches by monitor description or serial (survives rename).
# serial: prefix: matches by serial number (e.g. serial:3342300033911).
# size: prefix: matches by resolution, optionally with refresh
# (e.g. size:2560x1440 or size:2560x1440@165).
# Optional — if omitted or left empty, the daemon auto-detects external
# monitors: any display whose connector is not eDP-/LVDS-/DSI- is treated
# as external.
external:
- DP-1
- DP-2
- desc:Dell Inc. DELL U2723QE
- serial:3342300033911
- size:3440x1440@120
# Monitor layouts for each mode.
# "portable" and "docked" are required.
# Monitors connected but not listed in the mode are automatically disabled.
#
# Fields:
# name — connector name, desc:description, serial:XXXX, size:WxH,
# or size:WxH@R
# enabled — true to show, false to disable
# mode — "preferred" (auto-detect), "1920x1080@60", etc.
# position — "auto", "0x0", "1920x0", etc.
# scale — 1, 1.5, 2, etc.
modes:
portable:
monitors:
- name: eDP-1
enabled: true
mode: preferred
position: "0x0"
scale: 1.0
docked:
monitors:
- name: DP-1
enabled: true
mode: "2560x1440@144"
position: "0x0"
scale: 1.0
- name: DP-2
enabled: true
mode: "2560x1440@144"
position: "2560x0"
scale: 1.0
- name: eDP-1
enabled: false
- name: desc:Dell Inc. DELL U2723QE
enabled: true
mode: "3840x2160@60"
position: "0x0"
scale: 1.5
- name: size:1920x1080@60 # resolve by resolution + refresh rate
enabled: true
mode: preferred
position: auto
scale: 1.0
# Shell commands run after a layout change.
# Commands run concurrently; failures are logged but never crash the daemon.
# Tildes (~) and $HOME are expanded.
hooks:
on_dock:
- "systemctl --user restart waybar"
- "~/.config/monitor-lets-go/on-dock.sh"
on_undock:
- "systemctl --user restart waybar"
- "~/.config/monitor-lets-go/on-undock.sh"