{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
// "height": 30, // Auto-height is used when commented
// "width": 1280, // Full screen width when commented
"spacing": 16, // Gaps between modules (in px)
// See `man waybar` for more configuration options
// Configuration - modules-left
"modules-left": [
"custom/launcher",
"sway/workspaces",
"sway/mode",
"sway/window"
],
"custom/launcher": {
"format":"",
"on-click": "exec nwg-drawer",
"tooltip": false
},
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon}",
"format-icons": {
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
},
"sway/mode": {
"format": "{}",
"tooltip": false
},
"sway/window": {
"format": "{}",
//"all-outputs": true, // Active window shows only on active display when commented
"max-length": 120
},
// Configuration - modules-center
"modules-center": [
"network"
],
"network": {
"format-disabled": " Disabled",
"format-wifi": " {bandwidthDownBits:>} {bandwidthUpBits:>} ",
"tooltip-format-wifi": "{essid}",
"format-ethernet": " {bandwidthDownBits:>} {bandwidthUpBits:>} ",
"tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}",
"format-disconnected": " Disconnected",
"on-click": "footclient -T waybar_nmtui -e nmtui",
"interval": 2
},
// Configuration - modules-right
"modules-right": [
"custom/keyboard-layout",
"idle_inhibitor",
"cpu",
"memory",
"backlight",
"pulseaudio",
"battery",
"clock",
"tray",
"custom/power"
],
"custom/keyboard-layout": {
"exec": "i=$(swaymsg -t get_inputs); echo \"\"; echo \"$i\" | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
"format": "",
// Interval set only as a fallback; use signal to update the module more immediately
"interval": 30,
// See example config for sending signal to Waybar in ~/.config/sway/config.d/input
"signal": 1,
"on-click": "~/.config/waybar/scripts/keyhint.sh"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip-format-activated": "Idle Inhibitor Activated",
"tooltip-format-deactivated": "Idle Inhibitor Deactivated"
},
"cpu": {
"interval": 5,
"format": "{usage:>3}%",
"states": {
"warning": 70,
"critical": 90,
},
"on-click": "footclient -T waybar_htop -e htop"
},
"memory": {
"interval": 5,
"format": "{:>3}%",
"on-click": "footclient -T waybar_htop -e htop",
"states": {
"warning": 70,
"critical": 90
}
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"tooltip-format": "Backlight (Scroll): {percent:}%",
"on-scroll-down": "brightnessctl -c backlight set 5%-",
"on-scroll-up": "brightnessctl -c backlight set +5%"
},
"pulseaudio": {
"scroll-step": 2,
"format": "{icon} {volume}%",
"format-muted":" muted",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format": " {:%H:%M}",
"format-alt": " {:%OI:%M %p}",
"tooltip-format": " {:%A %m/%d}\n\n{calendar}",
"calendar": {
"on-scroll": 1,
"format": {
"months": "{}",
"days": "{}",
"weeks": "W{}",
"weekdays": "{}",
"today": "{}"
},
},
"actions": {
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
},
},
"tray": {
"icon-size": 16,
"spacing":10
},
"custom/power": {
"format":"⏻",
"on-click": "exec ~/.config/sway/scripts/power_menu.sh",
"tooltip": false
},
}