dotwryn/config/xorg/set_randr_layout

20 lines
446 B
Plaintext
Raw Normal View History

#!/bin/zsh
2021-09-15 07:48:37 +00:00
source "$HOME/.config/wryn/env/env.zsh"
2021-02-25 00:38:02 +00:00
XSERVER_DIR="$DOTWRYN/config/xorg"
2019-09-26 16:13:45 +00:00
2019-12-31 21:26:32 +00:00
AT_HOME(){
xrandr -q | grep -q 'DP2-1 connected' && xrandr -q | grep -q '3840';
2020-01-23 23:08:28 +00:00
}
CONNECTED_TO_MONITOR() {
xrandr -q | grep ' connected' | grep -v 'eDP1' -q;
2019-12-31 21:26:32 +00:00
}
2019-12-31 21:26:32 +00:00
if AT_HOME; then
"$XSERVER_DIR/screenlayout/homedock.sh";
2020-01-23 23:08:28 +00:00
elif CONNECTED_TO_MONITOR; then
"$XSERVER_DIR/screenlayout/hdmidock.sh" '--right-of';
else;
"$XSERVER_DIR/screenlayout/undock.sh";
fi