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