#!/bin/bash

#!/bin/bash

windows=()
workspaces=()
i=0
while read -r k v; do
  windows[$i]="$k"
  i=$i+1
  workspaces[$i]="$v"
done < <(hyprctl clients -j | jq -r '.[]|"\(.pid) \(.workspace.id)"')

for window in ${!windows[@]}; do
  echo $(ps -p ${windows[$window]} -o comm=)
done

test=$(ps -p ${windows[5]} -o comm=)
$(feh /usr/share/icons/Papirus-Dark/128x128/apps/${test}.svg)