# CloneScreen on PresenterPCs

Presentation PCs have a habit of displaying the primary screen on the wrong device. Furthermore, the workspace is extended by default instead of mirrored.

These issues can be resolved using the 'misc_clonescreen' variable.  
If the login screen appears on the wrong device, this can be corrected using the `dual_screen` variable.  
Furthermore, the display devices are mirrored by default instead of extended.

If the cabling does not properly support large screen resolutions, the desired resolution and refresh rate can be set.

## Configuration / Variables

  * **misc_clonescreen**  
    This flag indicates whether to prepare clonescreen mode.  
    If set to `true` clonescreen will be default.  
    Type: *Boolean*  
    Values:
    * `false` <-- (default)
    * "username"
  * **misc_clonescreen_mode**  
    This variable specifies the resolution and frequency of display.  
    Default: "1920x1080@60"  
    Type: *String*
  * **dual_screen**  
    Array with X11 and Wayland naming of desired primary display.  
    Type: *String*  
    Example: [DisplayPort-3, DP-4]
  * **audio_output**  
    Array of audio-output device to be selected.  
    Example: [pci-0000_00_1f.3, analog-stereo]


## Example

* Hosts in group `classroom` will be clonescreen PCs.
* Screen will be cloned and mode 1920x1080@60 (default) will be selected.
* On host with IP 10.0.2.80 screen resolution is limited to 1024x768 at 60 Hertz
* Audio output HDMI (default) is selected.
* On host with IP 10.0.5.80 audio out is preset to analog-stereo
* On Hosts with IP 10.0.3.80 primary screen will be swapped to device with name `DisplayPort-3` (X11) / `DP-4` (Wayland) 

inventory.yml
```
classroom:
  hosts:
    10.0.2.80:
      misc_clonescreen_mode: 1024x768@60
    10.0.3.80:
      dual_screen: [DisplayPort-3, DP-4]
    10.0.4.80:
    10.0.5.80:
      audio_output: [pci-0000_00_1f.3, analog-stereo]
    10.0.6.80:
  vars:
    misc_clonescreen: true
```
