dotfiles/templates/.config/waybar/config.jsonc.j2

137 lines
3.2 KiB
Text
Raw Permalink Normal View History

2025-01-14 00:10:46 -06:00
// -*- mode: jsonc -*-
{
"layer": "top",
"position": "top",
"height": 30,
"spacing": 4,
"modules-left": [
"niri/workspaces"
],
"modules-center": [
"niri/window"
],
"modules-right": [
2025-04-04 20:30:54 -05:00
{% for iface in host.wireless + host.ethernet %}
"network#{{ iface }}",
{% endfor %}
2025-01-14 00:10:46 -06:00
2025-04-04 20:30:54 -05:00
{% if not host.ethernet and host.auto_ethernet %}
"network#auto_ethernet",
2025-04-04 20:30:54 -05:00
{% endif %}
2025-01-14 00:10:46 -06:00
"wireplumber",
2025-02-08 09:09:26 -06:00
"battery",
2025-01-14 15:11:51 -06:00
"group/disks",
2025-01-14 00:10:46 -06:00
"cpu",
"memory",
2025-04-04 20:30:54 -05:00
{% if host.temperature_path %}
2025-01-14 00:10:46 -06:00
"temperature",
2025-04-04 20:30:54 -05:00
{% endif %}
2025-01-14 00:10:46 -06:00
"clock#utc",
"clock#local"
],
2025-04-04 20:30:54 -05:00
{% for iface in host.wireless %}
"network#{{ iface }}": {
"interface": "{{ iface }}",
2025-01-14 15:26:11 -06:00
"format": "\uf1eb \uf058",
"format-disconnected": "\uf1eb \uf057",
2025-04-04 20:30:54 -05:00
"tooltip-format": "{{ iface }} {ipaddr} {essid} {signalStrength}",
"tooltip-format-disconnected": "{{ iface }} down"
2025-01-14 00:10:46 -06:00
},
2025-04-04 20:30:54 -05:00
{% endfor %}
2025-01-14 00:10:46 -06:00
2025-04-04 20:30:54 -05:00
{% for iface in host.ethernet %}
"network#{{ iface }}": {
"interface": "{{ iface }}",
2025-01-14 15:26:11 -06:00
"format": "\uf6ff \uf058",
"format-disconnected": "\uf6ff \uf057",
2025-04-04 20:30:54 -05:00
"tooltip-format": "{{ iface }} {ipaddr}",
"tooltip-format-disconnected": "{{ iface }} down"
2025-01-14 00:10:46 -06:00
},
2025-04-04 20:30:54 -05:00
{% endfor %}
2025-01-14 00:10:46 -06:00
2025-04-04 20:30:54 -05:00
{% if not host.ethernet and host.auto_ethernet %}
"network#auto_ethernet": {
"interface": "en*",
"format": "\uf6ff \uf058",
"format-disconnected": "\uf6ff \uf057",
2025-04-04 20:30:54 -05:00
"tooltip-format": "{{ iface }} {ipaddr}",
"tooltip-format-disconnected": "{{ iface }} down"
},
2025-04-04 20:30:54 -05:00
{% endif %}
2025-01-14 00:10:46 -06:00
"wireplumber": {
"format": "{icon} {volume}%",
"format-muted": "\uf6a9 {volume}%",
"format-icons": ["\uf026", "\uf027", "\uf028"]
},
2025-04-04 20:30:54 -05:00
{% if host.has_battery %}
2025-02-08 09:09:26 -06:00
"battery": {
"design-capacity": true,
"format": "{icon} {capacity}% {time}",
"format-time": "{H}:{m}",
"format-icons": [
"\uf244",
"\uf243",
"\uf242",
"\uf241",
"\uf240",
],
"format-charging": "\ue55b {capacity}% {time}",
"format-full": "\ue55c {capacity}%",
},
2025-04-04 20:30:54 -05:00
{% endif %}
2025-02-08 09:09:26 -06:00
2025-01-14 15:11:51 -06:00
"group/disks": {
// TODO: make drawer that expands orthogonally, outside of the bar
"orientation": "inherit",
"modules": [
2025-04-04 20:30:54 -05:00
{% for disk in host.disks %}
"disk#{{ disk }}",
{% endfor %}
2025-01-14 15:11:51 -06:00
],
"drawer": {}
},
2025-04-04 20:30:54 -05:00
{% for disk in host.disks %}
"disk#{{ disk }}": {
"path": "{{ disk }}",
"format": "{{ disk }} {free}",
2025-01-14 00:10:46 -06:00
"tooltip-format": "{used} / {total} ({percentage_used}%)"
},
2025-04-04 20:30:54 -05:00
{% endfor %}
2025-01-14 00:10:46 -06:00
"cpu": {
"format": "\uf2db {usage}%",
"tooltip": false
},
"memory": {
"format": "\uf538 {percentage}%",
"tooltip-format": "{used}GiB / {total}GiB"
},
2025-04-04 20:30:54 -05:00
{% if host.temperature_path %}
2025-01-14 00:10:46 -06:00
"temperature": {
"format": "{temperatureC}°C",
2025-04-04 20:30:54 -05:00
"hwmon-path": "{{ host.temperature_path }}"
2025-01-14 00:10:46 -06:00
},
2025-04-04 20:30:54 -05:00
{% endif %}
2025-01-14 00:10:46 -06:00
"clock#utc": {
"interval": 5,
"format": "{:%Y-%m-%d %H:%M:%S}",
"timezone": "UTC",
"tooltip": false
},
"clock#local": {
"interval": 5,
"format": "{:%H:%M}",
"tooltip": false
}
}