summaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-09-15 13:06:04 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-09-15 13:06:04 +0300
commit7b5c1e65ed5c84f85b7257f56bdc7d3508248edd (patch)
treeb0974dbedcc573b258e28bce6fd23f416f4aa64a /.config/eww
parentc1c4a087b67e905f24f0ffde59cae707352d906b (diff)
eww: Use the power of sed
Diffstat (limited to '.config/eww')
-rwxr-xr-x.config/eww/scripts/active-workspace-listener9
1 files changed, 1 insertions, 8 deletions
diff --git a/.config/eww/scripts/active-workspace-listener b/.config/eww/scripts/active-workspace-listener
index d3d46f2..8a09897 100755
--- a/.config/eww/scripts/active-workspace-listener
+++ b/.config/eww/scripts/active-workspace-listener
@@ -3,11 +3,4 @@
readonly IPC=/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock
hyprctl -j activeworkspace | jq -r '.name'
-socat -u UNIX-CONNECT:"$IPC" - \
- | stdbuf -oL grep '^workspace>>' \
- | while IFS= read -r line
- do
- IFS='>>'
- set -- $line
- echo $3
- done
+socat -u UNIX-CONNECT:"$IPC" - | sed -n 's/^workspace>>//p'