bash - Echo multiple variables to dzen bar -
i have bash script has 3 functions. each has output pipe dzen2. below pseudo-code version of script.
printvol() { level=getvolume vol='volume: '$level echo $vol } printbattery() { level=getbat bat='battery: '$level echo $bat } printdate() { dte=getdte echo $dte } #this line need figure out printvol | dzen2 -x 900 && printbat | dzen2 -w 150 && printdate | dzen2
the goal print each of these dzen bar. individually, each dzen call works. how send of values dzen bar @ same time?
edit: have 3 different dzen calls because each echo needs positioned on dzen bar. -x , -w positioning flags.
use command group:
{ printvol; printbat; printdate; } | dzen2 -x 900 -w 150
i'm assuming makes sense aggregate options single call dzen
.
Comments
Post a Comment