dotwryn/config/xorg/set_randr_layout
2021-02-24 17:38:02 -07:00

20 lines
442 B
Bash
Executable File

#!/bin/zsh
source "$HOME/.config/wryn/env/env"
XSERVER_DIR="$DOTWRYN/config/xorg"
AT_HOME(){
xrandr -q | grep -q 'DP2-1 connected' && xrandr -q | grep -q '3840';
}
CONNECTED_TO_MONITOR() {
xrandr -q | grep ' connected' | grep -v 'eDP1' -q;
}
if AT_HOME; then
"$XSERVER_DIR/screenlayout/homedock.sh";
elif CONNECTED_TO_MONITOR; then
"$XSERVER_DIR/screenlayout/hdmidock.sh" '--right-of';
else;
"$XSERVER_DIR/screenlayout/undock.sh";
fi