「lua」なしの「conky」:棒グラフを復元できますか?

「lua」なしの「conky」:棒グラフを復元できますか?

そしてluaあなたは絶対にできる

そうでなければどうでしょうか?lua?できるconky10%バーを左から右に描く代わりに
█░░░░░░░░░このよう
に右から左に描くのはどうですか? :
░░░░░░░░░█

例えばRainmeter~のためWindows復元するかどうかFlip=1

特に、私はを好みfs_free、一貫して表示できるようにしたいfs_usedです。fs_bar使用される左を暗くして強調表示する無料右側にあります。

ベストアンサー1

正しい反転ではありませんが、「模倣」してみることができます。

スクリーンショット

# cat ~/.conkyrc
total_run_times 0
alignment top_middle
border_width 0
border_inner_margin 0
border_outer_margin 0
default_color white
own_window_colour black
draw_borders no
draw_outline no
draw_shades no
use_xft yes
minimum_size  500 50
maximum_width 500
extra_newline no
double_buffer yes
own_window yes
own_window_class Conky
own_window_type desktop
default_bar_size 0 51
default_graph_size 0 24
update_interval 1.0

TEXT
${color green}other content
${color  blue}${voffset   0}${execibar 3600 echo 61.8%}
${color  blue}${voffset -52}${alignc}${offset -1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color green}${voffset -25}${alignc}${offset  0}${font DejaVu Sans:size=12}vanilla conky bar given 61.8%
${color green}${voffset  15}other content
${color green}${voffset  12}${hr 50}
${color  blue}${voffset -44}${execibar 3600 echo 61.8%}
${color  blue}${voffset -52}${alignc}${offset -1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color green}${voffset -25}${alignc}${offset  0}${font DejaVu Sans:size=12}custom color for 38.2% on the right
${color green}${voffset  15}other content
${color green}${voffset  12}${hr 50}
${color  blue}${voffset -44}${execibar 3600 echo 61.8%}
${color black}${voffset -81}${hr 1}
${color black}${voffset  27}${hr 1}
${color  blue}${voffset -48}${alignc}${offset -1}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}no bar border
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}no bar border
${color green}${voffset -25}${alignc}${offset  0}${font DejaVu Sans:size=12}no bar border
${color green}${voffset  15}other content
${color green}${voffset  12}${hr 50}
${color black}${voffset -44}${execibar 3600 echo 61.8%}
${color green}${voffset -81}${hr 1}
${color green}${voffset  27}${hr 1}
${color  blue}${voffset -48}${alignc}${offset -1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -23}${alignc}${offset -1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -24}${alignc}${offset  0}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color  blue}${voffset -24}${alignc}${offset  1}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color green}${voffset -25}${alignc}${offset  0}${font DejaVu Sans:size=12}conky-style bar right-to-left
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content
${color green}${voffset  15}other content

ここでは${hr 50}、z軸のバーの下に長方形を配置しました。私たちがそれらを置く場所。上がるものはそこのすべてを扱うでしょう。default_bar_size 0 51 ${execibar 3600 echo 61.8%}
${voffset -...}

このアプローチでは、右側が強調表示されますが、実際にはバーが反転しません。組み込みの場合、fs_barこれはfs_bar_freeうまく機能します。他の人にはそうではありませんbattery_bar
なぜなら、友達と会話して価値を得るときは、execbar次のように100からパーセンテージを減らさなければならないからです。

$(( 100 - 62 ))  # integers, not floats

echo '100 - 61.8' | bc
bc -e "100 - $(echo 61.8)" -e quit

echo 61.8 | awk '{print 100 - $1}'
awk 'BEGIN { while ("echo 61.8" | getline var) print 100 - var }'

echo 61.8 | perl -nE 'say 100 - $_'
perl -E 'say 100 - `echo 61.8`'

水平バーの境界線は次のとおりです。

  • 予約済み(2列目)
  • マスク済み(セクション3)
  • 右から左に表示します(セクション4)。

${hr 1}第 3 条と第 4 条の国境は次の通り運営されている。${voffset -...}

テキストを両方の色で表示するには、4つの直線と4つの対角線のピクセルにそれぞれ1つずつ、8つの同じテキスト文字列をさらに配置して輪郭を描きます。

xcolor(1)ユーティリティ(内部に「ent」がある円)を使用して詳細を拡大できます。

バーの右側に不要な残りの食べ物があったので、どうしたらいいかわかりませんでした。共有してください。

conkyを使用すると、${voffset -...}ウィンドウが垂直方向に縮小せず、ウィンドウが長くなりすぎます。ただ画面の下部に置くか、別のコンキーウィンドウやパネルなどで覆います。正しい解決策がある場合は共有してください。

おすすめ記事