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 the monitor I am on.
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.
I I would like to manipulate the script .config/i3/scripts/empty_workspace.sh
for that:
#!/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}
if I run this in the Terminal I find that EMPTY_WORKSPACE ist empty!?