You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Simon Vieille 6f517fd79d
add documentation
8 months ago
README.md add documentation 8 months ago
config.ini-dist init 4 years ago
monitordisplay add screen option: xrandr_extra; add test mode (-n) 8 months ago

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