2022-06-25 21:26:38 +08:00
|
|
|
{
|
|
|
|
"layer": "top",
|
|
|
|
"modules-left": [
|
|
|
|
"sway/workspaces"
|
|
|
|
],
|
|
|
|
"fixed-center": false,
|
|
|
|
"modules-center": [
|
|
|
|
"sway/window"
|
|
|
|
],
|
|
|
|
"modules-right": [
|
|
|
|
"tray",
|
|
|
|
"custom/notification",
|
|
|
|
"custom/player",
|
|
|
|
"cpu",
|
|
|
|
"memory",
|
|
|
|
"network",
|
|
|
|
"battery",
|
|
|
|
"clock"
|
|
|
|
],
|
|
|
|
"sway/window": {
|
|
|
|
"max-length": 50
|
|
|
|
},
|
|
|
|
"tray": {
|
|
|
|
"spacing": 10
|
|
|
|
},
|
|
|
|
"cpu": {
|
2022-07-15 12:40:15 +08:00
|
|
|
"format": " {load}",
|
|
|
|
"format-alt": " {usage}% @ {avg_frequency}GHz"
|
2022-06-25 21:26:38 +08:00
|
|
|
},
|
|
|
|
"memory": {
|
2022-07-15 12:40:15 +08:00
|
|
|
"format": " {used:0.1f}G / {total:0.1f}G",
|
|
|
|
"format-alt": " Swap: {swapUsed:0.1f}G / {swapTotal:0.1f}G"
|
2022-06-25 21:26:38 +08:00
|
|
|
},
|
|
|
|
"network": {
|
|
|
|
"format-wifi": " {essid} ({signalStrength}%)",
|
2022-07-15 12:40:15 +08:00
|
|
|
"format-ethernet": " {ifname}",
|
|
|
|
"format-linked": " {ifname}",
|
2022-06-25 21:26:38 +08:00
|
|
|
"format-disconnected": " Disconnected",
|
2022-07-15 12:40:15 +08:00
|
|
|
"format-alt": " {ifname}: {ipaddr}/{cidr}",
|
|
|
|
"tooltip-format": "{ifname} via {gwaddr}"
|
2022-06-25 21:26:38 +08:00
|
|
|
},
|
|
|
|
"battery": {
|
|
|
|
"states": {
|
|
|
|
"good": 80,
|
|
|
|
"warning": 30,
|
|
|
|
"critical": 15
|
|
|
|
},
|
|
|
|
"format": "{icon} {capacity}%",
|
|
|
|
"format-charging": " {capacity}%",
|
|
|
|
"format-plugged": " {capacity}%",
|
2022-07-15 12:40:15 +08:00
|
|
|
"format-alt": "{icon} ETA: {time}",
|
2022-06-25 21:26:38 +08:00
|
|
|
"format-icons": [
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
""
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"clock": {
|
|
|
|
"format": "{: %H:%M\t %m-%d}",
|
2022-07-15 12:40:15 +08:00
|
|
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
2022-06-25 21:26:38 +08:00
|
|
|
},
|
|
|
|
"custom/notification": {
|
2022-07-15 12:40:15 +08:00
|
|
|
"tooltip": true,
|
2022-06-25 21:26:38 +08:00
|
|
|
"format": "{icon}",
|
|
|
|
"format-icons": {
|
2022-07-15 12:40:15 +08:00
|
|
|
"notification": " <span foreground='red'><sup></sup></span> New notifications",
|
2022-06-25 21:26:38 +08:00
|
|
|
"none": " No notifications",
|
2022-07-15 12:40:15 +08:00
|
|
|
"dnd-notification": " DND on",
|
|
|
|
"dnd-none": " DND on"
|
2022-06-25 21:26:38 +08:00
|
|
|
},
|
|
|
|
"return-type": "json",
|
|
|
|
"exec-if": "which swaync-client",
|
|
|
|
"exec": "swaync-client -swb",
|
|
|
|
"on-click": "swaync-client -t -sw",
|
|
|
|
"on-click-right": "swaync-client -d -sw",
|
|
|
|
"escape": true
|
|
|
|
},
|
|
|
|
"custom/player": {
|
2022-07-15 12:40:15 +08:00
|
|
|
"format": " {}",
|
2022-06-25 21:26:38 +08:00
|
|
|
"return-type": "json",
|
2022-07-15 12:40:15 +08:00
|
|
|
"exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"class\": \"{{status}}\"}' -F",
|
2022-06-25 21:26:38 +08:00
|
|
|
"max-length": 35,
|
2022-07-15 12:40:15 +08:00
|
|
|
"on-click-middle": "playerctl play-pause",
|
|
|
|
"on-click-right": "plaerctl next",
|
|
|
|
"on-click-left": "playerctl previous"
|
2022-06-25 21:26:38 +08:00
|
|
|
}
|
|
|
|
}
|