SRANDRD(1)

πŸ“¦ version 0.6.3, in nixos 26.05, nixpkgs unstable

πŸ’… SRANDRD(1) β€” NAME ✨

okay so bestie, meet srandrd: a simple randr daemon. That’s the name, no cap β€” simple randr daemon. πŸŽ€


✨ SYNOPSIS ✨

srandrd [OPTIONS] COMMAND|list
  • list β€” List outputs and EDIDs and terminate. yes, it literally lists the goods and dips. πŸ’…

πŸŽ€ OPTIONS πŸŽ€

  • -h β€” Print help and exit.
  • -n β€” Don’t fork to background.
  • -V β€” Show version information and exit.
  • -v β€” Verbose output.
  • -e β€” Emit connected devices at startup.
  • -1 β€” One-shot mode; exit after emitting connected devices (implies -e).

πŸ’– DESCRIPTION πŸ’–

srandrd(1) is a tool that executes a command on xrandr output change events β€” i.e. if a monitor is plugged or unplugged. By default srandrd forks to background and exits if the xserver exits. periodt. 🫢

The following variables are defined, bestie:

  • SRANDRD_OUTPUT β€” defines the name of the graphics card output / port that triggered the event, e.g. DVI-0.
  • SRANDRD_EVENT β€” defines the event that happened. It’s one of the following: [connected|disconnected|unknown].
  • SRANDRD_EDID β€” defines a semi-unique identifier of the monitor that has been connected. The identifier is usually not unique (the same) within a monitor series. The identifier has this format: VENDOR[4]PRODUCT[4]SERIAL[8].
  • SRANDRD_SCREENID β€” defines the xinerama screen id (if available). The identifier has this format: XINERAMA_SCREENID[1..n].

🌸 EXAMPLE 🌸

An example usage could be

srandrd display_handler

where display_handler is the following script:

#!/bin/sh

case "$S{RANDRD_OUTPUT} ${SRANDRD_EVENT}" in
  "DVI-0 connected") xrandr --output DVI-0 --auto --right-of LVDS;;
  "VGA-0 connected") xrandr --output VGA-0 --auto --left-of LVDS;;
esac

πŸ¦‹ RESOURCES πŸ¦‹



πŸ‘‘ AUTHOR πŸ‘‘

  • Jan Christoph Ebersbach <jceb@e-jc.de>
  • Stefan Bolte <portix@gmx.net>

okay that’s the whole page, bestie. This manual is sourced/versioned as SRANDRD(1) and dated 10/13/2018 β€” periodt, slay, bye. πŸ’œβœ¨

πŸ“¦ where this page comes from