From 74567d5e23c1250499267bf5924fbaeffdaa6611 Mon Sep 17 00:00:00 2001 From: dalahast Date: Mon, 7 Sep 2020 17:54:18 +0200 Subject: [PATCH] update waybar configs --- .config/waybar/config | 24 +++++++++++++++++------- .config/waybar/style.css | 20 +++++++++++++------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.config/waybar/config b/.config/waybar/config index 2a4df09..2071f0e 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -29,9 +29,9 @@ "height": 16, // Waybar height (to be removed for auto height) "width": 1920, // Waybar width // Choose the order of the modules - "modules-left": ["sway/workspaces", "sway/mode"], + "modules-left": ["sway/workspaces", "sway/mode", "custom/mediaplayer"], "modules-center": ["sway/window"], - "modules-right": ["tray", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock#date", "clock#time"], + "modules-right": ["tray","pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery#bat1", "battery#bat2", "clock#date", "clock#time"], // Modules configuration "sway/mode": { @@ -70,6 +70,16 @@ "deactivated": "" } }, + "custom/mediaplayer": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + // "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.local/bin/mediaplayer.py 2> /dev/null" // Script in resources folder + }, "tray": { "icon-size": 16, "spacing": 10 @@ -91,7 +101,7 @@ "interval": 2 }, "memory": { - "format": "{:2}%", + "format": "{}%", "on-click": "exec kitty htop" }, "temperature": { @@ -108,7 +118,7 @@ "format": "{icon}{percent}", "format-icons": [""] }, - "battery": { + "battery#bat1": { "bat": "BAT0", "states": { "good": 95, @@ -117,9 +127,9 @@ }, "format": "{icon}{capacity}%", "format-charging": "{capacity:3}%", - "format-plugged": "{capacity:3}%", + "format-plugged": "", "format-alt": "{icon}{time}", - "format-good": "", // An empty format will hide the module + //"format-good": "", // An empty format will hide the module "format-full": "", "format-icons": ["", "", "", "", ""] }, @@ -134,7 +144,7 @@ "format-charging": "{capacity:3}%", "format-plugged": "{capacity:3}%", "format-alt": "{icon}{time}", - "format-good": "", // An empty format will hide the module + //"format-good": "", // An empty format will hide the module "format-full": "", "format-icons": ["", "", "", "", ""] }, diff --git a/.config/waybar/style.css b/.config/waybar/style.css index b3c5d50..6c6e232 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,10 +1,10 @@ * { border-radius: 0; /* `otf-font-awesome` is required to be installed for icons */ - font-family: 'Anka/Coder';/*Roboto, Helvetica, Arial, sans-serif; */ + font-family: 'Anka/Coder', 'FontAwesome';/*Roboto, Helvetica, Arial, sans-serif; */ font-size: 14px; font-weight: bold; - min-height: 0; + min-height: 16px; } window#waybar { @@ -57,11 +57,17 @@ window#waybar.hidden { #pulseaudio, #tray, #idle_inhibitor, +#custom-mediaplayer, #mpd { padding: 0 1px 0; margin: 0 4px 0; color: #839496; background-color: transparent; + border-top: 2px solid transparent; +} + +#tray { + border-top: 0px; } #clock { @@ -78,12 +84,12 @@ window#waybar.hidden { @keyframes blink { to { - background-color: #ffffff; - color: #000000; + color: #ffffff; + /* color: #000000; */ } } -#battery.critical:not(.charging) { +#battery.bat1.critical:not(.charging) { background-color: #f53c3c; color: #ffffff; animation-name: blink; @@ -94,9 +100,9 @@ window#waybar.hidden { } #network.disconnected { - color: #f53c3c; + color: #eb4d4b; } #temperature.critical { - background-color: #eb4d4b; + color: #f53c3c; }