yambar herbst helper
This commit is contained in:
parent
e757262150
commit
9f80403414
1 changed files with 27 additions and 0 deletions
27
dot_config/herbstluftwm/executable_herbsttag
Normal file
27
dot_config/herbstluftwm/executable_herbsttag
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
monitor="$1"
|
||||||
|
|
||||||
|
monitor_status() {
|
||||||
|
for tag in $(herbstclient tag_status "$monitor")
|
||||||
|
do
|
||||||
|
case "${tag:0:1}" in
|
||||||
|
'#'|'+') echo "tag_${tag:1}_status|string|viewed" ;;
|
||||||
|
'%'|'-') echo "tag_${tag:1}_status|string|on_other" ;;
|
||||||
|
'!') echo "tag_${tag:1}_status|string|urgent" ;;
|
||||||
|
*)echo "tag_${tag:1}_status|string|hidden" ;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor_status
|
||||||
|
|
||||||
|
while IFS=$'\t' read -ra event
|
||||||
|
do
|
||||||
|
case ${event[0]} in
|
||||||
|
tag_changed) monitor_status ;;
|
||||||
|
*) continue ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
done < <(herbstclient --idle)
|
Loading…
Add table
Reference in a new issue