summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2020-03-02 10:42:03 +0000
committerUrbain Vaes <urbain@vaes.uk>2020-03-02 10:42:03 +0000
commit104ca1e11721518f9224527459e8506a858692c9 (patch)
treec81b075c2203a62c7312a66fd7dc35b95c1a19d7 /bin
parentcc688055484c2e17d776c5e7254b33e3f4d7816d (diff)
parentebe9521c37b97959df974f8adeb4c7bfed0a527a (diff)
Merge branch 'master' of github.com:urbainvaes/dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/workspace7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace
index ad378ef..4f2ab67 100755
--- a/bin/.local/bin/workspace
+++ b/bin/.local/bin/workspace
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
-# List of workspaces
+# List of workspaces: (id, number, name)
workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN {
RS="(},{)|(\\[{)|(}\\])";
- FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")"
+ FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})"
}
$0 !~ "^\\s*$" {
gsub(/"/, "", $4)
- print $2, $4, $8, $11
+ print $4, $6
+
}' | sort)
act_on_container() {