From 673a7ff83c25d1d5ad2ac8fd8909ffc4fb47555c Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 13 Sep 2024 23:57:09 +0300 Subject: [PATCH] Waybar : Fix group paddings. --- home/config/waybar/style/Plugin.nix | 14 ++++++++++++-- module/PowerlimitThinkpad.nix | 2 +- module/Powersave.nix | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/home/config/waybar/style/Plugin.nix b/home/config/waybar/style/Plugin.nix index d10e376..e0d6a8d 100644 --- a/home/config/waybar/style/Plugin.nix +++ b/home/config/waybar/style/Plugin.nix @@ -3,11 +3,11 @@ paddingH = "12px"; in { # ISSUE: https://github.com/Alexays/Waybar/issues/3303 + # This way I am forced to apply the padding to children of each group + # instead of the whole group. text = '' - #batteryinfo, #clock, #custom-display, - #hardware, #language, #mpris, #pulseaudio, @@ -18,6 +18,16 @@ in { border-bottom: ${toString config.style.window.border}px solid transparent; } + #cpu, + #battery { + padding-left: ${paddingH}; + } + + #custom-powersave, + #custom-powerlimit { + padding-right: ${paddingH}; + } + #clock { font-weight: bold; } diff --git a/module/PowerlimitThinkpad.nix b/module/PowerlimitThinkpad.nix index 45eee49..2648513 100644 --- a/module/PowerlimitThinkpad.nix +++ b/module/PowerlimitThinkpad.nix @@ -20,7 +20,7 @@ } function widget() { - status || echo -n "" + status && printf '​' || printf '' } function status() { diff --git a/module/Powersave.nix b/module/Powersave.nix index 179abf9..d7594d1 100644 --- a/module/Powersave.nix +++ b/module/Powersave.nix @@ -14,7 +14,7 @@ } function widget() { - status || echo -n "󰓅" + status && printf '​' || printf '󰓅' } function status() {