From af6ab87de73af886d435985c13ea0b00b51c3497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Wed, 18 Oct 2023 17:19:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20(neodymium/home)=20fix=20eww=20s?= =?UTF-8?q?cript=20to=20get=20workspaces,=20now=20requires=20workspaces=20?= =?UTF-8?q?to=20be=20sorted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/neodymium/home/wayland/eww/scripts/get-workspaces | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hosts/neodymium/home/wayland/eww/scripts/get-workspaces b/hosts/neodymium/home/wayland/eww/scripts/get-workspaces index 31d5798..860f53f 100755 --- a/hosts/neodymium/home/wayland/eww/scripts/get-workspaces +++ b/hosts/neodymium/home/wayland/eww/scripts/get-workspaces @@ -1,11 +1,9 @@ -#!/bin/bash - EMPTY=$(seq 1 10 | jaq -nRc '[inputs | (. | tostring)] | {(.[]): 0}') # function to get workspaces infos and their window count spaces (){ ACTIVES=$(hyprctl workspaces -j | jaq -c 'map({key: .id | tostring, value: .windows}) | from_entries') - echo $EMPTY $ACTIVES | jaq -src 'add | to_entries | map({id: (.key | tostring), windows: .value})' + echo $EMPTY $ACTIVES | jaq -src 'add | to_entries | map({id: (.key | tostring), windows: .value}) | sort_by(.id | tonumber)' } # print workspaces infos