aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/i3/scripts/executable_literal_empty_workspace')
-rw-r--r--dot_config/i3/scripts/executable_literal_empty_workspace10
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
3MAX_DESKTOPS=20
4
5WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
6
7EMPTY_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
10i3-msg workspace ${EMPTY_WORKSPACE}
Powered by cgit v1.2.3 (git 2.41.0)