scripting help for lemonbar

L

likeahundredninjas

Guest
#1
hi. i'm returning to linux after a while, and i have to reconfigure everything. so i've got bspwm here and i'm working on lemonbar, trying to make my script work. the only error when i try to run it is "/home/satan/etc/lemonbar/panel_bar:35: parse error near `}'" so i think i'm getting close but i kinda' hit a roadblock. if anyone can see what i did wrong, please let me know.


#!/usr/bin/zsh

source $HOME/etc/lemonbar/config

while read -r line {
case $line {
S*)
panel_status="%{F$panel_c7}${line#?}%{F-}"
;;
T*)
panel_title="%{F$panel_c7}${line#?}%{F-}"
;;
W*)
panel_info=''
panel_data=${=line}
for i in ${panel_data}; {
case ${panel_data[$i]} {
[OFU]*)
panel_info="$panel_info%{F$panel_c2} •%{F-}"
;;
o*)
panel_info="$panel_info%{F$panel_fg} •%{F-}"
;;
f*)
panel_info="$panel_info%{F$panel_c8} •%{F-}"
;;
u*)
panel_info="$panel_info%{F$panel_c3} •%{F-}"
;;
}
}
;;
}
}

print "%{l}$panel_title%{c}$panel_info%{r}$panel_status"
 
   
   
   
Top