herbstluftwm config cleanup
This commit is contained in:
parent
2cd0786fb6
commit
d1b29f7839
2 changed files with 1 additions and 29 deletions
|
@ -1,35 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
|
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
|
||||||
|
|
||||||
tags() {
|
|
||||||
output=""
|
|
||||||
|
|
||||||
for tag in $(hc tag_status)
|
|
||||||
do
|
|
||||||
status=${tag:0:1}
|
|
||||||
tag_id=${tag:1:1}
|
|
||||||
case $status in
|
|
||||||
'#')
|
|
||||||
item="<fc=gray50>[</fc><fc=#ffee00>$tag_id</fc><fc=gray50>]</fc>"
|
|
||||||
;;
|
|
||||||
':')
|
|
||||||
item="<fc=gray50>[</fc><fc=#ee9a00>$tag_id</fc><fc=gray50>]</fc>"
|
|
||||||
;;
|
|
||||||
'.')
|
|
||||||
item="<fc=gray20>[$tag_id]</fc>"
|
|
||||||
;;
|
|
||||||
'*')
|
|
||||||
item="<fc=gray50>[</fc><fc=gray50>$tag_id</fc><fc=gray50>]</fc>"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
action="<action=`echo herbstclient use $tag_id`>$item</action>"
|
|
||||||
output="$output$action"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $output
|
|
||||||
}
|
|
||||||
|
|
||||||
panel_height=48
|
panel_height=48
|
||||||
|
|
||||||
for monitor in $(hc list_monitors | cut -d: -f1)
|
for monitor in $(hc list_monitors | cut -d: -f1)
|
||||||
|
|
|
@ -8,6 +8,7 @@ tags() {
|
||||||
case $status in
|
case $status in
|
||||||
'#')
|
'#')
|
||||||
title=$(herbstclient attr clients.focus.title)
|
title=$(herbstclient attr clients.focus.title)
|
||||||
|
[ "$title" = "" ] && title="$tag_id"
|
||||||
[ ${#title} -ge 30 ] && title="${title:0:29}…"
|
[ ${#title} -ge 30 ] && title="${title:0:29}…"
|
||||||
item="<fc=gray50>[</fc><fc=#ffee00>$title</fc><fc=gray50>]</fc>"
|
item="<fc=gray50>[</fc><fc=#ffee00>$title</fc><fc=gray50>]</fc>"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue