<file_sep>#!/bin/sh
 Xsetup - run as root before the login dialog appears

/usr/bin/xrandr --current | grep -E "^DP-1 connected "
if [ $? -eq 0 ]; then
  echo "DP-1 found"
  sleep 1s 
  /usr/bin/xrandr --output "$(xrandr -q|grep -Eo 'eDP-[0-9]')" --off
  /usr/bin/xrandr --output 'DP-1' --auto --primary
fi
<file_sep># Systemwide Config Files
### _This repo supplements my dotfile repo. It contains configuration files and binaries that should not be user-writable for security's sake._

NOTE: As it is now, the structure of this repo as well as it's accompanying scripts are just provisional. This might or might not be transfered to Chef or a custom solution in the future.
<file_sep>#!/bin/bash

STORE=$HOME/.localSysConfStore

echo $(dirname $1) >> $STORE/.__META__$(basename $1)
cp $1 $STORE/
<file_sep>#! /usr/bin/bash

export DISPLAY=:0
export XAUTHORITY=/home/dan/.Xauthority

function connect(){
    xrandr --output "$(xrandr -q|grep -Eo 'eDP-[0-9]')" --off
    xrandr --output 'DP-1' --auto --primary
}

function disconnect(){
      xrandr --auto
}

xrandr | grep -E "^DP-1 connected" &> /dev/null && connect || disconnect
<file_sep>/home/fabian/bin
