niri/waybar: some fixes, new module

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-07-01 00:33:40 +03:00
parent b42de80180
commit e599e4c5c4
3 changed files with 29 additions and 8 deletions

View File

@ -68,7 +68,7 @@ in {
programs = { programs = {
walker = import ./programs/walker {inherit config inputs pkgs;}; walker = import ./programs/walker {inherit config inputs pkgs;};
waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;};
}; };
services = import ./services {inherit pkgs lockscreen getExe perSystem;}; services = import ./services {inherit pkgs lockscreen getExe perSystem;};

View File

@ -215,6 +215,12 @@ in {
off off
} }
} }
layer-rule {
match namespace="waybar"
match at-startup=true
opacity 0.99 // fixes the black fill
}
window-rule { window-rule {
match title="Картинка в картинці" match title="Картинка в картинці"
@ -250,6 +256,7 @@ in {
block-out-from "screencast" block-out-from "screencast"
} }
binds { binds {
Mod+Shift+Slash { show-hotkey-overlay; } Mod+Shift+Slash { show-hotkey-overlay; }

View File

@ -3,6 +3,7 @@
config, config,
getExe, getExe,
ifLaptop, ifLaptop,
launcher,
pkgs, pkgs,
... ...
}: { }: {
@ -21,6 +22,7 @@
margin-bottom = 3; margin-bottom = 3;
reload_style_on_change = true; reload_style_on_change = true;
modules-left = [ modules-left = [
"custom/launcher"
"niri/language" "niri/language"
"niri/workspaces" "niri/workspaces"
"wlr/taskbar" "wlr/taskbar"
@ -101,7 +103,7 @@
}; };
"clock" = { "clock" = {
interval = 1; interval = 1;
format = "{:%B %d - %H:%M - %A}"; format = "{:%B %d - %R - %A}";
tooltip = false; tooltip = false;
# tooltip-format = "{%y.%m.%d - %B %d, %A}"; # tooltip-format = "{%y.%m.%d - %B %d, %A}";
}; };
@ -155,6 +157,11 @@
on-click = getExe pkgs.pwvucontrol; on-click = getExe pkgs.pwvucontrol;
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
}; };
"custom/launcher" = {
format = "";
on-click = launcher;
tooltip = false;
};
"custom/notification" = { "custom/notification" = {
tooltip = false; tooltip = false;
format = "{icon}"; format = "{icon}";
@ -217,11 +224,14 @@
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;
} }
window#waybar,
.modules-center, .modules-center,
.mpris.stopped { .mpris.stopped {
background-color: transparent; background-color: transparent;
} }
window#waybar {
background: @base00;
border-radius: 24px;
}
.modules-left, .modules-left,
.modules-center, .modules-center,
.modules-right { .modules-right {
@ -231,12 +241,13 @@
border-top-right-radius: 0px; */ border-top-right-radius: 0px; */
background-color: @base00; background-color: @base00;
border-radius: 24px; border-radius: 24px;
border: 1px solid @base0D;
color: @base05; color: @base05;
/* margin: 1px; for the window#waybar border */
} }
tooltip { tooltip {
background: @base01; background: @base01;
border: 1px solid @base0D; border: 1px solid @base0D;
border-radius: 24px;
} }
tooltip label { tooltip label {
color: @base05; color: @base05;
@ -256,6 +267,7 @@
#backlight, #backlight,
#battery, #battery,
#clock, #clock,
#custom-launcher,
#custom-notification, #custom-notification,
#custom-separator, #custom-separator,
#idle_inhibitor, #idle_inhibitor,
@ -274,17 +286,18 @@
padding: 0 6px; padding: 0 6px;
} }
/* left modules */ /* left modules */
#language, #custom-launcher,
/* #language, */
#clock, #clock,
#wireplumber { #wireplumber {
margin: 3px; margin: 3px;
} }
#taskbar button { #taskbar button {
padding: 0 2px; padding: 0 3px;
margin: 3px; margin: 3px;
} }
#workspaces button { #workspaces button {
padding: 0 4px; padding: 0 5px;
margin: 3px; margin: 3px;
} }
#tray button { #tray button {
@ -301,8 +314,9 @@
#wireplumber { #wireplumber {
padding: 0 14px 0 10px; padding: 0 14px 0 10px;
} }
#custom-launcher,
#power-profiles-daemon { #power-profiles-daemon {
padding: 0 16px 0 8px; padding: 0 17px 0 8px;
} }
#privacy, #privacy,
#taskbar, #taskbar,