AUTOMIRROR(1)

πŸ“¦ version 49, in nixos 26.05, nixpkgs unstable

πŸ’… AUTOMIRROR(1) β€” Automatic Display Mirror, bestie edition ✨

okay so this page is from the General Commands Manual, and the command is automirror β€” literally Automatic Display Mirror. πŸͺžβœ¨


πŸŽ€ NAME

automirror β€” Automatic Display Mirror. That's the name, and it ate. πŸ’…

Homepage: https://github.com/schlomo/automirror Buildstatus: https://semaphoreci.com/schlomo/automirror

πŸŒ€ SYNOPSIS

ngl there is literally no synopsis text in the original page β€” it goes straight from SYNOPSIS to DESCRIPTION, and we respect the mystery. 🫢

✨ DESCRIPTION ✨

okay so automirror automatically configures the attached monitors into a mirror configuration that's optimized for the primary display, and it makes all the other outputs scale to that. πŸ‘‘

The primary display is set via:

  • command line as the first argument, e.g. automirror HDMI3
  • the environment variable AUTOMIRROR_PRIMARY_DISPLAY
  • an interactive dialog when called with the -i option, e.g. automirror -i

automirror uses RandR scaling to mirror the primary display to the other displays while driving the other displays at their native resolution. That's the whole slay. πŸ”₯

The author wrote automirror because their laptop has a native resolution of 1600x900, which is not supported by any computer screen or projector. 😭 When they connect a Full HD projector via HDMI and mirror the screen with the Gnome/Unity/XFCE Display Properties, then the highest compatible configuration happens to be 1024x768, which is really not helpful. πŸ’€

In this case automirror will simply configure the HDMI device with 1920x1080 and scale the 1600x900 laptop display. As a result, they stay with the full resolution on the laptop display and it also looks nice on the projector. ✨

Another case is where they work with a 1920x1200 computer monitor and add the 1920x1080 projector as a second display. Again, the common resolution offered by both devices is 1024x768. automirror will recognize the 1920x1200 display as primary display and scale it to 1920x1080 on the secondary display, which is not really noticeable. 🌸

It is recommended to configure a hot key to run automirror so that one can run it even if the display configuration is heavily messed up. In rare cases it might be necessary to run automirror more than once so that xrandr will configure the displays correctly. 🫢


🌈 SCENARIOS

πŸ–₯️ Single Monitor

A single monitor will be configured to its optimum resolution without scaling. clean, simple, iconic. πŸ’…

πŸ–₯️πŸ–₯️ Several Monitors

If several monitors are active, then automirror will first determine the primary display, which is either the builtin laptop monitor (LVDS1) or the monitor with the most lines. πŸ‘€

Then automirror configures all displays at their native resolution. The other displays are configured to mirror the primary display with scaling so that the primary display fills the entire screen. The scaling does not care about aspect ratios! 😭πŸ”₯

🎀 Presentations

Use the -i interactive mode to select the external output and have the laptop screen scale to that. This is especially useful for HiDPI devices. 🫢


πŸŽ€ CONFIGURATION

automirror can be configured via environment variables:

  • AUTOMIRROR_PRIMARY_DISPLAY β€” defaults to LVDS1. If this display is present, then always configure all other displays to mirror that one. The purpose of this variable is to setup automirror to always optimize for your internal laptop display. πŸ’»
  • AUTOMIRROR_NOTIFY_COMMAND β€” defaults to use notify-send(1). Can be set to a command that will be called with a single argument containing a multi-line string. Set to true to disable notifications. πŸ””

πŸ› οΈ DEVELOPMENT

Please add test cases under testdata for everything you want to have covered. πŸ§ͺ

To build automirror, simply run make deb; otherwise you can simply run automirror.sh from the source distribution. Build Requirements are debuild(1), git-dch(1) and ronn http://rtomayko.github.io/ronn/. For Ubuntu/Debian install the devscripts git-buildpackage ruby-ronn make debhelper packages. πŸ“¦

For a release, github-release https://github.com/c4milo/github-release needs to be in your PATH. Run make release. πŸš€


okay bye bestie β€” this was AUTOMIRROR(1), footer-dated January 1980, which is giving time-traveling icon energy πŸ•°οΈπŸ’–

πŸ“¦ where this page comes from