added layout existance check

This commit is contained in:
Tomas Baca 2018-11-03 11:08:19 +01:00
parent 3dc873a755
commit 4f24f133b7

View File

@ -91,6 +91,10 @@ fi
LAYOUT_FILE=$LAYOUT_PATH/layout-"$LAYOUT_NAME".json LAYOUT_FILE=$LAYOUT_PATH/layout-"$LAYOUT_NAME".json
if [ ! -f "$LAYOUT_FILE" ]; then
exit
fi
# get current workspace ID # get current workspace ID
WORKSPACE_ID=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num' | cut -d"\"" -f2) WORKSPACE_ID=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num' | cut -d"\"" -f2)