diff options
Diffstat (limited to 'bin/.local')
-rwxr-xr-x | bin/.local/bin/workspace | 7 |
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() { |