🐛 (neodymium/home) fix eww script to get workspaces, now requires workspaces to be sorted
This commit is contained in:
parent
424f4f151d
commit
af6ab87de7
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue