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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -