1 -- vim: ts=4 sw=4 noet ai cindent syntax=lua
3 {% if grains['host'] == 'magnesium' %}
4 {% set ifdev = ['br0'] %}
5 {% elif grains['host'] == 'platinum' %}
6 {% set ifdev = ['wlp2s0'] %}
7 {% elif grains['host'] == 'barium' %}
8 {% set ifdev = ['enp6s0'] %}
9 {% elif grains['host'] == 'dubnium' %}
10 {% set ifdev = ['enp4s0'] %}
11 {% elif grains['host'] == 'rhenium' %}
12 {% set ifdev = ['wlp2s0'] %}
13 {% elif grains['host'] == 'baryte' %}
14 {% set ifdev = ['enx00f001e00121'] %}
16 {% set ifdev = ['eth0'] %}
22 out_to_console = true,
24 update_interval = 0.5,
29 if_up_strictness = 'address',
37 ${if_match "${exec cat ~/.local/share/pomodoro}"!="done"}
38 {"full_text": "Pomodoro: ${exec cat ~/.local/share/pomodoro}", "color": "\#ea0501"},
40 {% if grains['host'] == 'barium' %}
41 {"full_text": "Tea: ${execi 120 tail -n 1 ~/.local/share/teatimer.log}s", "color": "\#ffffff"},
43 {"full_text": "~ ${fs_free /home}", "color": "\#ffffff"},
44 {"full_text": "/ ${fs_free /root}", "color": "\#ffffff"},
45 {"full_text": "IO r:${diskio_read} w:${diskio_write}", "color": "\#ffffff"},
46 {"full_text": "CPU ${cpu cpu0}%", "color": "\#ffffff"},
47 {% for dev in ifdev %}
48 ${if_match "${addr {{ dev }}}"!="No Address"}
51 "{{ dev }} d:${downspeed {{ dev }}} u:${upspeed {{ dev }}} ${addr {{ dev }}}",
53 ${if_match "${addr {{ dev }}}"=="No Address"}
61 ${if_match "${addr tun0}"!="No Address"}
62 {"full_text": "VPN", "color": "\#00ff00"},
65 "full_text": "RAM ${memperc}%",
67 ${if_match ${memperc}<90}
73 {% if grains['host'] in ['platinum', 'rhenium', 'barium', 'baryte'] %}
75 "full_text": "BAT ${battery_short} ${battery_time}",
77 ${if_match ${battery_percent}<20}
84 {"full_text": "${time %Y-%m-%d %H:%M}", "color": "\#ffffff"}