diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2023-09-10 23:25:28 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2023-09-10 23:25:28 +0530 |
commit | baebc58472716b3f211506cbaf89ad82ffbeeb0f (patch) | |
tree | b364e1e3d90c96935cfcdb9c4b07957b5b578e19 | |
parent | ace4afdad679547c525f2e32e5b62cc2c5feb59f (diff) |
.config: waybar adding playerctl module for spotify
-rw-r--r-- | .config/waybar/config.jsonc | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 01bf558..0c42d02 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -12,10 +12,13 @@ "passthrough": false, "modules-left": [ "custom/launcher", - "hyprland/workspaces" + "hyprland/workspaces", + "custom/playerctl", + "custom/playerlabel" ], "modules-center": [ - "hyprland/window" + "hyprland/window", + "idle_inhibitor" ], "modules-right": [ "cpu", @@ -69,6 +72,32 @@ "deactivated": "" } }, + "custom/playerctl": { + "format": "{icon}", + "return-type": "json", + "max-length": 64, + "exec": "playerctl -p spotify metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", + "on-click-middle": "playerctl -p spotify play-pause", + "on-click": "playerctl -p spotify previous", + "on-click-right": "playerctl -p spotify next", + "format-icons": { + "Playing": "<span foreground='#a6adc8'> </span>", + "Paused": "<span foreground='#a6adc8'> </span>" + } + }, + "custom/playerlabel": { + "format": "<span>{}</span>", + "return-type": "json", + "max-length": 48, + "exec": "playerctl -p spotify metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", + "on-click-middle": "playerctl -p spotify play-pause", + "on-click": "playerctl -p spotify previous", + "on-click-right": "playerctl -p spotify next", + "format-icons": { + "Playing": "<span foreground='#313244'> </span>", + "Paused": "<span foreground='#313244'> </span>" + } + }, "cpu": { "interval": 1, "format": " {usage}% ", |