New backup 2025-03-11 21:15:06
This commit is contained in:
parent
0fc4ce4573
commit
03d63c093e
1 changed files with 10 additions and 5 deletions
|
@ -158,6 +158,7 @@ app_fmt='%-15.15s'
|
|||
title_fmt='%s'
|
||||
|
||||
applist_array=()
|
||||
applist=""
|
||||
swaymsg -t get_tree |
|
||||
# get list of windows as tab-separated columns
|
||||
jq -r "$jq_get_windows | $jq_windows_to_tsv" |
|
||||
|
@ -167,19 +168,23 @@ column -s $'\t' -o $'\t' -t | while IFS=$'\t' read -r win_id ws_name app_name wi
|
|||
icon=$( get_icon "$app_name" "$pid" )
|
||||
[[ "$verbose" ]] && printf "[%s]=%s\n" "$app_name" "$icon" >&2
|
||||
# shellcheck disable=SC2059
|
||||
applist_array_item=$(jq -n --arg icon "${icon}" --arg name "${app_name##*.}}" '{icon: $icon,name: $name}')
|
||||
applist_array_item=$(jq -n --arg icon "${icon}" --arg name "${app_name##*.}" '{icon: $icon,name: $name}')
|
||||
# echo "${applist_array_item}"
|
||||
applist_array+=("${applist_array_item}")
|
||||
# echo "${applist_array[@]}"
|
||||
applist=$(printf '%s\n' "${applist_array[@]}" | jq -s .)
|
||||
# echo ${applist}
|
||||
# jq -n --arg icon "${icon}" --arg name "${app_name##*.}" '{icon: $icon,name: $name}'
|
||||
# printf "img:$icon:text:${id_fmt}\t${app_fmt}\t${ws_fmt}\t${title_fmt}\n" \
|
||||
# "$win_id" \
|
||||
# "${app_name##*.}" \
|
||||
# "$ws_name" \
|
||||
# "$win_title"
|
||||
done
|
||||
printf '%s\n' "${applist_array[@]}"
|
||||
applist=$(printf '%s\n' "${applist_array[@]}" | jq -s .)
|
||||
echo ${applist_array[@]}
|
||||
done | echo "${applist}"
|
||||
#echo "${applist_array[@]}"
|
||||
#printf '%s\n' "${applist_array[@]}"
|
||||
#echo "${applist_array[@]}"
|
||||
#applist=$(printf '%s\n' "${applist_array[@]}" | jq -s .)
|
||||
#echo ${applist}
|
||||
#sort -k3 -k2
|
||||
#wofi --cache-file=/dev/null --insensitive --allow-images --show dmenu --prompt='Focus a window'
|
||||
|
|
Loading…
Add table
Reference in a new issue