1 files changed, 48 insertions(+), 0 deletions(-)

A => README.md
A => README.md +48 -0
@@ 0,0 1,48 @@ 
+disp
+====
+
+`disp` saves and restores monitor layouts.
+
+To use, set up your displays the way you want them laid out with your usual
+tool (e.g., xrandr, grandr, ...) and then call it with `-s` to save the 
+layout.  Then, whenever you want to load the layout, call disp with `-l`.  
+
+`disp` can be run in daemon mode with `-d` to have disp listen for display changes
+and automatically restore the layout.
+
+Examples
+--------
+
+`disp -h` prints usage instructions
+
+`disp -p` prints current the currently configured layout; this is what would
+get saved with the `-s` command.
+
+`disp -s` saves the current layout.  Configurations are stored in
+`$XDG_CONFIG_HOME/disp/config` as a JSON file.
+
+`disp -l` restores a layout from the config file. Only exact matches are
+restored; this means exactly the same monitors, and the same *combination* of
+connected monitors, will be restored from the config file.  For example, if one
+monitor is turned off, the layout will not match any configuration in the
+config file, and no layout will be performed.  However, this means that
+multiple layouts can be managed using the same monitors by changing the number
+of connected monitors.
+
+`disp -d` runs disp in daemon mode, where it will watch for and react to
+changes.  This is the main reason for disp; to automatically restore layouts
+when a laptop is docked, similar to how OSX and Windows do.
+
+`disp -k` kill running daemon; the PID file is stored in a file called
+`disp.pid` in the `xdg-user-dir RUNTIME` directory.
+
+With no args, prints the known displays.  
+
+Caveats
+-------
+
+This is a simple script, built around my system.  At the time of this writing,
+it's been tested nowhere else.  There are no guarantees that it will work on
+your system; in fact, I'm going to guess that it doesn't. However, if it
+doesn't, shoot me a ticket with as much information as you can, and I'll see
+what I can do.  Or, if you fix it, send me a pull request and I'll merge it.