dotfiles/templates/.config/waybar/config.jsonc
2025-01-14 15:26:11 -06:00

104 lines
2.4 KiB
JSON

// -*- mode: jsonc -*-
{
"layer": "top",
"position": "top",
"height": 30,
"spacing": 4,
"modules-left": [
"niri/workspaces"
],
"modules-center": [
"niri/window"
],
"modules-right": [
% for iface in host.get('wireless', []) + host.get('ethernet', []):
"network#${iface}",
% endfor
"wireplumber",
"group/disks",
"cpu",
"memory",
% if 'temperature-path' in host:
"temperature",
% endif
"clock#utc",
"clock#local"
],
% for iface in host.get('wireless', []):
"network#${iface}": {
"interface": "${iface}",
"format": "\uf1eb \uf058",
"format-disconnected": "\uf1eb \uf057",
"tooltip-format": "${iface} {ipaddr} {essid} {signalStrength}",
"tooltip-format-disconnected": "${iface} down"
},
% endfor
% for iface in host.get('ethernet', []):
"network#${iface}": {
"interface": "${iface}",
"format": "\uf6ff \uf058",
"format-disconnected": "\uf6ff \uf057",
"tooltip-format": "${iface} {ipaddr}",
"tooltip-format-disconnected": "${iface} down"
},
% endfor
"wireplumber": {
"format": "{icon} {volume}%",
"format-muted": "\uf6a9 {volume}%",
"format-icons": ["\uf026", "\uf027", "\uf028"]
},
"group/disks": {
// TODO: make drawer that expands orthogonally, outside of the bar
"orientation": "inherit",
"modules": [
% for disk in host.get('disks', ['/']):
"disk#${disk}",
% endfor
],
"drawer": {}
},
% for disk in host.get('disks', ['/']):
"disk#${disk}": {
"path": "${disk}",
"format": "${disk} {free}",
"tooltip-format": "{used} / {total} ({percentage_used}%)"
},
% endfor
"cpu": {
"format": "\uf2db {usage}%",
"tooltip": false
},
"memory": {
"format": "\uf538 {percentage}%",
"tooltip-format": "{used}GiB / {total}GiB"
},
% if 'temperature-path' in host:
"temperature": {
"format": "{temperatureC}°C",
"hwmon-path": "${host['temperature-path']}"
},
% endif
"clock#utc": {
"interval": 5,
"format": "{:%Y-%m-%d %H:%M:%S}",
"timezone": "UTC",
"tooltip": false
},
"clock#local": {
"interval": 5,
"format": "{:%H:%M}",
"tooltip": false
}
}