1
0
Fork 0

oneline input + local stuff

This commit is contained in:
Vladimír Dudr 2022-05-06 11:39:54 +02:00
parent b0cea637be
commit 412514eff3

View file

@ -56,7 +56,7 @@ hc --idle | {
#count-mails;
#charge=$(battery | awk '{print $2}')
while true ; do
res=
### prepare by monitor tags displaying
for monitor in "${monitors[@]}" ; do
output_tags[$monitor]="%{A4:herbstclient use_index +1 --skip-visible:}%{A5:herbstclient use_index -1 --skip-visible:}"
@ -104,19 +104,19 @@ hc --idle | {
monitor=${monitors[$m]}
### set monitor
echo -n "%{S$m}"
res="$res%{S$m}"
#echo -en "%{S$((${#monitors[@]} - monitor))}"
### print the left
echo -n "%{l}${output_tags[$monitor]}$separator ${windowtitle:0:150}"
res="$res%{l}${output_tags[$monitor]}$separator ${windowtitle:0:150}"
### center
#echo -n "%{c}%{U${colors[bright_orange]}}${windowtitle:0:150}%{U-}"
### print the right
echo -n "%{r}$playing $separator $volume $separator $wifi $separator $network $separator $temperature $separator $load $separator $date $separator %{U#f2f229}$charge%{U-} $separator"
res="$res%{r}$playing $separator $volume $separator $load $separator $date "
#echo -en "%{r}$right $separator %{U#f2f229}$charge%{U-} $separator"
done
### end the output
echo
echo -e "$res"
### Data handling ###
# This part handles the events generated in the event loop, and sets