File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class BitBarLine {
2222 protected $ dropdown ;
2323 protected $ trim = true ;
2424 protected $ refresh = false ;
25+ protected $ alternate = false ;
2526
2627 /**
2728 * @param mixed $text
@@ -120,6 +121,16 @@ public function setRefresh($boolean) {
120121 $ this ->refresh = (boolean ) $ boolean ;
121122 return $ this ;
122123 }
124+
125+
126+ /**
127+ * @param $boolean
128+ * @return $this
129+ */
130+ public function setAlternate ($ boolean ) {
131+ $ this ->alternate = (boolean ) $ boolean ;
132+ return $ this ;
133+ }
123134
124135 /**
125136 * @return BitBarLine
@@ -171,6 +182,15 @@ public function format() {
171182
172183 $ string .= ' trim=false ' ;
173184 }
185+
186+ if ($ this ->alternate === true ) {
187+ if (!$ this ->usedPipe ) {
188+ $ string .= '| ' ;
189+ $ this ->usedPipe = true ;
190+ }
191+
192+ $ string .= ' alternate=true ' ;
193+ }
174194
175195 if ($ this ->bash ) {
176196 if (!$ this ->usedPipe ) {
You can’t perform that action at this time.
0 commit comments