diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2024-06-11 22:19:29 +0200 | 
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-11 22:19:29 +0200 | 
| commit | f6cce8f1ae6361117e8689001dc0344e0d3b9b77 (patch) | |
| tree | 907ac21c14aea89d2155ca68279c36552471ff6f /.config | |
| parent | bd337833342ca7ac4a35a416806bcd34d82ed045 (diff) | |
eww: Fixs because they broke JQ
Diffstat (limited to '.config')
| -rwxr-xr-x | .config/eww/scripts/active-workspace-listener | 20 | ||||
| -rwxr-xr-x | .config/eww/scripts/workspace-list-listener | 14 | 
2 files changed, 19 insertions, 15 deletions
| diff --git a/.config/eww/scripts/active-workspace-listener b/.config/eww/scripts/active-workspace-listener index f8704b8..108c08a 100755 --- a/.config/eww/scripts/active-workspace-listener +++ b/.config/eww/scripts/active-workspace-listener @@ -2,13 +2,15 @@  readonly IPC="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" -{ -	hyprctl -j monitors -	socat -u UNIX-CONNECT:"$IPC" - | while read -r _ -	do -		case "${_%>>*}" in +report() { +	hyprctl -j monitors | jq -cr '[.[] | .activeWorkspace.id % 10]' +} + +report +socat -u UNIX-CONNECT:"$IPC" - | while read -r _ +do +	case "${_%>>*}" in  		workspace|moveworkspace) -			hyprctl -j monitors -		esac -	done -} | jq -cr '[.[] | .activeWorkspace.id % 10]' +			report +	esac +done diff --git a/.config/eww/scripts/workspace-list-listener b/.config/eww/scripts/workspace-list-listener index c7ff7fb..6dc3e4b 100755 --- a/.config/eww/scripts/workspace-list-listener +++ b/.config/eww/scripts/workspace-list-listener @@ -10,9 +10,11 @@ hyprctl -j workspaces | jq -cr '  socat -u UNIX-CONNECT:"$IPC" - \  	| stdbuf -oL grep -E '^(create|destroy)workspace>>' \ -	| while read -r _; do hyprctl -j workspaces; done \ -	| jq -cr ' -		[.[].id] -		| group_by(. / 10 | floor) -		| [.[] | map(. % 10) | sort_by(.)] -	' +	| while read -r _ +	do +		hyprctl -j workspaces | jq -cr ' +			[.[].id] +			| group_by(. / 10 | floor) +			| [.[] | map(. % 10) | sort_by(.)] +		' +	done |