AUTORANDR(1)
π AUTORANDR β the autorandr(1) glow-up π
okay bestie, sit down, hydrate, because this one is actually iconic. it's autorandr, a General Commands Manual situation, and it's about to make your monitors behave. no cap. β¨
β¨ NAME β¨
autorandr β automatically select a display configuration based on connected devices π₯οΈπ¦
πΈ SYNOPSIS πΈ
autorandr [OPTION] [PROFILE]
that's it. that's the whole vibe. option, then maybe a profile name. slay.
π DESCRIPTION π
so like, this program automatically detects your connected display hardware and then loads an appropriate X11 setup using xrandr. it's giving "i know what monitors you plugged in and i already handled it." π
it also supports the use of display profiles for different hardware setups, so you can have one for "laptop at desk", one for "docking station era", one for "chaos", whatever you want. main character energy for every setup.
Autorandr also includes several virtual configurations including off, common, clone-largest, horizontal, and vertical. see the documentation for explanation of each. iykyk. π
π₯ OPTIONS π₯
-h,--helpβ Display help text and exit. the "hey bestie what are you" button.-c,--changeβ Automatically load the first detected profile. it just knows. β¨-d,--default PROFILEβ Make profile PROFILE the default profile. The default profile is used if no suitable profile can be identified. Else, the current configuration is kept.-l,--load PROFILEβ Load profile PROFILE. serving.-s,--save PROFILEβ Save the current setup to profile PROFILE. screenshot but for your whole monitor situation.-r,--remove PROFILEβ Remove profile PROFILE. bye girl π--batchβ Runautorandrfor all users with active X11 sessions. group-chat-wide deployment fr fr.--currentβ List only the current (active) configuration(s).--configβ Dump the variable values of your currentxrandrsetup.--cycleβ Cycle through all detected profiles. round and round we go π--debugβ Enable verbose output. it will NOT stop talking and honestly? we love that.--detectedβ List only the detected (i.e. available) configuration(s).--dry-runβ Don't change anything, only print thexrandrcommands. window shopping, basically. ποΈ--fingerprintβ Fingerprint the current hardware setup.--match-edidβ Match displays based on edid instead of name.--ignore-lidβ By default, closed lids are considered as disconnected if other outputs are detected. This flag disables this behaviour. (so like, your laptop being shut normally counts as "not here" β this turns that off.)--forceβ Force loading or reloading of a profile.--listβ List all profiles.--skip-options [OPTION] ...β Set a comma-separated list ofxrandrarguments to skip both in change detection and profile application. Seexrandr(1)forxrandrarguments.--versionβ Show version information and exit. π
ποΈ FILES ποΈ
Configuration files are searched for in the autorandr directory in the colon separated list of paths in $XDG_CONFIG_DIRS β or in /etc/xdg if that var is not set. They are then looked for in ~/.autorandr and if that doesn't exist, in $XDG_CONFIG_HOME/autorandr or in ~/.config/autorandr if that var is unset. the search order is lowkey doing the most but it's fine, it's thorough. π§
In each of those directories it looks for directories with config and setup in them. It is best to manage these files with the autorandr utility. (translation: don't hand-edit, let the tool do its thing bestie π«Ά)
βοΈ DEFAULT OPTIONS βοΈ
You can store default values for any option in an INI-file located at ~/.config/autorandr/settings.ini. In a config section, you may place any default values in the form option-name=option-argument.
so cute. so configurable. so yours. π
πͺ HOOK SCRIPTS πͺ
Four more scripts can be placed in the configuration directory:
postswitchβ Executed after a mode switch has taken place. This can be used to notify window managers or other applications about the switch.preswitchβ Executed before a mode switch takes place.postsaveβ Executed after a profile was stored or altered.predetectβ Executed beforeautorandrattempts to runxrandr.
These scripts must be executable and can be placed directly in the configuration directory, where they will always be executed, or in the profile subdirectories, where they will only be executed on changes regarding that specific profile. β¨
Instead (or in addition) to these scripts, you can also place as many executable files as you like in subdirectories called script_name.d (e.g. postswitch.d). drop a whole folder of them, go off. π
Some of autorandr's state is exposed as environment variables prefixed with AUTORANDR_, such as: AUTORANDR_CURRENT_PROFILE, AUTORANDR_CURRENT_PROFILES, AUTORANDR_PROFILE_FOLDER, and AUTORANDR_MONITORS with the intention that they can be used within the hook scripts.
β οΈ the one kink is that duringpreswitch,AUTORANDR_CURRENT_PROFILEis reporting the upcoming profile rather than the current one. not a bug, just a plot twist. don't let it jumpscare you. π
π AUTHOR π
Phillip Berndt <phillip.berndt@googlemail.com>
See https://github.com/phillipberndt/autorandr for a full list of contributors.
π REPORTING BUGS π
Report issues upstream on GitHub: https://github.com/phillipberndt/autorandr/issues
Please attach the output of xrandr --verbose to your bug report if appropriate. (yes, actually attach it, it saves everyone a whole back-and-forth π)
π SEE ALSO π
For examples, advanced usage (including predefined per-profile & global hooks and wildcard EDID matching), and full documentation, see https://github.com/phillipberndt/autorandr.
and that's the page bestie π it's from the General Commands Manual, it's AUTORANDR(1), and it's genuinely so good. go forth, plug in a monitor, let it cook. mwah πβ¨
π¦ where this page comes from
- alpine 3.24: autorandr-doc 1.15-r2 Β· GPL-3.0-or-later
- arch rolling: autorandr 1.15-2 Β· GPL-3.0-or-later
- debian trixie: autorandr 1.15-1 Β· GPL-3.0-or-later
- fedora 43: autorandr 1.15-3.fc43 Β· GPL-3.0-only
- fedora 44: autorandr 1.15-5.fc44 Β· GPL-3.0-only
- nixpkgs unstable: autorandr 1.15
- ubuntu noble: autorandr 1.14-2 Β· GPL-3.0-or-later
- ubuntu questing: autorandr 1.15-1
- ubuntu resolute: autorandr 1.15-1build1 Β· GPL-3.0-or-later
- ubuntu stonking: autorandr 1.15-1build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms