Skip to content

About

xrandr event watcher

Resources

Stars

9 stars

Watchers

1 watching

Forks

Repository files navigation

xrandr-watcher

xrandr event watcher

Requirements

  • nodejs (v13 is required for building and development)

Setup

on ArchLinux, use AUR helper yay to install xrandr-watch

yay -S xrandr-watch-git

this AUR includes a user system unit xrandr-watcher.service:

systemctl --user start xrandr-watcher.service
journalctl --user-unit=xrandr-watcher.service -f # change screen setting to see if it is working

create a script ~/.xrandr-changed with execution permission to perform tasks you want to run after screen changed, for example:

#!/bin/sh

xinput map-to-output "Wacom HID 4861 Finger touch" "eDP1"

and restart, test and enable the service:

systemctl --user restart xrandr-watcher.service
journalctl --user-unit=xrandr-watcher.service -f # change screen setting to see if it is working
systemctl --user enable xrandr-watcher.service

PS : The PKGBUILD file and the xrandr-watcher.service are in the master branch.

Commandline Usage

xrandr-watcher path/to/handler/script [notifyMask]

  path/to/handler/script should have execution permission
  notifyMask is by default ScreenChange, and can be one of All, ScreenChange, CrtcChange, OutputChange, OutputProperty

Build

git clone git@github.com:pastleo/xrandr-watcher.git
cd xrandr-watcher
make

then ./xrandr-watcher is the built executable

Development

git clone git@github.com:pastleo/xrandr-watcher.git
cd xrandr-watcher
npm install
npm start

About

xrandr event watcher

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages