monitordisplay/README.md

80 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2017-08-13 02:56:08 +02:00
Monitor display
===============
2017-08-13 03:07:09 +02:00
Configuration
-------------
Files loaded:
2017-08-13 02:56:08 +02:00
* `/etc/monitordisplay/config.ini`
* `$HOME/.config/monitordisplay/config.ini`
* `$HOME/.monitordisplay`
2021-01-26 09:08:50 +01:00
### Screens examples
2017-08-13 02:56:08 +02:00
```
2021-01-26 09:08:50 +01:00
[screen:LaptopScreen]
name=eDP1
2017-08-13 02:56:08 +02:00
resolutionX=1920
resolutionY=1080
2021-01-26 09:08:50 +01:00
[screen:DisplayPort]
name=eDP2
2017-08-13 02:56:08 +02:00
resolutionX=1920
resolutionY=1080
2021-01-26 09:08:50 +01:00
[screen:HDMI]
name=hdmi
resolutionX=1920
resolutionY=1080
2017-08-13 02:56:08 +02:00
2021-01-26 09:08:50 +01:00
[screen:TV]
name=hdmi
resolutionX=1920
resolutionY=900
2017-08-13 02:56:08 +02:00
```
2021-01-26 09:08:50 +01:00
### Modes
2017-08-13 02:56:08 +02:00
```
2021-01-26 09:08:50 +01:00
[mode:Home]
config[table]=TV,LaptopScreen
config[sofa]=LaptopScreen,TV
primary=TV
2017-08-13 02:56:08 +02:00
2021-01-26 09:08:50 +01:00
[mode:Work]
config[]=LaptopScreen,DisplayPort,HDMI
config[]=LaptopScreen
2017-08-13 03:07:09 +02:00
```
2017-08-13 02:56:08 +02:00
2021-01-26 09:08:50 +01:00
Usage
-----
2017-08-13 02:56:08 +02:00
2017-08-13 03:07:09 +02:00
```
2021-01-26 09:08:50 +01:00
$ monitordisplay -m Home # same as `monitordisplay -m Home -t table`
2017-08-13 03:07:09 +02:00
```
…which equals:
```
$ xrand \
2021-01-26 09:08:50 +01:00
--output hdmi --primary --mode 1920x1080 --pos 0x0 \
--output eDP1 --mode 1920x1080 --pos 1920x0 \
--output eDP2 --off
2017-08-13 03:07:09 +02:00
```
2021-01-26 09:08:50 +01:00
Then you can run this command to change the applied config:
2017-08-13 03:07:09 +02:00
```
2021-01-26 09:08:50 +01:00
$ 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`
2017-08-13 03:07:09 +02:00
```
2021-01-26 09:08:50 +01:00
You can disable `--off` with `-s` and you can test with the parameter `-n`.
2017-08-13 03:07:09 +02:00
```
2021-01-26 09:08:50 +01:00
$ monitordisplay -s -n -m MODE_NAME
2017-08-13 02:56:08 +02:00
```