Last active
August 29, 2015 14:07
-
-
Save Mischi/42813e6346d6398998f8 to your computer and use it in GitHub Desktop.
my randrd script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CONNECTIONSTATE=$1 | |
OUTPUT=$2 | |
EDIDHASH=$3 | |
WPATH=$HOME/pictures/wallpapers | |
WALLPAPERS="$WPATH/sunrise-dawn-wallpaper-landscape.jpg" | |
KBLAYOUT=de | |
LIDSUSPEND=1 | |
if [ $CONNECTIONSTATE = "init" ]; then | |
OUTPUT=VGA1 | |
fi | |
case $EDIDHASH in | |
"9030ffc857dc906a635d1da0799b22d25e2b814e") | |
CUR="FH B221" | |
WALLPAPERS="$WALLPAPERS $WPATH/cyber-boy.jpg" | |
xrandr --output LVDS1 --auto --output $OUTPUT --auto --above LVDS1 | |
;; | |
"67034f8cfb71cebf10c9bc21dd9eac9f06512861" | "9db9be78d92e1d0358244a2cc3ff7a019f5ca3a5") | |
CUR="Home" | |
WALLPAPERS="$WALLPAPERS $WPATH/fight.jpg" | |
KBLAYOUT=us | |
xrandr --output LVDS1 --auto --output $OUTPUT --auto --right-of LVDS1 | |
;; | |
"d35b12d376e4d14bc0859692bd5b269365738880") | |
CUR="Home 2 external displays" | |
WALLPAPERS="$WALLPAPERS $WPATH/fight.jpg" | |
KBLAYOUT=us | |
LIDSUSPEND=0 | |
xrandr --output LVDS1 --off --output HDMI1 --auto --primary --output VGA1 --auto --left-of HDMI1 | |
;; | |
*) | |
CUR="Default" | |
xrandr --auto | |
;; | |
esac | |
feh --bg-scale $WALLPAPERS | |
setxkbmap $KBLAYOUT | |
sudo sysctl machdep.lidsuspend=$LIDSUSPEND | |
logger "$OUTPUT $CONNECTIONSTATE: Loading \"$CUR\" xrandr profile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment