.config/herbstluftwm/panel.sh

This commit is contained in:
Tom Willemsen 2012-03-27 21:03:41 +02:00
parent c70f9f2730
commit 209a39c387

View file

@ -31,31 +31,24 @@ function print_tags() {
for i in "${TAGS[@]}" ; do for i in "${TAGS[@]}" ; do
if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then
echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($selcolor)^ro(${tag_width}x$height)^fg()"
elif [[ "${TAGS2[@]}" == *"+${i:1}"* ]]; then elif [[ "${TAGS2[@]}" == *"+${i:1}"* ]]; then
echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($locolor)^ro(${tag_width}x$height)^fg()"
else else
case ${i:0:1} in case ${i:0:1} in
'#') '#')
echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($selcolor)^ro(${tag_width}x$height)^fg()"
;; ;;
'+') '+')
echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($locolor)^ro(${tag_width}x$height)^fg()"
;; ;;
':') ':')
echo -n "^bg($hicolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($hicolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($hicolor)^ro(${tag_width}x$height)^fg()"
;; ;;
'!') '!')
echo -n "^bg($urcolor)^fg(#000000) ${i:1} ^fg()^bg()" echo -n "^bg($urcolor)^fg(#000000) ${i:1} ^fg()^bg()"
# echo -n "^fg($urcolor)^ro(${tag_width}x$height)^fg()"
;; ;;
*) *)
echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()" echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()"
# echo -n "^bg()^fg($bgcolor)^ro(${tag_width}x$height)^fg()"
;; ;;
esac esac
fi fi
@ -84,7 +77,6 @@ function print_mailboxes() {
fi fi
mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()" mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()"
# echo -n "^fg($mailcolor)^ro(${tag_width}x$height)^fg()$separator"
done done
mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g') mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g')
let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10 let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10
@ -143,7 +135,6 @@ herbstclient pad $monitor2 -5 -5 -5 -5
# find out event origin # find out event origin
case "${cmd[0]}" in case "${cmd[0]}" in
tag*) tag*)
#echo "reseting tags" >&2
TAGS=( $(herbstclient tag_status $monitor) ) TAGS=( $(herbstclient tag_status $monitor) )
TAGS2=( $(herbstclient tag_status $monitor2) ) TAGS2=( $(herbstclient tag_status $monitor2) )
;; ;;