Skip to content

Commit ba84899

Browse files
author
henry.potgieter
committed
Updated usage output from main executable and one other minor change to README.rst
1 parent 35f9618 commit ba84899

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

README.rst

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,18 @@ The full usage::
144144
Use tmux colors in output
145145
-p, --powerline-left
146146
Use powerline left symbols throughout the output, enables --colors
147+
-q, --powerline-right
148+
Use powerline right symbols throughout the output, enables --colors
147149
-v, --vertical-graph
148150
Use vertical bar chart for CPU graph
149151
-l <value>, --segments-left <value>
150152
Enable blending bg/fg color (depending on -p or -q use) with segment to left
151153
Provide color to be used depending on -p or -q option for seamless segment blending
154+
Color is an integer value which uses the standard tmux color palette values
152155
-r <value>, --segments-right <value>
153156
Enable blending bg/fg color (depending on -p or -q use) with segment to right
154157
Provide color to be used depending on -p or -q option for seamless segment blending
155-
-q, --powerline-right
156-
Use powerline right symbols throughout the output, enables --colors
158+
Color is an integer value which uses the standard tmux color palette values
157159
-i <value>, --interval <value>
158160
Set tmux status refresh interval in seconds. Default: 1 second
159161
-g <value>, --graph-lines <value>
@@ -165,7 +167,37 @@ The full usage::
165167
-a <value>, --averages-count <value>
166168
Set how many load-averages should be drawn. Default: 3
167169

170+
Blending Dynamic Colors Tmux Powerline Segments
171+
===============================================
172+
173+
The -l and -r options when used in conjunction with a recent version of Tmux Powerline
174+
that has the ability to selectively disable spacing and separators between segments allow
175+
for seamless blending of tmux-mem-cpu-load output with other adjacent segments. The end
176+
result is dynamic changing of appropriate foreground and background colors as the start
177+
and end of the tmux-mem-cpu-load output string that is aggregated with other Tmux
178+
Powerline output to produce a more polished status line in Tmux.
179+
180+
Segment Adjaceny before this feature:
181+
182+
.. image:: seg-adj1.png
183+
184+
Segment Adjaceny after this feature:
185+
186+
.. image:: seg-adj2.png
187+
188+
Note that the values for the -l and -r options will be the standard Tmux integer color
189+
values. They set the appropriate background and foreground colors used for the separator
190+
character when used with the poweline-left or powerline-right options so it is easy to
191+
match coloring to adjacent segments. An example from the segment script that calls
192+
tmux-mem-cpu-load is as follows::
193+
194+
tmux-mem-cpu-load -q -v -l 52 -r 33
195+
196+
This combines with theme options available to tmux-powerline, such as the following::
168197

198+
"disk_usage_cust 52 123 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 52 123 right_disable" \
199+
"tmux_mem_cpu_load_cust 52 234 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 52 234 both_disable separator_disable" \
200+
"batt_cust 33 154 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 16 33 N separator_disable" \
169201

170202
Authors
171203
=======

common/main.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ void print_help()
134134
<< "-l <value>, --segments-left <value>\n"
135135
<< "\tEnable blending bg/fg color (depending on -p or -q use) with segment to left\n"
136136
<< "\tProvide color to be used depending on -p or -q option for seamless segment blending\n"
137+
<< "\tColor is an integer value which uses the standard tmux color palette values\n"
137138
<< "-r <value>, --segments-right <value>\n"
138139
<< "\tEnable blending bg/fg color (depending on -p or -q use) with segment to right\n"
139140
<< "\tProvide color to be used depending on -p or -q option for seamless segment blending\n"
141+
<< "\tColor is an integer value which uses the standard tmux color palette values\n"
140142
<< "-i <value>, --interval <value>\n"
141143
<< "\tSet tmux status refresh interval in seconds. Default: 1 second\n"
142144
<< "-g <value>, --graph-lines <value>\n"

seg-adj1.png

4.85 KB
Loading

seg-adj2.png

4.42 KB
Loading

0 commit comments

Comments
 (0)