mons
Monitor network traffic
TLDR
Enable only the primary monitor
Enable only the secondary monitor
Duplicate the primary monitor onto the secondary monitor, using the resolution of the primary monitor
Mirror the primary monitor onto the secondary monitor, using the resolution of the secondary monitor
SYNOPSIS
mons [OPTION...] [COMMAND]
mons detect
mons list
mons auto
mons set <DISPLAY> [--resolution <WxH>] [--primary] [--pos <X>x<Y>] [--
mons off <DISPLAY>
mons mirror <PRIMARY_DISPLAY> <SECONDARY_DISPLAY>
mons --version
mons --help
PARAMETERS
detect
Detects and displays available monitors and their capabilities, often showing their assigned names (e.g., eDP-1, HDMI-1).
list
Lists currently active monitor configurations, including resolution, position, and primary status.
auto
Automatically configures detected monitors, often extending the desktop across all connected displays.
set <DISPLAY>
Configures a specific monitor, identified by its name (e.g., 'eDP-1', 'HDMI-1').
off <DISPLAY>
Turns off a specified monitor, effectively disabling its output.
mirror <PRIMARY_DISPLAY> <SECONDARY_DISPLAY>
Mirrors the content of the primary display onto the secondary display.
--resolution <WxH>
Sets the display resolution for the specified monitor, e.g., '1920x1080'.
--primary
Designates the specified monitor as the primary display, where panels and new windows often appear by default.
--pos <XxY>
Sets the absolute top-left corner position of the monitor within the virtual desktop space.
--left-of <OTHER_DISPLAY>
Positions the current monitor to the left of another specified display.
--right-of <OTHER_DISPLAY>
Positions the current monitor to the right of another specified display.
--above <OTHER_DISPLAY>
Positions the current monitor above another specified display.
--below <OTHER_DISPLAY>
Positions the current monitor below another specified display.
--version
Displays the version information of the mons utility and exits.
--help
Displays a brief help message with common commands and options, then exits.
DESCRIPTION
mons is a command-line utility designed to simplify the configuration and management of multiple monitors and display outputs within an X.Org environment. While xrandr is the underlying powerful tool for display management, mons often acts as a user-friendly wrapper or a standalone script, abstracting away the complexity of xrandr commands. Its primary purpose is to quickly enable, disable, or reconfigure displays, set resolutions, and arrange monitor positions (e.g., left-of, right-of, above, below). This makes it particularly useful for laptop users connecting to projectors or external monitors, allowing them to switch between various display modes (mirror, extended, external only) with minimal effort. mons aims to provide a more intuitive interface for common display tasks compared to directly manipulating xrandr parameters, making multi-monitor setups more accessible from the terminal.
CAVEATS
The mons command is not a standard utility found in all Linux distributions; its availability often depends on specific desktop environments, user repositories, or custom installations. It typically relies on the X.Org display server and the xrandr utility as its backend. Therefore, it will not function in Wayland-only environments or on systems without X.Org. Improper usage can lead to temporary display issues or misconfigurations, requiring a manual fix with xrandr or a system restart. Users should ensure their graphics drivers are correctly installed for optimal performance.
<B>EASE OF USE</B>
mons is particularly valued for its simplicity and ease of use compared to the verbose and often intimidating syntax of xrandr. It abstracts common multi-monitor operations into straightforward commands, making it ideal for scripting display changes or quickly adjusting monitor setups without diving deep into xrandr documentation.
<B>INTEGRATION WITH DESKTOP ENVIRONMENTS</B>
While mons is a command-line tool, it can be easily integrated into desktop environments through custom keyboard shortcuts or startup scripts. This allows users to define and switch between different monitor profiles (e.g., 'laptop only', 'external monitor extended', 'projector mirror') with a single keypress or a quick command execution, enhancing workflow efficiency.
HISTORY
Unlike core Linux utilities, mons does not have a single, long-standing standardized history. It emerged primarily as a collection of shell scripts or small C programs created by individual developers or communities aiming to simplify multi-monitor setup, which traditionally required complex xrandr commands. Its development is often driven by the need for a quick, command-line solution to common display challenges faced by laptop users who frequently connect to external monitors or projectors. Specific implementations might vary greatly, from simple Bash wrappers around xrandr to more sophisticated tools with configuration file support, but all share the goal of making display management more accessible. It gained traction as a convenient tool for quickly switching display modes or setting up project presentations without extensive command-line knowledge.
SEE ALSO
xrandr(1), arandr(1), nvidia-settings(1), gnome-control-center(1)