Add icons to i3bar, modify output.

This commit is contained in:
2014-04-17 19:37:32 +02:00
parent 21b01b9274
commit b17d1e139b

View File

@@ -18,50 +18,30 @@ update_interval_on_battery 1.0
TEXT
[
{ "full_text" : " \
CPU: ${cpu cpu0}%\
{ "full_text" : "  ${cpu cpu0}%\
" , "color" : "\
${if_match ${cpu cpu0} <= 25}\#00FF00\
${else}${if_match ${cpu cpu0} <= 75}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
" , "min_width" : "CPU 00%" },
" , "min_width" : "CPU 00%" },\
\
\
\
{ "full_text" : " \
MEM: ${mem}/${memmax} (${memperc}%)\
{ "full_text" : "  ${mem}/${memmax} (${memperc}%)\
" , "color" : "\
${if_match ${memperc} <= 50}\#00FF00\
${else}${if_match ${memperc} <= 75}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
" },
\
\
\
{ "full_text" : " \
${if_match "${swapperc}" != "No swap"}\
SWAP: ${swap}/${swapmax} (${swapperc}%)\
${else}\
No swap\
${endif}\
" , "color" : "\
${if_match "${swapperc}" == "No swap"}\#FFFFFF\
${else}${if_match ${swapperc} <= 50}\#00FF00\
${else}${if_match ${swapperc} <= 75}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
${endif}\
" },
" },\
\
\
\
${if_mounted /}\
{ "full_text" : " \
{ "full_text" : " \
/: ${fs_used /}/${fs_size /} (${fs_used_perc /}%)\
" , "color" : "\
${if_match ${fs_used_perc /} <= 70}\#00FF00\
@@ -69,7 +49,7 @@ ${else}${if_match ${fs_used_perc /} <= 90}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
" },
" },\
${endif}\
\
\
@@ -83,14 +63,31 @@ ${else}${if_match ${fs_used_perc /home} <= 90}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
" },
" },\
${endif}\
\
\
\
${if_existing /sys/class/net/wlp2s0}\
{ "full_text" : " \
wlp2s0: \
${if_match "${swapperc}" != "No swap"}\
SWAP: ${swap}/${swapmax} (${swapperc}%)\
${else}\
no swap\
${endif}\
" , "color" : "\
${if_match "${swapperc}" == "No swap"}\#FFFFFF\
${else}${if_match ${swapperc} <= 50}\#00FF00\
${else}${if_match ${swapperc} <= 75}\#FFFF00\
${else}\#FF0000\
${endif}\
${endif}\
${endif}\
" },\
\
\
\
${if_existing /sys/class/net/wlp2s0}\
{ "full_text" : "  \
${if_up wlp2s0}\
${if_match "${addr wlp2s0}" != "No Address"}\
${addr wlp2s0} @ ${wireless_essid wlp2s0} (${wireless_link_qual_perc wlp2s0}%)\
@@ -115,7 +112,7 @@ ${else}\#FFFF00\
${endif}\
${else}\#FF0000\
${endif}\
" },
" },\
${endif}
\
\
@@ -135,7 +132,7 @@ ${else}\#FFFF00\
${endif}\
${else}\#FF0000\
${endif}\
" },
" },\
${endif}
\
\
@@ -155,7 +152,7 @@ ${else}\#FFFF00\
${endif}\
${else}\#FF0000\
${endif}\
" },
" },\
${endif}
\
\
@@ -175,51 +172,50 @@ ${else}\#FFFF00\
${endif}\
${else}\#FF0000\
${endif}\
" },
" },\
${endif}
\
\
\
{ "full_text" : " \
LOAD: ${loadavg 2}\
{ "full_text" : "  ${loadavg 2}\
" , "color" : "\
${if_match ${loadavg 2} <= 0.7}\#00FF00\
${else}${if_match ${loadavg 2} <= 1}\#FFFF00\
${else}\#FF0000)\
${endif}\
${endif}\
" },
" },\
\
\
\
{ "full_text" : " VOL: \
{ "full_text" : " \
${if_match ${mixer} == 0}\
mute\
${else}\
${mixer}%\
${endif}\
" , "color" : "\#FFFFFF" },
" , "color" : "\#FFFFFF" },\
\
\
\
${if_existing /proc/acpi/battery/BATO}\
{ "full_text" : " BAT: ${battery_short} (${battery_time}) " , "color" : "\#FFFFFF" },
${if_existing /sys/class/power_supply/BAT1}\
{ "full_text" : "  ${execi 5 head -c 1 /sys/class/power_supply/BAT1/status} ${execi 5 cat /sys/class/power_supply/BAT1/capacity}% " , "color" : "\#FFFFFF" },\
${endif}\
\
\
\
{ "full_text" : " KERNEL: ${sysname} ${kernel} " , "color" : "\#FFFFFF" },
{ "full_text" : " ${kernel} " , "color" : "\#FFFFFF" },\
\
\
\
{ "full_text" : " HOST: $nodename " , "color" : "\#FFFFFF" },
{ "full_text" : " $nodename " , "color" : "\#FFFFFF" },\
\
\
\
{ "full_text" : " UP: $uptime_short " , "color" : "\#FFFFFF" },
{ "full_text" : " $uptime_short " , "color" : "\#FFFFFF" },\
\
\
\
{ "full_text" : " ${time %a %F %T} " , "color" : "\#FFFFFF" , "name" : "time" }
{ "full_text" : " ${time %a %F %T} " , "color" : "\#FFFFFF" , "name" : "time" }\
],