"Mons is a Shell script to quickly manage 2-monitors display using xrandr."
*Edited deamon to also automatically configure the second monitor when detected.
- No requirement: POSIX-compliant.
- Useful: Perfectly fit for laptops, quick and daily use.
- Well known: Laptop mode, projector mode, duplicate and extend.
- More: Select, move monitors and switch modes easily.
- Extra: Deamon mode option to reset display if detects only one monitor.
- Package (AUR)
$ pacaur -S mons
- Manual
$ git clone --recursive https://github.com/mfe5003/mons.git
$ cd mons
$ sudo make install
Note:
--recursive
is needed for git submodule
Usage: mons [OPTION]...
Options can not be used in conjunction.
If no argument, prints plugged-in monitor ID list.
Information:
-h: Prints this help and exits.
-v: Prints version and exits.
Two monitors:
-o: Preferred monitor only.
-s: Second monitor only.
-d: Duplicates.
-e: Extends [ top | left | right | bottom ].
More monitors:
-O: Enables only the selected monitor.
-S: Enables only two monitors [MON1,MON2:P],
MON1 and MON2 are monitor IDs,
P takes the value [R] right or [T] top for the MON2's placement.
Daemon mode:
-m: Re-establishs the display if it detects only one monitor.
Displays monitor list:
$ mons
0: LVDS-1 (enabled)
5: VGA-1
You have an enabled one, you want to extends the second one on the right:
$ mons -e right
You want to only display the second one:
$ mons -s
Displays monitor list:
$ mons
0: LVDS-1 (enabled)
1: DP-1 (enabled)
5: VGA-1
You may need to display only the third one:
$ mons -O 5
You may need to display the first and the third one on the right:
$ mons -S 0,5:R
Like above but you want to inverse the placement:
$ mons -S 5,0:R
Especially for laptops, after unplugging the additional monitors, it might be convenient to reset automatically the display for the remaining one.
Run mons as daemon with nohup:
$ nohup mons -m > /dev/null 2>&1 &