From 94b835dc1a833bc1f4ad57e4b87cea693fd41250 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Mon, 18 Oct 2021 15:50:33 +0300 Subject: [PATCH] Add player module and sway mode --- waybar/config | 21 ++++++++++++++++++--- waybar/style.css | 7 ++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/waybar/config b/waybar/config index 29502d7..35ed44c 100644 --- a/waybar/config +++ b/waybar/config @@ -1,6 +1,6 @@ { "position": "top", - "modules-left": ["sway/workspaces"], + "modules-left": ["sway/workspaces", "custom/player", "sway/mode"], "modules-right": [ "custom/weather", "custom/pacman-updates", @@ -15,16 +15,31 @@ "all-output": true, "format": "{index}" }, + "custom/player": { + "exec": "playerctl metadata -f '{{emoji(status)}} {{title}} by {{artist}}'", + "on-click": "playerctl play-pause", + "on-click-right": "pamixer -t", + "restart-interval": 0, + "tooltip": false, + "max-length": 40 + }, + "sway/mode": { + "format": "--{}--" + }, "custom/weather": { "exec": "curl 'https://wttr.in/?format=1'", - "interval": 60 + "interval": 60, + "on-click": "firefox https://wttr.in", + "tooltip": false }, "custom/pacman-updates": { "exec": "pacman -Qu | wc -l", "interval": 60, "return-type": "{}", - "format": "{} updates" + "format": "{} updates", + "on-click": "alacritty -e sudo pacman -Syu", + "tooltip": false }, "pulseaudio": { "tooltip": false, diff --git a/waybar/style.css b/waybar/style.css index bc5be5c..cbb9702 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -27,9 +27,14 @@ window#waybar { } #workspaces button.urgent { - background: #ffa579; + background: #ffa759; } +#mode { + color: #ffa759; +} + +#custom-player, #custom-weather, #custom-pacman-updates, #clock,