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

137 lines
3.1 KiB
JSON
Raw 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-01-17 17:40:22 -06:00
% for iface in host.wireless + host.ethernet:
2025-01-14 00:10:46 -06:00
"network#${iface}",
% endfor
% if not host.ethernet and host.auto_ethernet:
"network#auto_ethernet",
% 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-01-17 17:40:22 -06:00
% if host.temperature_path:
2025-01-14 00:10:46 -06:00
"temperature",
% endif
"clock#utc",
"clock#local"
],
2025-01-17 17:40:22 -06:00
% for iface in host.wireless:
2025-01-14 00:10:46 -06:00
"network#${iface}": {
"interface": "${iface}",
2025-01-14 15:26:11 -06:00
"format": "\uf1eb \uf058",
"format-disconnected": "\uf1eb \uf057",
"tooltip-format": "${iface} {ipaddr} {essid} {signalStrength}",
"tooltip-format-disconnected": "${iface} down"
2025-01-14 00:10:46 -06:00
},
% endfor
2025-01-17 17:40:22 -06:00
% for iface in host.ethernet:
2025-01-14 00:10:46 -06:00
"network#${iface}": {
"interface": "${iface}",
2025-01-14 15:26:11 -06:00
"format": "\uf6ff \uf058",
"format-disconnected": "\uf6ff \uf057",
"tooltip-format": "${iface} {ipaddr}",
"tooltip-format-disconnected": "${iface} down"
2025-01-14 00:10:46 -06:00
},
% endfor
% if not host.ethernet and host.auto_ethernet:
"network#auto_ethernet": {
"interface": "en*",
"format": "\uf6ff \uf058",
"format-disconnected": "\uf6ff \uf057",
"tooltip-format": "${iface} {ipaddr}",
"tooltip-format-disconnected": "${iface} down"
},
% endif
2025-01-14 00:10:46 -06:00
"wireplumber": {
"format": "{icon} {volume}%",
"format-muted": "\uf6a9 {volume}%",
"format-icons": ["\uf026", "\uf027", "\uf028"]
},
2025-02-08 09:09:26 -06:00
% if host.has_battery:
"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}%",
},
% endif
2025-01-14 15:11:51 -06:00
"group/disks": {
// TODO: make drawer that expands orthogonally, outside of the bar
"orientation": "inherit",
"modules": [
2025-01-17 17:40:22 -06:00
% for disk in host.disks:
2025-01-14 15:11:51 -06:00
"disk#${disk}",
% endfor
],
"drawer": {}
},
2025-01-17 17:40:22 -06:00
% for disk in host.disks:
2025-01-14 00:10:46 -06:00
"disk#${disk}": {
2025-01-14 10:50:12 -06:00
"path": "${disk}",
2025-01-14 00:10:46 -06:00
"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"
},
2025-01-17 17:40:22 -06:00
% if host.temperature_path:
2025-01-14 00:10:46 -06:00
"temperature": {
"format": "{temperatureC}°C",
2025-01-17 17:40:22 -06:00
"hwmon-path": "${host.temperature_path}"
2025-01-14 00:10:46 -06:00
},
% 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
}
}