2020-05-09 13:24:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-05-13 08:47:11 +00:00
|
|
|
format_workspaces() {
|
|
|
|
while read -r line; do
|
|
|
|
echo "$line" \
|
|
|
|
| sed 's/__active__/⬤/g' \
|
|
|
|
| sed 's/__urgent__/⬤/g' \
|
|
|
|
| sed 's/__hidden__/⬤/g' \
|
|
|
|
| sed 's/__empty__/⭕/g' \
|
|
|
|
| perl -pe 's/((?:%{F#888974*?}%{A1:.*} __empty__ %{A}%{F-} ?)*)(?!.*\1)//g'
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-09 13:24:23 +00:00
|
|
|
if [ "$MONITOR" = "HDMI-A-0" ]; then
|
2020-05-12 12:53:22 +00:00
|
|
|
#while true; do
|
2020-05-13 08:47:11 +00:00
|
|
|
tail -F /tmp/xmonad-state-bar0 | stdbuf -o0 cat | format_workspaces
|
2020-05-12 12:53:22 +00:00
|
|
|
#done
|
2020-05-09 13:24:23 +00:00
|
|
|
else
|
2020-05-12 12:53:22 +00:00
|
|
|
#while true; do
|
2020-05-13 08:47:11 +00:00
|
|
|
tail -F /tmp/xmonad-state-bar1 | stdbuf -o0 cat | format_workspaces
|
2020-05-12 12:53:22 +00:00
|
|
|
#done
|
2020-05-09 13:24:23 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#while true; do
|
|
|
|
#if read -r line </tmp/.xmonad-state-bar0; then
|
|
|
|
#echo "$line"
|
|
|
|
#fi
|
|
|
|
#done
|