From ebe9521c37b97959df974f8adeb4c7bfed0a527a Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 12:23:18 +0000 Subject: Fix i3 script --- bin/.local/bin/workspace | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') 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() { -- cgit v1.2.3