# Stable, colon-free symlinks for the DRM devices.
#
# Why this exists: Hyprland's AQ_DRM_DEVICES selects which GPU renders, but
#   - /dev/dri/cardN numbering is assigned at boot and is not stable, and
#   - /dev/dri/by-path/ names contain colons, which AQ_DRM_DEVICES itself uses
#     as its separator, so they cannot be used.
#
# These rules are keyed to specific PCI addresses and simply do not match on
# other machines; hypr/env.lua checks that the symlink exists before setting
# AQ_DRM_DEVICES, so a non-match is harmless.
#
# Apply without rebooting:  sudo udevadm control --reload && sudo udevadm trigger

# desktop-gib: Radeon RX 7800 XT (discrete, drives DP-2)
KERNEL=="card*", KERNELS=="0000:03:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/amd-dgpu"

# desktop-gib: Granite Ridge integrated graphics
KERNEL=="card*", KERNELS=="0000:12:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/amd-igpu"
