-- vim: ts=4 sw=4 noet ai cindent syntax=lua
{% if grains['host'] == 'magnesium' %}
- {% set ifdev = 'br0' %}
+ {% set ifdev = ['br0'] %}
{% elif grains['host'] == 'platinum' %}
- {% set ifdev = 'wlp2s0' %}
+ {% set ifdev = ['wlp2s0'] %}
{% elif grains['host'] == 'barium' %}
- {% set ifdev = 'enp3s0f1' %}
+ {% set ifdev = ['enp3s0f1', 'wlp4s0'] %}
{% elif grains['host'] == 'dubnium' %}
- {% set ifdev = 'enp4s0' %}
+ {% set ifdev = ['enp4s0'] %}
{% elif grains['host'] == 'rhenium' %}
- {% set ifdev = 'wlp2s0' %}
+ {% set ifdev = ['wlp2s0'] %}
{% else %}
- {% set ifdev = 'eth0' %}
+ {% set ifdev = ['eth0'] %}
{% endif %}
conky.config = {
conky.text = [[
[
- ${if_running mutt}
- {"full_text": "${new_mails mail_aber/Inbox} new mails", "color": "\#ffa500"},
- ${endif}
{"full_text": "Home ${fs_free /home} Free", "color": "\#ffffff"},
{"full_text": "Root ${fs_free /root} Free", "color": "\#ffffff"},
{"full_text": "Disk r:${diskio_read} w:${diskio_write}", "color": "\#ffffff"},
{"full_text": "CPU ${cpu cpu0}%", "color": "\#ffffff"},
+ {% for dev in ifdev %}
{
"full_text":
- "d:${downspeed {{ ifdev }}} u:${upspeed {{ ifdev }}} ${addr {{ ifdev }}}",
+ "d:${downspeed {{ dev }}} u:${upspeed {{ dev }}} ${addr {{ dev }}}",
"color":
- ${if_match "${addr {{ ifdev }}}"=="No Address"}
+ ${if_match "${addr {{ dev }}}"=="No Address"}
"\#ff0000"
${else}
"\#00ff00"
${endif}
},
+ {% endfor %}
${if_match "${addr tun0}"!="No Address"}
{"full_text": "VPN", "color": "\#00ff00"},
${endif}