aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2022-11-17 10:56:25 -0800
committerclarkzjw <[email protected]>2022-11-17 10:56:25 -0800
commitd2d735742ca61b211c9b48a2209d36395daebcf4 (patch)
treebda27729a1bbac3ab354a1f10d4885899cdbf967 /dot_config/i3/scripts/executable_literal_empty_workspace
parenta6d2e5e6fb9adc84c32e86630b4846b1765c7d77 (diff)
downloaddotfiles-d2d735742ca61b211c9b48a2209d36395daebcf4.tar.gz
+ add existing config
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)