diff options
-rwxr-xr-x | autodetect.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/autodetect.sh b/autodetect.sh index 23fb26f..0b1ed83 100755 --- a/autodetect.sh +++ b/autodetect.sh @@ -81,8 +81,11 @@ EXT1_MAX="$(echo "$XRANDR" | get_resolution "$EXT1_NAME")" EXT2_MAX="$(echo "$XRANDR" | get_resolution "$EXT2_NAME")" ## Save windows' positions before autodetection +## ... but only in session on main X server [ ! -d "$SAVEPATH" ] && mkdir -p "$SAVEPATH" -"$PROG_PATH"/wpos.sh save "$HASH" +if [ "$DISPLAY" = ":0.0" -o "$DISPLAY" = ":0" ]; then + "$PROG_PATH"/wpos.sh save "$HASH" +fi ## Main "profiles" logic ## Start with some special command |