From ba8489917d929a3c2a0aa06988f867e4492cac31 Mon Sep 17 00:00:00 2001 From: "henry.potgieter" Date: Wed, 3 May 2023 23:48:20 -0400 Subject: [PATCH] Updated usage output from main executable and one other minor change to README.rst --- README.rst | 36 ++++++++++++++++++++++++++++++++++-- common/main.cc | 2 ++ seg-adj1.png | Bin 0 -> 4965 bytes seg-adj2.png | Bin 0 -> 4525 bytes 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 seg-adj1.png create mode 100644 seg-adj2.png diff --git a/README.rst b/README.rst index e606754..6cc5814 100644 --- a/README.rst +++ b/README.rst @@ -144,16 +144,18 @@ The full usage:: Use tmux colors in output -p, --powerline-left Use powerline left symbols throughout the output, enables --colors + -q, --powerline-right + Use powerline right symbols throughout the output, enables --colors -v, --vertical-graph Use vertical bar chart for CPU graph -l , --segments-left Enable blending bg/fg color (depending on -p or -q use) with segment to left Provide color to be used depending on -p or -q option for seamless segment blending + Color is an integer value which uses the standard tmux color palette values -r , --segments-right Enable blending bg/fg color (depending on -p or -q use) with segment to right Provide color to be used depending on -p or -q option for seamless segment blending - -q, --powerline-right - Use powerline right symbols throughout the output, enables --colors + Color is an integer value which uses the standard tmux color palette values -i , --interval Set tmux status refresh interval in seconds. Default: 1 second -g , --graph-lines @@ -165,7 +167,37 @@ The full usage:: -a , --averages-count Set how many load-averages should be drawn. Default: 3 +Blending Dynamic Colors Tmux Powerline Segments +=============================================== +The -l and -r options when used in conjunction with a recent version of Tmux Powerline +that has the ability to selectively disable spacing and separators between segments allow +for seamless blending of tmux-mem-cpu-load output with other adjacent segments. The end +result is dynamic changing of appropriate foreground and background colors as the start +and end of the tmux-mem-cpu-load output string that is aggregated with other Tmux +Powerline output to produce a more polished status line in Tmux. + +Segment Adjaceny before this feature: + +.. image:: seg-adj1.png + +Segment Adjaceny after this feature: + +.. image:: seg-adj2.png + +Note that the values for the -l and -r options will be the standard Tmux integer color +values. They set the appropriate background and foreground colors used for the separator +character when used with the poweline-left or powerline-right options so it is easy to +match coloring to adjacent segments. An example from the segment script that calls +tmux-mem-cpu-load is as follows:: + + tmux-mem-cpu-load -q -v -l 52 -r 33 + +This combines with theme options available to tmux-powerline, such as the following:: + + "disk_usage_cust 52 123 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 52 123 right_disable" \ + "tmux_mem_cpu_load_cust 52 234 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 52 234 both_disable separator_disable" \ + "batt_cust 33 154 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 16 33 N separator_disable" \ Authors ======= diff --git a/common/main.cc b/common/main.cc index 3d7976d..ea27a71 100644 --- a/common/main.cc +++ b/common/main.cc @@ -134,9 +134,11 @@ void print_help() << "-l , --segments-left \n" << "\tEnable blending bg/fg color (depending on -p or -q use) with segment to left\n" << "\tProvide color to be used depending on -p or -q option for seamless segment blending\n" + << "\tColor is an integer value which uses the standard tmux color palette values\n" << "-r , --segments-right \n" << "\tEnable blending bg/fg color (depending on -p or -q use) with segment to right\n" << "\tProvide color to be used depending on -p or -q option for seamless segment blending\n" + << "\tColor is an integer value which uses the standard tmux color palette values\n" << "-i , --interval \n" << "\tSet tmux status refresh interval in seconds. Default: 1 second\n" << "-g , --graph-lines \n" diff --git a/seg-adj1.png b/seg-adj1.png new file mode 100644 index 0000000000000000000000000000000000000000..c8d57f9a4a20d9f9c79c9ee7b0830ff410e4dcd6 GIT binary patch literal 4965 zcmV-r6PoOaP)R8Xrzr7GHEX{~m$M^sR; zPgSgIP}EeZ7;#ukvqjZfq+DAP`> zHkV`3HaM|4w-KWjAdZ_1IGcJGs#;Uk)S1J4hmVq6b;@Qxtg4QV)tNQ9yC;QCZ_B2| z=s6IFed#)teZe$5XWmV%Q-E_ygGzlm4xbDwN$5z;0+_0X9cBg4=VWw$!g!hiundyFFuPfW{ z;Z|AM42Ld9J7U&m$w#;Dd4I7Xo@3BHDJCrJWm4aKY!su`S&bTCCod{Fya}0Iw>G_7 z@4&jS9`UsNgm6jsMYt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pqI-aG(cFg$#HeK8EvXf!k$Eh{S%!-xa|T3%j}mzUR) z_t>#xJ9g|43I!P%EA10iyAn_OC2T3A@9Pi$R!NJz-XAAej?QL$skb^y43 z{l?a;xMA63Vv|DUe(3B93znB2jY}K< zNxjT>Z*i{C%{G%kBGfULNj?J~g zeN2rSd2gaU`~>z=biNV+z_j^5BtgN>&M)~DTnn$A--2pYj|V53GpMKycu*aNp}(*i z&dJsFBB|%KCnnAYIu&i^L_!9mlf|g3VBhB2@qC7TV$_BBB=1? z{o#-4bc)=ACRM5_^->1j>2EVYi0!Q|cSaCh9RQfw$+Z4u*p_cN^6$mXlVu}~7T+an zg|AMjHOIa4*v49L_|sYa+6~*!+PK{72DxtRBSB2Tkvhg zi!~h$hyQm*dvO(NR6JADuXuebFd7<=I?ekZu)Rv8!}6 zAlDKjJvyIf2h7o2=8a>v6z6iyxg9t;-fr_h{#>!%91xQ$ijf|!DE;Qpg@HPWCYPh$ j=>c_{F_A06F}3r5oyL!P$ylOt00000NkvXXu0mjfS$&(F literal 0 HcmV?d00001 diff --git a/seg-adj2.png b/seg-adj2.png new file mode 100644 index 0000000000000000000000000000000000000000..20f85383ff203dc90a84bfcb448811897f82112e GIT binary patch literal 4525 zcmV;e5mN4nP)X0ssI2QIe&T00009a7bBm000ie z000ie0hKEb8vpwNJxSN!lYoeDk@b`Yq3^atzNYS zmG*P&6ScI6rTU6iEfHD=9MS6itYfwII<&M}o>LzVx3pENRj)V?$P|(=1VToVoO9kE zkrc@sk{J8^efjuu_E~$ab=F?zmp!o&8ifKjfFJ;X*phG*Zc$`a`yTTt+9W+khJz*ijFCn2f+4S30P} z!Z*wJ{}yoH<2)xL*MK=JNwyE8$wAj5OLn5}(}MY{X`_`$=b8{{r_Y^HF;Y_JMsR;M zHEB`Jv)Gmv;enU#*^i1tL9r^-cEj;FI5J*)5>~RiGokN%vsr#sTvg@#J<=g5r{T7I zcGIMi%^~13{qp_II(qJb{h(Noa5a*~^l_e#+SfMAK`&1*xj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