# Helper for multiple monitors (based on xrandr) The [[xrandr.lua|xrandr.lua]] script helps when dealing with multiple monitors. Using this snippet you can set a keybinding where you swap to all possible arrangements of monitors. The process of setting up this script is as follows: 1. Create a file called `xrandr.lua` in your file system (preferably in awesome's folder) with the [[script|xrandr.lua]] content. 2. Import the script in your `rc.lua` ```lua local xrandr = require("xrandr") ``` 3. Create a keybinding to the script in the `globalkeys` table Pressing this key binding will open a popup with a possible screen arrangement. Pressing the key again will replace this popup with the next possibility, eventually arriving at "keep the current configuration". If the key is not pressed again within four seconds, the configuration described in the current popup is applied. ```lua awful.key({}, "Some Key", function() xrandr.xrandr() end) ```