Skip to content

Mischi/randrd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RANDRD(1) General Commands Manual RANDRD(1)

NAME

randrdrandr monitor daemon

SYNOPSIS

randrd [-d] [-f file] [-i interval]

randrd -E

DESCRIPTION

The Xorg(1) server relies on libudev to monitor/detect physical screen configuration changes. Interested partys can register the XRRScreenChangeNotify event via XRRSelectInput(3) to get notified. Systems that lack libudev will not get any XRRScreenChangeNotify events when the physical screen configuration changes.
The randrd utility polls screen resources from Xrandr(3) after a regular interval. This causes Xorg(1) to check if any screen configuration has changed and will emit the appropriate events which will be handled by randrd. If the physical screen configuration has changed, randrd will execute the specified file and passes the CONNECTIONSTATE, the OUTPUT which has changed and an rmd160(3) EDIDHASH over all screen EDID's. randrd supports the following flags:
-d
Debug mode. Don't detach or become a daemon.
-f file
Specifies the file which will be executed if the physical screen configuration has changed. The default is $HOME/.randrd.
-i interval
Specifies the default interval in seconds after which screen resources are polled. The allowed range is between 1 and 60. The default is 3 seconds.
-E
Prints the rmd160(3) EDIDHASH for the actual screen configuration to stdout.

FILES

$HOME/.randrd
default file to execute when outputs change.

EXAMPLES

Sample .randrd script:
#!/bin/sh 

CONNECTIONSTATE=$1 OUTPUT=$2 EDIDHASH=$3

case $EDIDHASH in "9030ffc857dc906a635d1da0799b22d25e2b814e") CUR="Work" xrandr --output VGA1 --auto --above LVDS1 ;; "67034f8cfb71cebf10c9bc21dd9eac9f06512861") CUR="Home" xrandr --output VAG1 --auto --right-of LVDS1 ;; *) CUR="Default" xrandr --auto ;; esac

logger "$OUTPUT $CONNECTIONSTATE: Loading $CUR xrandr profile"

SEE ALSO

xrandr(1) Xrandr(3)

AUTHORS

The randrd program was written by Fabian Raetz <fabian.raetz@gmail.com>.

CAVEATS

Constantly polling screen resources from Xrandr(3) can decrease performance. If your System has libudev support, consider using an alternative utility like srandrd(1)
October 13, 2014 OpenBSD 5.6