diff options
author | David Runge <david.runge@frqrec.com> | 2014-01-18 23:16:05 +0100 |
---|---|---|
committer | David Runge <david.runge@frqrec.com> | 2014-01-18 23:16:05 +0100 |
commit | 158bca458a49182ddd7804647cc01c2084e91a9f (patch) | |
tree | b8200e3517b5c3216c9249e56bd229a038f05184 | |
parent | b229ae572ae9bbec1bf728f527a3582999c984f5 (diff) | |
download | dotfiles-158bca458a49182ddd7804647cc01c2084e91a9f.tar.gz dotfiles-158bca458a49182ddd7804647cc01c2084e91a9f.tar.bz2 dotfiles-158bca458a49182ddd7804647cc01c2084e91a9f.tar.xz dotfiles-158bca458a49182ddd7804647cc01c2084e91a9f.zip |
Moving setting up screen and setting dpms to an own function
-rwxr-xr-x | bin/screensetup | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/screensetup b/bin/screensetup new file mode 100755 index 0000000..b15d63e --- /dev/null +++ b/bin/screensetup @@ -0,0 +1,17 @@ +#!/bin/bash + +#set dpms and screen blanking +xset +dpms +xset s 360 360 + +# Setup screens + +# get info from xrandr +IFS=$'\r\n' connectedOutputs=($(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")) + +#if more than one screen, setup both, using the external left of the internal as primary +if [ ${#connectedOutputs[@]} -gt 1 ]; then + xrandr --output "${connectedOutputs[0]}" --auto --output "${connectedOutputs[1]}" --auto --primary --left-of "${connectedOutputs[0]}" +fi + + |