Skip to content

Commit 46e020a

Browse files
author
Thomas Venriès
committed
readme: Add primary option section (#16)
Signed-off-by: Thomas Venriès <thomas.venries@gmail.com>
1 parent 340d10f commit 46e020a

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ $ sudo make install
3737
# Usage
3838

3939
```
40-
Usage: mons [OPTION]...
41-
42-
Without argument, it prints plugged-in monitor list with their ids.
43-
Options are exclusive and can be used in conjunction with --dpi option.
40+
Without argument, it prints connected monitors list with their names and ids.
41+
Options are exclusive and can be used in conjunction with extra options.
4442
4543
Information:
4644
-h Prints this help and exits.
@@ -68,6 +66,11 @@ More monitors:
6866
Extra (in-conjunction options):
6967
--dpi <dpi>
7068
Set the DPI, a strictly positive value within the range [0 ; 27432].
69+
--primary <mon_name>
70+
Select a connected monitor as the primary output. Run the script
71+
without argument to print monitors information, the names are in the
72+
second column between ids and status. The primary monitor is marked
73+
by an asterisk.
7174
7275
Daemon mode:
7376
-a Performs an automatic display if it detects only one monitor.
@@ -157,6 +160,28 @@ Use the `--dpi <dpi>` option in conjunction with all others options.
157160
$ mons [OPTIONS] --dpi <dpi>
158161
```
159162

163+
## Primary monitor
164+
165+
You might choose one of your monitors as the main one.
166+
You can use the `--primary <mon_name>` option alone or in conjunction with all
167+
others options.
168+
`<mon_name>` refers to the monitor name that appears in the list of connected
169+
monitors (ex: `LVDS-1` or `VGA-1`):
170+
171+
```
172+
$ mons
173+
0:* LVDS-1 (enabled)
174+
5: VGA-1
175+
```
176+
177+
The '*' character means that the monitor is the primary one:
178+
179+
```
180+
$ mons --primary VGA-1
181+
0: LVDS-1 (enabled)
182+
5:* VGA-1
183+
184+
```
160185

161186
## Daemon mode
162187

mons

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ fi
3030
usage() {
3131
echo 'Usage: mons [OPTION]...
3232
33-
Without argument, it prints plugged-in monitor list with their ids.
34-
Options are exclusive and can be used in conjunction with --dpi option.
33+
Without argument, it prints connected monitors list with their names and ids.
34+
Options are exclusive and can be used in conjunction with extra options.
3535
3636
Information:
3737
-h Prints this help and exits.
@@ -60,7 +60,10 @@ Extra (in-conjunction options):
6060
--dpi <dpi>
6161
Set the DPI, a strictly positive value within the range [0 ; 27432].
6262
--primary <mon_name>
63-
Select a monitor as the primary output.
63+
Select a connected monitor as the primary output. Run the script
64+
without argument to print monitors information, the names are in the
65+
second column between ids and status. The primary monitor is marked
66+
by an asterisk.
6467
6568
Daemon mode:
6669
-a Performs an automatic display if it detects only one monitor.

0 commit comments

Comments
 (0)