And yes so for me it is
Code: Select all
alias hauto="vim $HOME/.config/herbstluftwm/autostart"
Code: Select all
alias hauto="vim $HOME/.config/herbstluftwm/autostart"
Code: Select all
#!/bin/bash
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
monitor=${1:-0}
geometry=( $(herbstclient monitor_rect "$monitor") )
if [ -z "$geometry" ] ;then
echo "Invalid monitor $monitor"
exit 1
fi
# geometry has the format W H X Y
x=${geometry[0]}
y=${geometry[1]}
panel_width=${geometry[2]}
panel_height=12
font='GohuFont-7,-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1'
#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
bgcolor=$(hc get frame_border_normal_color)
selbg=$(hc get window_border_active_color)
selfg='#c3c3c3'
separator="%{B-}%{F$selfg}|"
tags_update() {
IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
bordercolor="#3d5a72"
separator="%{B-}%{F$selbg}|"
# draw tags
for i in "${tags[@]}" ; do
case ${i:0:1} in
'#')
echo -n "%{B$selbg}%{F$selfg}"
;;
'+')
echo -n "%{B#9CA668}%{F#141414}"
;;
':')
echo -n "%{B-}%{F#ffffff}"
;;
'!')
echo -n "%{B#FF0675}%{F#141414}"
;;
*)
echo -n "%{B-}%{F#ababab}"
;;
esac
# non-clickable tags because fuck you, mouse.
echo -n " ${i:1} "
done
#echo "$separator"
}
muz_update() {
moc_running=$(pidof "mocp" > /dev/null && echo 1)
if [ $moc_running -eq 1 ]; then
muz=$(mocp -Q %file | sed -e 's_/.*/__' -e 's/\.[^\.]*$//' -e 's/_/ /g') || muz="?"
else
muz=""
fi
}
vol_update() {
vol=$(amixer get Master | awk -F'[][]' '/Mono:/ {sub(/%/, ""); print $2; exit}')
}
wifi_interval=50
wifi_update() {
wifi=$(awk 'NR==3 {printf("%2.2d\n", ($3/70)*100)}' /proc/net/wireless)
}
times_interval=100
times_update() {
thedate=$(date -u +%d.%m.%y)
thetime=$(date -u +%H:%M)
}
#initialize
vol_update
muz_update
wifi_count=0; wifi_update
times_count=0; times_update
while true;
do
muz_update
vol_update
if [ $wifi_count -ge $wifi_interval ]; then wifi_update; wifi_count=0; fi
wifi_count=$((wifi_count+1))
if [ $times_count -ge $times_interval ]; then times_update; times_count=0; fi
times_count=$((times_count+1))
tags_update
vol_icon=$(echo -e "\uE0FD")
wifi_icon=$(echo -e "\uE048")
right="%{r}%{F$selfg}$muz %{F$selbg}$vol_icon %{F$selfg}$vol% %{F$selbg}$wifi_icon %{F$selfg}$wifi% $separator %{F$selfg}$thedate %{F#ffffff}$thetime "
echo "$right"
done | lemonbar -g x${panel_width}+${panel_height} -f "$font" -B "$bgcolor" -F '#c36666'
So in you're code..... done | lemonbar -g widthxheight+x+y
Should bedone | lemonbar -g ${panel_width]+${panel_height} -f "$font" .....
Then you're all good!done | bar -g ${panel_width}x${panel_height} -f "$font"