{ // Waybar reads JSONC and is styled via CSS. // niri has a native workspaces module "niri/workspaces". // Save as: ~/.config/waybar/config.jsonc "layer": "top", "position": "top", "height": 28, "gtk-layer-shell": true, "modules-left": [ "niri/workspaces", ], "modules-center": [ ], "modules-right": [ "custom/weather", "custom/loadavg", "custom/docker", "cpu", "memory", "pulseaudio", "bluetooth", "battery", "tray", "clock" ], // ----- niri workspaces ----- "niri/workspaces": { "format": "{name}", "on-click": "niri msg action toggle-overview", "disable-scroll": false }, // ----- CPU / Memory ----- "cpu": { "interval": 3, "format": " {usage:>2}%" }, "memory": { "interval": 5, "format": " {used:0.1f}G" }, // ----- Clock / Date ----- "clock": { "interval": 1, "format": " {:%a %b %d}  {:%H:%M:%S}", "tooltip": false }, // ----- Loadavg (custom) ----- "custom/loadavg": { "exec": "awk '{printf \" %s\", $1}' /proc/loadavg", "interval": 5, "return-type": "text", "tooltip": false }, // ----- IP (custom) ----- // Shows first non-loopback IPv4; adjust if you prefer a specific iface. "custom/ip": { "exec": "ip -4 -o addr show scope global | awk '{print $4}' | cut -d/ -f1 | head -n1 | awk '{print \" \"$1}'", "interval": 15, "return-type": "text", "tooltip": "ip -4 -o addr show" }, // ----- Docker (custom) ----- "custom/docker": { "exec": "printf \" %s\" \"$(docker ps -q 2>/dev/null | wc -l)\"", "interval": 10, "return-type": "text", "tooltip": "docker ps" }, // ----- Bluetooth (native) ----- "bluetooth": { "format": "{status}", "format-disabled": " off", "format-connected": " {num_connections}", "on-click": "blueman-manager" }, // ----- Battery ----- "battery": { "interval": 15, "format": "{icon} {capacity}%", "format-charging": " {capacity}%", "format-icons": ["", "", "", "", ""], "states": { "warning": 25, "critical": 10 } }, // ----- System tray ----- "tray": { "icon-size": 16, "spacing": 6 } }