-All scripts can also be placed in any of the `$XDG_CONFIG_DIRS`. In addition to
-the script names themselves, any executables in subdirectories named
-`script_name.d` (e.g. `postswitch.d`) are executed as well. In scripts, some of
-autorandr's state is exposed as environment variables prefixed with `AUTORANDR_`.
-The most useful one is `$AUTORANDR_CURRENT_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`).
+
+If a script with the same name occurs multiple times, user configuration
+takes precedence over system configuration (as specified by the
+[XDG spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html))
+and profile configuration over general configuration.
+
+As a concrete example, suppose you have the files
+
+- `/etc/xdg/autorandr/postswitch`
+- `~/.config/autorandr/postswitch`
+- `~/.config/autorandr/postswitch.d/notify-herbstluftwm`
+- `~/.config/autorandr/docked/postswitch`
+
+and switch from `mobile` to `docked`. Then
+`~/.config/autorandr/docked/postswitch` is executed, since the profile specific
+configuration takes precedence, and
+`~/.config/autorandr/postswitch.d/notify-herbstluftwm` is executed, since
+it has a unique name.
+
+If you switch back from `docked` to `mobile`, `~/.config/autorandr/postswitch`
+is executed instead of the `mobile` specific `postswitch`.
+
+In these scripts, some of autorandr's state is exposed as environment variables
+prefixed with `AUTORANDR_`, such as:
+- `AUTORANDR_CURRENT_PROFILE`
+- `AUTORANDR_CURRENT_PROFILES`
+- `AUTORANDR_PROFILE_FOLDER`
+- `AUTORANDR_MONITORS`
+
+If you experience issues with xrandr being executed too early after connecting
+a new monitor, then you can use a `predetect` script to delay the execution.
+Write e.g. `sleep 1` into that file to make autorandr wait a second before
+running `xrandr`.
+
+### Wildcard EDID matching
+
+The EDID strings in the `~/.config/autorandr/*/setup` files may contain an
+asterisk to enable wildcard matching: Such EDIDs are matched against connected
+monitors using the usual file name globbing rules. This can be used to create
+profiles matching multiple (or any) monitors.