2 Automatically select a display configuration based on connected devices
6 This is a compatible Python rewrite of
7 [wertarbyte/autorandr](https://github.com/wertarbyte/autorandr).
9 The original [wertarbyte/autorandr](https://github.com/wertarbyte/autorandr)
10 tree is unmaintained, with lots of open pull requests and issues. I forked it
11 and merged what I thought were the most important changes. If you are searching
12 for that version, see the [`legacy` branch](https://github.com/phillipberndt/autorandr/tree/legacy).
13 Note that the Python version is better suited for non-standard configurations,
14 like if you use `--transform` or `--reflect`. If you use `auto-disper`, you
15 have to use the bash version, as there is no disper support in the Python
16 version (yet). Both versions use a compatible configuration file format, so
17 you can, to some extent, switch between them. I will maintain the `legacy`
18 branch until @wertarbyte finds the time to maintain his branch again.
20 If you are interested in why there are two versions around, see
21 [#7](https://github.com/phillipberndt/autorandr/issues/7),
22 [#8](https://github.com/phillipberndt/autorandr/issues/8) and
24 [#12](https://github.com/phillipberndt/autorandr/issues/12)
25 if you are unhappy with this version and would like to contibute to the bash
28 ## License information and authors
30 autorandr is available under the terms of the GNU General Public License
33 Contributors to this version of autorandr are:
43 * Rasmus Wriedt Larsen
53 ## Installation/removal
54 For Debian-based distributives (including Ubuntu) it is recommended to call `make deb` to obtain package that can be afterwards installed and removed with `dpkg`.
56 On other distributives you can install autorandr by calling `make install` and remove by calling `make uninstall`.
58 If you can contribute packaging script for other distributives, we will appreciate it.
62 Save your current display configuration and setup with:
64 autorandr --save mobile
67 Connect an additional display, configure your setup and save it:
69 autorandr --save docked
72 Now autorandr can detect which hardware setup is active:
79 To automatically reload your setup, just append `--change` to the command line
81 To manually load a profile, you can use the `--load <profile>` option.
83 autorandr tries to avoid reloading an identical configuration. To force the
84 (re)configuration, apply `--force`.
86 To prevent a profile from being loaded, place a script call _block_ in its
87 directory. The script is evaluated before the screen setup is inspected, and
88 in case of it returning a value of 0 the profile is skipped. This can be used
89 to query the status of a docking station you are about to leave.
91 If no suitable profile can be identified, the current configuration is kept.
92 To change this behaviour and switch to a fallback configuration, specify
93 `--default <profile>`.
95 Another script called `postswitch` can be placed in the directory
96 `~/.config/autorandr` (or `~/.autorandr` if you have an old installation) as
97 well as in all profile directories: The scripts are executed after a mode
98 switch has taken place and can notify window managers or other applications
99 about it. The same holds for `preswitch`, which is executed before the switch
100 takes place, and `postsave`, which is executed after a profile was
103 All scripts can also be placed in any of the `$XDG_CONFIG_DIRS`. In addition to
104 the script names themselves, any executables in subdirectories named
105 `script_name.d` (e.g. `postswitch.d`) are executed as well. In scripts, some of
106 autorandr's state is exposed as environment variables prefixed with `AUTORANDR_`.
107 The most useful one is `$AUTORANDR_CURRENT_PROFILE`.
109 ## Apply configuration on login
110 With recent version you typically do not need to add autorandr to `~/.xprofile`, since autostart config file will be added at `/etc/xdg/autostart/autorandr.desktop`. It will select appropriate profile automatically.
112 However, if you need to customize this, you can always disable or modify it by placing alternative desktop file in `~/.config/autostart` or using GUI like `gnome-session-properties`.