summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2020-02-29 12:23:18 +0000
committerUrbain Vaes <urbain@vaes.uk>2020-02-29 12:23:18 +0000
commitebe9521c37b97959df974f8adeb4c7bfed0a527a (patch)
tree4d794a5ec142433d9b19eec7295610bef37df4bc /bin
parentfcac7f830ce833ad74298a88a07c77aad9277fb6 (diff)
Fix i3 script
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() {