diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-16 21:16:31 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-16 21:16:31 +0300 |
commit | c015df322ec4fba41d75b5418bd460de42697e07 (patch) | |
tree | 20e8184470c2f63b4de62734a2c784d5e22e0920 /dotfiles/.config/waybar/config | |
parent | 70fc9fd33fa7e7d7cfc2fc62c8b2a4c4a17bb204 (diff) | |
download | swayrice-c015df322ec4fba41d75b5418bd460de42697e07.tar.gz swayrice-c015df322ec4fba41d75b5418bd460de42697e07.zip |
Use playerctl/MPRIS for media control
Diffstat (limited to 'dotfiles/.config/waybar/config')
-rw-r--r-- | dotfiles/.config/waybar/config | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/dotfiles/.config/waybar/config b/dotfiles/.config/waybar/config index ce0942e..16a6fdb 100644 --- a/dotfiles/.config/waybar/config +++ b/dotfiles/.config/waybar/config @@ -1,11 +1,11 @@ - +// vim: filetype=json { "layer": "bottom", "height": 30, "modules-left": [ "sway/workspaces", "sway/mode", - "mpd", + "custom/waybar-mpris", "pulseaudio" ], "modules-center": [ @@ -30,6 +30,12 @@ "sway/mode": { "format": "<span style=\"italic\">{}</span>" }, + "custom/waybar-mpris": { + "return-type": "json", + "exec": "waybar-mpris --position --autofocus --pause=' <span color=\\\"#5b8277\\\"></span>' --play=' <span color=\\\"#b2872f\\\"></span>'", + "on-click": "waybar-mpris --send toggle", + "on-click-right": "waybar-mpris --send player-next" + }, "mpd": { "format": " {stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon} [{elapsedTime:%M:%S}] {artist} - {title}", "format-disconnected": " Connection lost ", @@ -192,7 +198,7 @@ "format": "<span color=\"#5b8277\"></span> {}", "signal": 7, "interval": "once", - "exec": "barpacstatus", + "exec": "barpacstatus" }, "custom/news-status": { "format": "<span color=\"#5b8277\"></span> {}", |