Linux command
mons 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
mons -o
Example
mons -s
Duplicate
mons -d
Mirror
mons -m
Extend
mons -e right
List
mons
Example
mons -O [id]
说明
mons is a POSIX-compliant shell script for managing multi-monitor displays on X Window System. It simplifies switching between display configurations without extensive dependencies. The tool wraps xrandr to provide intuitive commands for common dual-monitor setups: primary only, secondary only, duplicate, mirror, and extend modes. It supports daemon mode for automatic display management when monitors are connected or disconnected.
参数
- -o
- Enable primary monitor only
- -s
- Enable secondary monitor only
- -d
- Duplicate primary monitor output onto secondary
- -m
- Mirror primary display onto secondary
- -e _side_
- Extend primary monitor; side: top, left, right, bottom
- -n _side_
- Cycle through display modes sequentially
- -O _id_
- Enable specific monitor by identifier
- -S _id1,id2:pos_
- Enable two specific monitors; pos: R (right), T (top)
- -a
- Daemon mode; auto-enable display on monitor changes
- -x _script_
- Execute custom script on monitor count changes
- --dpi _value_
- Set display DPI (0-27432 range)
- --primary _name_
- Designate primary output monitor
- -h
- Display help
- -v
- Show version
FAQ
What is the mons command used for?
mons is a POSIX-compliant shell script for managing multi-monitor displays on X Window System. It simplifies switching between display configurations without extensive dependencies. The tool wraps xrandr to provide intuitive commands for common dual-monitor setups: primary only, secondary only, duplicate, mirror, and extend modes. It supports daemon mode for automatic display management when monitors are connected or disconnected.
How do I run a basic mons example?
Run `mons -o` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o do in mons?
Enable primary monitor only