From a46e1445a04860ba70fbf4dff3870a5d44265a6d Mon Sep 17 00:00:00 2001 From: theanonymousexyz Date: Fri, 8 Apr 2022 01:01:05 +0200 Subject: [PATCH] Waybar: Add backlight indicator --- waybar/.config/waybar/config | 6 +++++- waybar/.config/waybar/style.css | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index 7591d9f..25b4184 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -6,7 +6,7 @@ // Choose the order of the modules "modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"], "modules-center": ["clock"], - "modules-right": ["custom/ivpn", "network", "pulseaudio", "cpu", "memory", "battery", "tray"], + "modules-right": ["custom/ivpn", "network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"], // Modules configuration "sway/workspaces": { "disable-scroll": true, @@ -103,6 +103,10 @@ }, "on-click": "/usr/bin/pavucontrol" }, + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, "custom/ivpn": { // Custom status module for IVPN "format": "{} IVPN", "exec": "$HOME/.config/waybar/ivpn-status.sh", diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 3f11140..f1aad68 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -102,6 +102,11 @@ window#waybar.hidden { margin-right: 0; } +#backlight { + color: @cyan; + box-shadow: inset 0 3px @cyan; +} + #battery { box-shadow: inset 0 3px @white; } @@ -170,7 +175,7 @@ label:focus { } #tray { - box-shadow: inset 0 3px @blue; + box-shadow: inset 0 3px @cyan; } #tray > .passive {