summaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww')
-rwxr-xr-x.config/eww/scripts/workspace-list-listener13
1 files changed, 4 insertions, 9 deletions
diff --git a/.config/eww/scripts/workspace-list-listener b/.config/eww/scripts/workspace-list-listener
index eb36f8c..d9ac666 100755
--- a/.config/eww/scripts/workspace-list-listener
+++ b/.config/eww/scripts/workspace-list-listener
@@ -7,19 +7,14 @@ jo -a $spaces
socat -u UNIX-CONNECT:"$IPC" - \
| stdbuf -oL grep -E '^(create|destroy)workspace>>' \
- | while IFS= read -r line
+ | while IFS='>>' read -r e _ n
do
- oifs="$IFS"
- IFS='>>'
- set -- $line
- IFS="$oifs"
-
- case "$1" in
+ case "$e" in
c*)
- spaces="`printf '%s\n%s\n' "$spaces" $3 | sort -V`"
+ spaces="`printf '%s\n%s\n' "$spaces" $n | sort -V`"
;;
d*)
- spaces="`echo "$spaces" | grep -v "^$3$"`"
+ spaces="`echo "$spaces" | grep -v "^$n$"`"
;;
esac
jo -a $spaces