Modify waybar for sway

This commit is contained in:
exu 2023-11-23 10:44:34 +01:00
parent 1fc1274ca8
commit 80f43743f7

View File

@ -1,70 +1,68 @@
{ {
"layer": "top", "layer": "top",
"position": "bottom", "position": "bottom",
"height": 25, "height": 25,
"spacing": 10, "spacing": 10,
"modules-left": ["wlr/workspaces", "hyprland/window", "hyprland/submap"], "modules-left": ["wlr/workspaces", "sway/window", "sway/mode"],
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": ["mpris", "idle_inhibitor", "battery", "tray"], "modules-right": ["mpris", "idle_inhibitor", "battery", "tray"],
"wlr/workspaces": { "wlr/workspaces": {
"format": "{name}: {icon}", "format": "{name}: {icon}",
"format-icons": { "format-icons": {
"urgent": "", "urgent": "",
"active": "", "active": "",
"default": "" "default": ""
}, },
"sort-by-number": true "sort-by-number": true
}, },
"hyprland/window": { "sway/window": {
"format": "{}", "max-length": 40
"separate-outputs": true },
}, "sway/mode": {
"hyprland/submap": { "tooltip": false
"format": "{}", },
"tooltip": false "mpris": {
}, "format": "{status_icon} {dynamic}",
"mpris": { "format-paused": "{status_icon} <i>{dynamic}</i>",
"format": "{status_icon} {dynamic}", "status-icons": {
"format-paused": "{status_icon} <i>{dynamic}</i>", "playing": "▶",
"status-icons": { "paused": "⏸"
"playing": "▶", }
"paused": "⏸" },
} "battery": {
}, "bat": "BAT0",
"battery": { "states": {
"bat": "BAT0", "warning": 30,
"states": { "critical": 15
"warning": 30, },
"critical": 15 "format": "{capacity}% {icon}",
}, "format-charging": "{capacity}% ",
"format": "{capacity}% {icon}", "format-plugged": "{capacity}% ",
"format-charging": "{capacity}% ", "format-alt": "{time} {icon}",
"format-plugged": "{capacity}% ", "format-icons": ["", "", "", "", ""]
"format-alt": "{time} {icon}", },
"format-icons": ["", "", "", "", ""] "clock": {
}, "timezone": "Europe/Zurich",
"clock": { "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"timezone": "Europe/Zurich", "format-alt": "{:%Y-%m-%d}"
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", },
"format-alt": "{:%Y-%m-%d}" "idle_inhibitor": {
}, "format": "{icon}",
"idle_inhibitor": { "format-icons": {
"format": "{icon}", "activated": "",
"format-icons": { "deactivated": ""
"activated": "", }
"deactivated": "" },
} "tray": {
}, "icon-size": 21,
"tray": { "spacing": 10
"icon-size": 21, },
"spacing": 10 "custom/mpris": {
}, "exec": "~/.scripts/polybar/player-mpris-tail.py -f '{icon} {:artist:t10:{artist}:}{:artist: - :}{:t25:{title}:}'",
"custom/mpris": { "on-click": "~/.scripts/polybar/player-mpris-tail.py play-pause &",
"exec": "~/.scripts/polybar/player-mpris-tail.py -f '{icon} {:artist:t10:{artist}:}{:artist: - :}{:t25:{title}:}'", "on-click-middle": "~/.scripts/polybar/player-mpris-tail.py next &",
"on-click": "~/.scripts/polybar/player-mpris-tail.py play-pause &", "on-click-right": "~/.scripts/polybar/player-mpris-tail.py previous &"
"on-click-middle": "~/.scripts/polybar/player-mpris-tail.py next &", }
"on-click-right": "~/.scripts/polybar/player-mpris-tail.py previous &" }
}
}