summaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm/panel.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/herbstluftwm/panel.sh')
-rwxr-xr-x.config/herbstluftwm/panel.sh19
1 files changed, 7 insertions, 12 deletions
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 31716b9..b9f0487 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -31,31 +31,24 @@ function print_tags() {
for i in "${TAGS[@]}" ; do
if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then
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
echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()"
-# echo -n "^fg($locolor)^ro(${tag_width}x$height)^fg()"
else
case ${i:0:1} in
'#')
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 "^fg($locolor)^ro(${tag_width}x$height)^fg()"
;;
':')
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 "^fg($urcolor)^ro(${tag_width}x$height)^fg()"
;;
*)
echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()"
-# echo -n "^bg()^fg($bgcolor)^ro(${tag_width}x$height)^fg()"
;;
esac
fi
@@ -65,8 +58,12 @@ function print_tags() {
function print_mailboxes() {
declare -A mailnames
- mailboxes=(ninthfloor gmail arch aethon ryuslash.org)
- mailnames=([ninthfloor]="9f" [gmail]="gm" [aethon]="aet" [ryuslash.org]="ryu")
+ mailboxes=(ninthfloor gmail aethon ryuslash.org)
+ mailnames=(
+ [ninthfloor]="9f"
+ [gmail]="gm"
+ [aethon]="aet"
+ [ryuslash.org]="ryu")
mailtxt=""
for j in "${mailboxes[@]}"; do
mailfile="$HOME/documents/mail/$j/inbox/new/"
@@ -80,10 +77,9 @@ function print_mailboxes() {
fi
mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()"
-# echo -n "^fg($mailcolor)^ro(${tag_width}x$height)^fg()$separator"
done
mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g')
- let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+20
+ let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10
echo -n "^p(_RIGHT)^p(-$mailtxt_width)$mailtxt"
}
@@ -139,7 +135,6 @@ herbstclient pad $monitor2 -5 -5 -5 -5
# find out event origin
case "${cmd[0]}" in
tag*)
- #echo "reseting tags" >&2
TAGS=( $(herbstclient tag_status $monitor) )
TAGS2=( $(herbstclient tag_status $monitor2) )
;;