Go to file
Simon Vieille 6f517fd79d
add documentation
2021-01-26 09:08:50 +01:00
README.md add documentation 2021-01-26 09:08:50 +01:00
config.ini-dist init 2017-08-13 02:56:08 +02:00
monitordisplay add screen option: xrandr_extra; add test mode (-n) 2021-01-26 08:50:51 +01:00

README.md

Monitor display

Configuration

Files loaded:

  • /etc/monitordisplay/config.ini
  • $HOME/.config/monitordisplay/config.ini
  • $HOME/.monitordisplay

Screens examples

[screen:LaptopScreen]
name=eDP1
resolutionX=1920
resolutionY=1080

[screen:DisplayPort]
name=eDP2
resolutionX=1920
resolutionY=1080

[screen:HDMI]
name=hdmi
resolutionX=1920
resolutionY=1080

[screen:TV]
name=hdmi
resolutionX=1920
resolutionY=900

Modes

[mode:Home]
config[table]=TV,LaptopScreen
config[sofa]=LaptopScreen,TV
primary=TV

[mode:Work]
config[]=LaptopScreen,DisplayPort,HDMI
config[]=LaptopScreen

Usage

$ monitordisplay -m Home # same as `monitordisplay -m Home -t table`

…which equals:

$ xrand \
	--output hdmi --primary --mode 1920x1080 --pos 0x0 \
	--output eDP1 --mode 1920x1080 --pos 1920x0 \
	--output eDP2 --off

Then you can run this command to change the applied config:

$ monitordisplay -t # -> same as `monitordisplay -m Home -t sofa`
$ monitordisplay -t # -> same as `monitordisplay -m Home -t table`
$ monitordisplay -t # -> same as `monitordisplay -m Home -t sofa`
$ monitordisplay -t sofa # -> same as `monitordisplay -m Home -t sofa`

You can disable --off with -s and you can test with the parameter -n.

$ monitordisplay -s -n -m MODE_NAME