ref: ee24de400c626e4c0cbc057dd6e47f0013961fc8
dir: /groupsbar/
#!/usr/bin/env bash # Number of groups panels=6 declare -a item # This is where webkit browsers currently break on the bar # lsgrp 2 | tail -n1 gets something called `WebKitProcess` which is unmapped for (( i = 1; i <= $panels; i++ )); do groups=$(lsgrp "$i" | tail -n1) if test "$groups" = "WebKitProcess"; then xprop -id "$groups" -remove _WM_GROUP groups="$(lsgrp 2 | tail -n1)" fi if [[ $groups != "" ]]; then if wattr m "$groups"; then item[$i]="◉" else item[$i]="◍" fi else item[$i]="◌" fi result+=${item["$i"]} done printf '%s\n' "—${result[@]}—" > $XDG_RUNTIME_DIR/statusbar/groups