summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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() {