Browse Source

add documentation

master
Simon Vieille 1 month ago
parent
commit
6f517fd79d
Signed by: deblan GPG Key ID: 03383D15A1D31745
1 changed files with 34 additions and 45 deletions
  1. +34
    -45
      README.md

+ 34
- 45
README.md View File

@ -10,81 +10,70 @@ Files loaded:
* `$HOME/.config/monitordisplay/config.ini`
* `$HOME/.monitordisplay`
### Screens
### Screens examples
```
[screen:HUMAIN_SCREEN_NAME1]
name=SYSTEM_SCREEN_NAME1
[screen:LaptopScreen]
name=eDP1
resolutionX=1920
resolutionY=1080
[screen:HUMAIN_SCREEN_NAME2]
name=SYSTEM_SCREEN_NAME2
resolutionX=1024
resolutionY=768
[screen:HUMAIN_SCREEN_NAME3]
name=SYSTEM_SCREEN_NAME2
[screen:DisplayPort]
name=eDP2
resolutionX=1920
resolutionY=1080
```
### Modes
[screen:HDMI]
name=hdmi
resolutionX=1920
resolutionY=1080
```
[mode:MODE_NAME]
config[foo]=HUMAIN_SCREEN_NAME1,HUMAIN_SCREEN_NAME2
config[bar]=HUMAIN_SCREEN_NAME2,HUMAIN_SCREEN_NAME1
primary=HUMAIN_SCREEN_NAME1
[mode:MODE_NAME2]
config[]=HUMAIN_SCREEN_NAME1,HUMAIN_SCREEN_NAME3
config[]=HUMAIN_SCREEN_NAME1,HUMAIN_SCREEN_NAME3
[screen:TV]
name=hdmi
resolutionX=1920
resolutionY=900
```
Usage
----
### Modes
```
$ monitordisplay -m MODE_NAME
```
…which equals:
[mode:Home]
config[table]=TV,LaptopScreen
config[sofa]=LaptopScreen,TV
primary=TV
```
$ xrand \
--output SYSTEM_SCREEN_NAME1 --primary --mode 1920x1080 --pos 0x0 \
--output SYSTEM_SCREEN_NAME2 --mode 1024x768 --pos 1920x0 \
--output SYSTEM_SCREEN_NAME3 --off
[mode:Work]
config[]=LaptopScreen,DisplayPort,HDMI
config[]=LaptopScreen
```
Then you can run:
Usage
-----
```
$ monitordisplay -t
# OR
$ monitordisplay -tbar
$ monitordisplay -m Home # same as `monitordisplay -m Home -t table`
```
…which equals:
```
$ xrand \
--output SYSTEM_SCREEN_NAME2 --mode 1024x768 --pos 0x0 \
--output SYSTEM_SCREEN_NAME1 --mode 1920x1080 --primary --pos 1024x0 \
--output SYSTEM_SCREEN_NAME3 --off
--output hdmi --primary --mode 1920x1080 --pos 0x0 \
--output eDP1 --mode 1920x1080 --pos 1920x0 \
--output eDP2 --off
```
You can remove the parameter `--off` with `-s`:
Then you can run this command to change the applied config:
```
$ monitordisplay -m MODE_NAME -s
$ 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`
```
It equals:
You can disable `--off` with `-s` and you can test with the parameter `-n`.
```
$ xrand \
--output SYSTEM_SCREEN_NAME1 --primary --mode 1920x1080 --pos 0x0 \
--output SYSTEM_SCREEN_NAME2 --mode 1024x768 --pos 1920x0
$ monitordisplay -s -n -m MODE_NAME
```

Loading…
Cancel
Save