dotwryn/config/xserver/set_randr_layout

20 lines
440 B
Bash
Executable File

#!/bin/zsh
source $HOME/.wryn/env/env.zsh
XSERVER_DIR="$DOTWRYN/config/xserver"
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