CLI conkyディスプレイにANSI色を表示するには?

CLI conkyディスプレイにANSI色を表示するには?

理想的には、可能であれば、colortailまたは同じものを使用しmultitailconky色を渡すように設定できます。そうでない場合は、別の方法で処理する方法が必要です。低速さについてお詫び申し上げます。これは進行中なので、ここに不要な内容がある可能性があります。

# **********************************************************************
#
# **********************************************************************


text_buffer_size 512

background yes
double_buffer yes

alignment bottom_left

border_width 1
cpu_avg_samples 2
#default_color white
#default_outline_color white
#default_shade_color white
draw_borders no
#draw_graph_borders yes
draw_outline no
draw_shades no

gap_x 0
gap_y 0
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no

own_window yes
own_window_type normal
own_window_transparent yes
own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

minimum_size 280 230
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none

show_graph_scale no
show_graph_range no

use_xft yes
xftalpha 0.1
xftfont Droid Sans:size=9
#color0 white
#color1 EAEAEA
#color2 FFA300
#color3 grey

color0 white
color1 slate grey
color2 red
color3 blue
color4 green

TEXT
${color gray}
${exec tail -n 15 /var/log/syslog }

ベストアンサー1

ANSIエスケープシーケンスをconkyカラーコマンドに変換し、出力を解析するexecp代わりにそれを使用できます。exec

たとえば、(ANSIではない)赤を使用してsystemd:テキストを強調表示できます。

${execp tail -n 15 /var/log/syslog |
  sed 's/systemd:/${color red}&${color gray}/g'
}

おすすめ記事