// https://www.github.com/keyitdev/dotfiles
// Copyright (C) 2022-2026 Keyitdev
{
"layer": "top",
"position": "top",
"exclusive": true,
"height": 36,
"spacing": 1,
"margin-top": 5,
"margin-left":10,
"margin-right": 10,
// big screens/pc
"modules-left": ["custom/menu", "sway/workspaces", "sway/mode", "network", "custom/screen_time", "custom/weather", "custom/playerctl" ],
"modules-center": ["clock"],
"modules-right": ["custom/advanced_cpu", "custom/nvidia", "memory", "disk", "custom/brightness", "pulseaudio", "battery", "custom/microphone", "idle_inhibitor", "tray"],
// small screens/laptops
//"modules-left": ["custom/menu", "sway/workspaces", "sway/mode", "network", "custom/screen_time", "custom/weather", "custom/playerctl" ],
//"modules-center": ["clock"],
//"modules-right": ["memory", "disk", "backlight", "pulseaudio", "battery", "idle_inhibitor", "tray"],
"custom/advanced_cpu": {
"format": " CPU {}",
"interval": 1,
"return-type": "json",
"exec": "s-tui -j | jq -c '{text: \"\\((.Util.Avg|tonumber|floor))% \\((.Temp[\"Tctl,0\"]|tonumber|floor))°C \\((.Frequency.Avg|tonumber/1000)|tostring|tonumber|(. * 10 | floor / 10)) GHz\"}'"
},
"custom/brightness": {
"format": " {}%",
"exec": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 getvcp 10 | awk -F'= *|,' '/current value/ {print $2}'",
"interval": 1,
"on-scroll-up": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 + 10",
"on-scroll-down": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 - 10",
"on-click": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 0",
"on-click-middle": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 40",
"on-click-right": "ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 100"
},
"custom/menu": {
"format": "",
"tooltip": false,
"on-click": "rofi -show drun -no-default-config -config ~/.config/rofi/main.rasi",
"on-click-middle": "swaymsg workspace $(comm -23 <(seq 1 100) <(swaymsg -t get_workspaces | jq '.[].num' | sort -n) | head -n 1)",
"on-click-right": "rofi-powermenu"
},
"custom/microphone": {
"format": "{text}",
"tooltip": false,
"interval": 1,
"on-click": "~/.config/waybar/microphone.sh toggle",
"return-type": "json",
"exec": "~/.config/waybar/microphone.sh"
},
"custom/nvidia": {
"format": " GPU {}",
"interval": 2,
"exec": "nvidia-smi --query-gpu=utilization.gpu,temperature.gpu,memory.used --format=csv,noheader,nounits | awk -F', ' '{print $1\"% \"$2\"°C \"$3\" MiB\"}'"
},
"custom/playerctl": {
"format": "{icon}{text}",
"format-icons": {
"Playing": " ",
"Paused": " "
},
"max-length": 40,
"on-click": "playerctl play-pause",
"on-scroll-up": "playerctl next",
"on-scroll-down": "playerctl previous",
"return-type": "json",
"exec": "playerctl -a metadata --format '{\"text\": \"{{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{artist}} - {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F"
},
"custom/screen_time": {
"format": " {}",
"interval": 1,
"exec": "~/.config/waybar/screen_time.sh"
},
"custom/weather": {
"format": "{}",
"max-length": 25,
"tooltip": true,
"interval": 300,
"exec": "~/.config/waybar/weather.sh"
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", ""],
"tooltip-format": "{icon} {percent}%",
"on-scroll-up": "brightness_control -s +2",
"on-scroll-down": "brightness_control -s -2",
"smooth-scrolling-threshold": 1.0
},
"battery": {
"format": "{icon} {capacity}% {power:.1f}W",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} {time}",
"format-icons": [""],
"states": {
"good": 95,
"warning": 40,
"critical": 20
},
"interval": 2
},
"bluetooth": {
"format": " {status}",
"format-disabled": "",
"format-connected": " {num_connections} connected",
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}"
},
"clock": {
"format": " {:%a %d %b %H:%M}",
"format-alt": " {:%A %d %B %Y %H:%M:%S}",
"tooltip-format": "{calendar}",
"interval": 1,
"calendar": {
"mode": "month",
"mode-mon-col": 3,
"weeks-pos": "",
"on-scroll": 1,
"on-click-right": "mode",
"iso8601": true,
"format": {
"months": "{}",
"days": "{}",
"weeks": "W{}",
"weekdays": "{}",
"today": "{}"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
"cpu": {
"format": " CPU {usage}% {avg_frequency} Ghz",
"format-alt": " {avg_frequency} Ghz",
"tooltip": true,
"interval": 1
},
"disk": {
"format": " ROM {percentage_used}%",
"format-alt": " ROM {used}/{total}",
"path": "/",
"interval": 30
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip": true
},
"memory": {
"format": " RAM {used:.1f} GiB",
"format-alt": " RAM {percentage}%",
"interval": 1
},
"network": {
"format-wifi": " {essid}",
"format-ethernet": " {ifname}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": " Offline",
"format-alt": " {ifname} {bandwidthDownBits} {bandwidthUpBits}",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
"interval": 1
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-bluetooth": " {volume}%",
"format-bluetooth-muted": " {icon}",
"format-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle ",
"on-scroll-up": "volume_control -s +5 -m 125",
"on-scroll-down": "volume_control -s -5 -m 125",
"smooth-scrolling-threshold": 1.0
},
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"disable-scroll": false,
"all-outputs": true,
"format": "{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": "",
"9": "",
"10": ""
},
"smooth-scrolling-threshold": 1.0,
},
"temperature": {
"format": "{icon} {temperatureC}°C",
"format-icons": [""],
"interval": 1,
"warning-threshold": 70,
"critical-threshold": 90
},
"tray": {
"icon-size": 18,
"spacing": 5
}
}