diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-03-02 10:42:03 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-03-02 10:42:03 +0000 |
commit | 104ca1e11721518f9224527459e8506a858692c9 (patch) | |
tree | c81b075c2203a62c7312a66fd7dc35b95c1a19d7 /bin/.local | |
parent | cc688055484c2e17d776c5e7254b33e3f4d7816d (diff) | |
parent | ebe9521c37b97959df974f8adeb4c7bfed0a527a (diff) |
Merge branch 'master' of github.com:urbainvaes/dotfiles
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() { |