monitordisplay/README.md
2021-01-26 09:08:50 +01:00

80 lines
1.3 KiB
Markdown

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
```