dotfiles/waybar/config

115 lines
3.7 KiB
Plaintext

{
"layer": "top",
"position": "top",
"height": 25, // Waybar height (to be removed for auto height)
"spacing": 2, // Gaps between modules (4px)
"modules-left": ["clock", "sway/workspaces", "custom/cmus"],
"modules-center": ["sway/window"],
"modules-right": [ "custom/clipboard", "network", "pulseaudio", "cpu", "memory", "temperature", "custom/gpu-usage", "custom/gpu-temp", "battery"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"format": "{icon} {name}",
"format-icons": {
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"tray": {
// "icon-size": 21,
"spacing": 5
},
"clock": {
"interval": 1,
"format": "{:%H-:%M-:%S}",
"format-alt": "{:%Y-%m-%d}",
"on-click-right": "alacritty --hold -e bash -c 'cal -m -Y -c 5'",
},
"cpu": {
"format": "{usage}% ",
"on-click-right": "alacritty --hold -e nu -c 'cat ~/pass.txt | sudo -S lshw -class cpu | grep -v capabilities: ; ps | sort-by -r cpu | first 10 | select pid name cpu mem'",
"states": {
"warning": 70,
"critical": 90
}
},
"memory": {
"format": "{}% ",
"on-click-right": "alacritty --hold -e nu -c 'cat ~/pass.txt | sudo -S lshw -short -class memory ; ps | sort-by -r mem | first 10 | select pid name cpu mem'",
"states": {
"warning": 70,
"critical": 90
}
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"custom/clipboard": {
"format": "",
"interval": "once",
"on-click": "copyq toggle",
},
"battery": {
"states": {
// "good": 95,
"warning": 20,
"critical": 10
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"on-click": "alacritty --hold -e upower -i /org/freedesktop/UPower/devices/battery_BAT0",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"on-click-right": "alacritty -e nmtui",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/separator": {
"format": "|",
"interval": "once",
"tooltip": false
},
}