summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-09-10 23:25:28 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-09-10 23:25:28 +0530
commitbaebc58472716b3f211506cbaf89ad82ffbeeb0f (patch)
treeb364e1e3d90c96935cfcdb9c4b07957b5b578e19 /.config
parentace4afdad679547c525f2e32e5b62cc2c5feb59f (diff)
.config: waybar adding playerctl module for spotify
Diffstat (limited to '.config')
-rw-r--r--.config/waybar/config.jsonc33
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}% ",