niri/waybar: now pixel perfect

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-06-29 16:19:04 +03:00
parent 9034502635
commit f854f65029

View File

@ -11,8 +11,7 @@
enable = true; enable = true;
target = "graphical-session.target"; target = "graphical-session.target";
}; };
settings = { settings.bar-0 = {
bar-0 = {
# layer = "top"; # layer = "top";
position = "bottom"; position = "bottom";
height = 24; height = 24;
@ -28,11 +27,10 @@
]; ];
modules-center = ["clock"]; modules-center = ["clock"];
modules-right = [ modules-right = [
(ifLaptop "group/laptop")
"wireplumber" "wireplumber"
"tray" (ifLaptop "group/laptop")
"privacy" "privacy"
(ifLaptop "power-profiles-daemon") "tray"
"idle_inhibitor" "idle_inhibitor"
"custom/notification" "custom/notification"
]; ];
@ -73,12 +71,13 @@
"group/laptop" = { "group/laptop" = {
orientation = "inherit"; orientation = "inherit";
modules = [ modules = [
"battery"
"backlight" "backlight"
"battery"
"power-profiles-daemon"
]; ];
}; };
"backlight" = { "backlight" = {
format = "{icon} {percent}%"; format = "{percent}% {icon}";
format-icons = [ format-icons = [
"󰃚" "󰃚"
"󰃛" "󰃛"
@ -112,10 +111,10 @@
warning = 30; warning = 30;
critical = 15; critical = 15;
}; };
format = "{icon} {capacity}%"; format = "{capacity}% {icon}";
format-full = "󱟢 {capacity}%"; format-full = "{capacity}% 󱟢";
format-charging = "󰂄 {capacity}%"; format-charging = "{capacity}% 󰂄";
format-plugged = "󰚥 {capacity}%"; format-plugged = "{capacity}% 󰚥";
format-alt = "{icon} {time}"; format-alt = "{icon} {time}";
format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
}; };
@ -150,7 +149,7 @@
}; };
"wireplumber" = { "wireplumber" = {
scroll-step = 3; scroll-step = 3;
format = "{icon} {volume}%"; format = "{volume}% {icon}";
format-muted = "󰖁"; format-muted = "󰖁";
format-icons = ["󰕿" "󰖀" "󰕾"]; format-icons = ["󰕿" "󰖀" "󰕾"];
on-click = getExe pkgs.pwvucontrol; on-click = getExe pkgs.pwvucontrol;
@ -189,13 +188,13 @@
}; };
"wlr/taskbar" = { "wlr/taskbar" = {
format = "{icon}"; format = "{icon}";
icon-size = 20; icon-size = 18;
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
tooltip-format = "{title}"; tooltip-format = "{title}";
on-click = "activate"; on-click = "activate";
}; };
}; };
};
style = '' style = ''
@define-color base00 #${colors.base00}; @define-color base00 #${colors.base00};
@define-color base01 #${colors.base01}; @define-color base01 #${colors.base01};
@ -216,11 +215,10 @@
* { * {
font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome;
font-weight: 500; font-weight: 500;
font-size: 100%; font-size: 18px;
} }
window#waybar { window#waybar {
background-color: transparent; background-color: transparent;
color: @base05;
} }
.modules-center { .modules-center {
background-color: transparent; background-color: transparent;
@ -239,7 +237,7 @@
border-radius: 24px; border-radius: 24px;
border: 3px solid @base0D; border: 3px solid @base0D;
color: @base05; color: @base05;
padding: 0 0.4em; padding: 0 3px;
} }
tooltip { tooltip {
background: @base01; background: @base01;
@ -260,28 +258,32 @@
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(0, 0, 0, 0.2);
box-shadow: inset 0 -3px @base05; box-shadow: inset 0 -3px @base05;
} }
#battery,
#backlight, #backlight,
/* #workspaces, #battery,
#taskbar,
#privacy, */
#taskbar button,
#language,
#clock, #clock,
#battery,
#backlight,
#wireplumber,
#workspaces button,
#custom-notification, #custom-notification,
#custom-separator,
#idle_inhibitor, #idle_inhibitor,
#language,
#power-profiles-daemon, #power-profiles-daemon,
#privacy-item, #privacy-item,
#custom-separator { #taskbar button,
padding: 0 0.3em; #taskbar,
#wireplumber,
#workspaces button {
padding: 0 6px;
} }
#tray button { #backlight,
padding: 0 0.3em; #custom-notification,
margin: 0 0.2em; #idle_inhibitor,
#tray button,
#tray {
padding: 0 6px 0 0;
margin: 0 6px 0 0;
}
#power-profiles-daemon {
padding: 0 6px;
margin: 0 6px;
} }
#workspaces button.active { #workspaces button.active {
color: @base0D; color: @base0D;