I3 new worksapce on specific Monitor

Hello,
quick question:
I have bound my even i3 workspaces to my left monitor, and my uneven workspaces to my right monitor.
Now I would like to open a new workspace with a shortcut matching with the monitor I am on.
I have found a script that increments my new workspace:
If I am on my left monitor on ws 2 I have a new on my right (ws 3), but I would like a new WS on my left: ws 6.

#!/usr/bin/env bash

MAX_DESKTOPS=20

WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})

EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F:  '{print int($2)}' ; \
            echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
WS=${EMPTY_WORKSPACE}
i3-msg workspace ${EMPTY_WORKSPACE}

If I add a one to EMPTY_WORKSPACE, It doesn’t work:

#!/usr/bin/env bash

MAX_DESKTOPS=20

WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})

EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F:  '{print int($2)}' ; \
            echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
WS=${EMPTY_WORKSPACE}+1
i3-msg workspace ${EMPTY_WORKSPACE}

Syntax Error:

Replace:

WS=${EMPTY_WORKSPACE}

with:

WS=$((EMPTY_WORKSPACE + 1))

I have 9 workspaces and it gives me a value of 11. So I suspect you might not need the +1.

It doesn’t so what I want, but thanks for the correction.
At least now i know where to add a number

Using “marks” is another way of manipulating i3 work spaces, this may be of use to you: