diff options
Diffstat (limited to 'dot_config/i3/scripts/executable_literal_empty_workspace')
-rw-r--r-- | dot_config/i3/scripts/executable_literal_empty_workspace | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dot_config/i3/scripts/executable_literal_empty_workspace b/dot_config/i3/scripts/executable_literal_empty_workspace new file mode 100644 index 0000000..b962cde --- /dev/null +++ b/dot_config/i3/scripts/executable_literal_empty_workspace | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | MAX_DESKTOPS=20 | ||
4 | |||
5 | WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS}) | ||
6 | |||
7 | EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \ | ||
8 | echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1) | ||
9 | |||
10 | i3-msg workspace ${EMPTY_WORKSPACE} | ||