niri/waybar: now pixel perfect
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
@ -11,191 +11,190 @@
|
|||||||
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;
|
spacing = 6;
|
||||||
spacing = 6;
|
margin-left = 33 + 3;
|
||||||
margin-left = 33 + 3;
|
margin-right = 33 + 3;
|
||||||
margin-right = 33 + 3;
|
margin-bottom = 3;
|
||||||
margin-bottom = 3;
|
reload_style_on_change = true;
|
||||||
reload_style_on_change = true;
|
modules-left = [
|
||||||
modules-left = [
|
"niri/language"
|
||||||
"niri/language"
|
"niri/workspaces"
|
||||||
"niri/workspaces"
|
"wlr/taskbar"
|
||||||
"wlr/taskbar"
|
];
|
||||||
];
|
modules-center = ["clock"];
|
||||||
modules-center = ["clock"];
|
modules-right = [
|
||||||
modules-right = [
|
"wireplumber"
|
||||||
(ifLaptop "group/laptop")
|
(ifLaptop "group/laptop")
|
||||||
"wireplumber"
|
"privacy"
|
||||||
"tray"
|
"tray"
|
||||||
"privacy"
|
"idle_inhibitor"
|
||||||
(ifLaptop "power-profiles-daemon")
|
"custom/notification"
|
||||||
"idle_inhibitor"
|
];
|
||||||
"custom/notification"
|
"niri/workspaces" = {
|
||||||
];
|
format = "{index}";
|
||||||
"niri/workspaces" = {
|
format-icons = {
|
||||||
format = "{index}";
|
"1" = "൧";
|
||||||
format-icons = {
|
"2" = "൨";
|
||||||
"1" = "൧";
|
"3" = "൩";
|
||||||
"2" = "൨";
|
"4" = "൪";
|
||||||
"3" = "൩";
|
"5" = "൫";
|
||||||
"4" = "൪";
|
"6" = "൬";
|
||||||
"5" = "൫";
|
"7" = "൭";
|
||||||
"6" = "൬";
|
"8" = "൮";
|
||||||
"7" = "൭";
|
"9" = "൯";
|
||||||
"8" = "൮";
|
"10" = "൰";
|
||||||
"9" = "൯";
|
general = "";
|
||||||
"10" = "൰";
|
web = "";
|
||||||
general = "";
|
chat = "";
|
||||||
web = "";
|
code = "";
|
||||||
chat = "";
|
uni = "";
|
||||||
code = "";
|
games = "";
|
||||||
uni = "";
|
system = "";
|
||||||
games = "";
|
media = "";
|
||||||
system = "";
|
tray = "";
|
||||||
media = "";
|
|
||||||
tray = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"niri/language" = {
|
|
||||||
format = "{}";
|
|
||||||
format-en = "🇺🇸";
|
|
||||||
format-uk = "🇺🇦";
|
|
||||||
};
|
|
||||||
"custom/separator" = {
|
|
||||||
format = "";
|
|
||||||
interval = "once";
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
"group/laptop" = {
|
|
||||||
orientation = "inherit";
|
|
||||||
modules = [
|
|
||||||
"battery"
|
|
||||||
"backlight"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"backlight" = {
|
|
||||||
format = "{icon} {percent}%";
|
|
||||||
format-icons = [
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"idle_inhibitor" = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = "";
|
|
||||||
deactivated = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"tray" = {
|
|
||||||
icon-size = 20;
|
|
||||||
spacing = 6;
|
|
||||||
};
|
|
||||||
"clock" = {
|
|
||||||
interval = 1;
|
|
||||||
format = "{:%B %d - %H:%M - %A}";
|
|
||||||
tooltip = false;
|
|
||||||
# tooltip-format = "{%y.%m.%d - %B %d, %A}";
|
|
||||||
};
|
|
||||||
battery = {
|
|
||||||
states = {
|
|
||||||
good = 95;
|
|
||||||
warning = 30;
|
|
||||||
critical = 15;
|
|
||||||
};
|
|
||||||
format = "{icon} {capacity}%";
|
|
||||||
format-full = " {capacity}%";
|
|
||||||
format-charging = " {capacity}%";
|
|
||||||
format-plugged = " {capacity}%";
|
|
||||||
format-alt = "{icon} {time}";
|
|
||||||
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
|
||||||
};
|
|
||||||
mpris = {
|
|
||||||
format = "{player_icon} {dynamic}";
|
|
||||||
format-paused = "{status_icon} <i>{dynamic}</i>";
|
|
||||||
playing-len = 30;
|
|
||||||
playing-paused = 30;
|
|
||||||
player-icons = {
|
|
||||||
default = "▶";
|
|
||||||
mpv = "🎵";
|
|
||||||
};
|
|
||||||
status-icons = {paused = "⏸";};
|
|
||||||
};
|
|
||||||
"upower" = {
|
|
||||||
icon-size = 16;
|
|
||||||
format = "{percentage}";
|
|
||||||
hide-if-empty = true;
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-spacing = 20;
|
|
||||||
};
|
|
||||||
"power-profiles-daemon" = {
|
|
||||||
format = "{icon}";
|
|
||||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
|
||||||
tooltip = true;
|
|
||||||
format-icons = {
|
|
||||||
default = "";
|
|
||||||
performance = "";
|
|
||||||
balanced = "";
|
|
||||||
power-saver = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"wireplumber" = {
|
|
||||||
scroll-step = 3;
|
|
||||||
format = "{icon} {volume}%";
|
|
||||||
format-muted = "";
|
|
||||||
format-icons = ["" "" ""];
|
|
||||||
on-click = getExe pkgs.pwvucontrol;
|
|
||||||
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
|
||||||
};
|
|
||||||
"custom/notification" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
notification = "";
|
|
||||||
none = "";
|
|
||||||
dnd-notification = "";
|
|
||||||
dnd-none = "";
|
|
||||||
};
|
|
||||||
return-type = "json";
|
|
||||||
exec-if = "which swaync-client";
|
|
||||||
exec = "swaync-client -swb";
|
|
||||||
on-click = "swaync-client -t -sw";
|
|
||||||
on-click-right = "swaync-client -d -sw";
|
|
||||||
escape = true;
|
|
||||||
};
|
|
||||||
"privacy" = {
|
|
||||||
icon-spacing = 2;
|
|
||||||
icon-size = 16;
|
|
||||||
transition-duration = 250;
|
|
||||||
screenshare = {
|
|
||||||
type = "screenshare";
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-icon-size = 24;
|
|
||||||
};
|
|
||||||
audio-in = {
|
|
||||||
type = "audio-in";
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-icon-size = 24;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"wlr/taskbar" = {
|
|
||||||
format = "{icon}";
|
|
||||||
icon-size = 20;
|
|
||||||
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
|
||||||
tooltip-format = "{title}";
|
|
||||||
on-click = "activate";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"niri/language" = {
|
||||||
|
format = "{}";
|
||||||
|
format-en = "🇺🇸";
|
||||||
|
format-uk = "🇺🇦";
|
||||||
|
};
|
||||||
|
"custom/separator" = {
|
||||||
|
format = "";
|
||||||
|
interval = "once";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"group/laptop" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [
|
||||||
|
"backlight"
|
||||||
|
"battery"
|
||||||
|
"power-profiles-daemon"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"backlight" = {
|
||||||
|
format = "{percent}% {icon}";
|
||||||
|
format-icons = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"idle_inhibitor" = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
activated = "";
|
||||||
|
deactivated = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"tray" = {
|
||||||
|
icon-size = 20;
|
||||||
|
spacing = 6;
|
||||||
|
};
|
||||||
|
"clock" = {
|
||||||
|
interval = 1;
|
||||||
|
format = "{:%B %d - %H:%M - %A}";
|
||||||
|
tooltip = false;
|
||||||
|
# tooltip-format = "{%y.%m.%d - %B %d, %A}";
|
||||||
|
};
|
||||||
|
battery = {
|
||||||
|
states = {
|
||||||
|
good = 95;
|
||||||
|
warning = 30;
|
||||||
|
critical = 15;
|
||||||
|
};
|
||||||
|
format = "{capacity}% {icon}";
|
||||||
|
format-full = "{capacity}% ";
|
||||||
|
format-charging = "{capacity}% ";
|
||||||
|
format-plugged = "{capacity}% ";
|
||||||
|
format-alt = "{icon} {time}";
|
||||||
|
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
||||||
|
};
|
||||||
|
mpris = {
|
||||||
|
format = "{player_icon} {dynamic}";
|
||||||
|
format-paused = "{status_icon} <i>{dynamic}</i>";
|
||||||
|
playing-len = 30;
|
||||||
|
playing-paused = 30;
|
||||||
|
player-icons = {
|
||||||
|
default = "▶";
|
||||||
|
mpv = "🎵";
|
||||||
|
};
|
||||||
|
status-icons = {paused = "⏸";};
|
||||||
|
};
|
||||||
|
"upower" = {
|
||||||
|
icon-size = 16;
|
||||||
|
format = "{percentage}";
|
||||||
|
hide-if-empty = true;
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-spacing = 20;
|
||||||
|
};
|
||||||
|
"power-profiles-daemon" = {
|
||||||
|
format = "{icon}";
|
||||||
|
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||||
|
tooltip = true;
|
||||||
|
format-icons = {
|
||||||
|
default = "";
|
||||||
|
performance = "";
|
||||||
|
balanced = "";
|
||||||
|
power-saver = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"wireplumber" = {
|
||||||
|
scroll-step = 3;
|
||||||
|
format = "{volume}% {icon}";
|
||||||
|
format-muted = "";
|
||||||
|
format-icons = ["" "" ""];
|
||||||
|
on-click = getExe pkgs.pwvucontrol;
|
||||||
|
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||||
|
};
|
||||||
|
"custom/notification" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
notification = "";
|
||||||
|
none = "";
|
||||||
|
dnd-notification = "";
|
||||||
|
dnd-none = "";
|
||||||
|
};
|
||||||
|
return-type = "json";
|
||||||
|
exec-if = "which swaync-client";
|
||||||
|
exec = "swaync-client -swb";
|
||||||
|
on-click = "swaync-client -t -sw";
|
||||||
|
on-click-right = "swaync-client -d -sw";
|
||||||
|
escape = true;
|
||||||
|
};
|
||||||
|
"privacy" = {
|
||||||
|
icon-spacing = 2;
|
||||||
|
icon-size = 16;
|
||||||
|
transition-duration = 250;
|
||||||
|
screenshare = {
|
||||||
|
type = "screenshare";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
};
|
||||||
|
audio-in = {
|
||||||
|
type = "audio-in";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"wlr/taskbar" = {
|
||||||
|
format = "{icon}";
|
||||||
|
icon-size = 18;
|
||||||
|
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||||||
|
tooltip-format = "{title}";
|
||||||
|
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};
|
||||||
@ -214,13 +213,12 @@
|
|||||||
@define-color base0E #${colors.base0E};
|
@define-color base0E #${colors.base0E};
|
||||||
@define-color base0F #${colors.base0F};
|
@define-color base0F #${colors.base0F};
|
||||||
* {
|
* {
|
||||||
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;
|
||||||
@ -231,100 +229,104 @@
|
|||||||
.modules-left,
|
.modules-left,
|
||||||
.modules-center,
|
.modules-center,
|
||||||
.modules-right {
|
.modules-right {
|
||||||
/* border-bottom-left-radius: 12px;
|
/* border-bottom-left-radius: 12px;
|
||||||
border-bottom-right-radius: 12px;
|
border-bottom-right-radius: 12px;
|
||||||
border-top-left-radius: 0px;
|
border-top-left-radius: 0px;
|
||||||
border-top-right-radius: 0px; */
|
border-top-right-radius: 0px; */
|
||||||
background-color: @base00;
|
background-color: @base00;
|
||||||
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;
|
||||||
border: 1px solid @base0E;
|
border: 1px solid @base0E;
|
||||||
}
|
}
|
||||||
tooltip label {
|
tooltip label {
|
||||||
color: @base05;
|
color: @base05;
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
box-shadow: inset 0 -3px transparent;
|
box-shadow: inset 0 -3px transparent;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
button:hover {
|
button:hover {
|
||||||
background: inherit;
|
background: inherit;
|
||||||
box-shadow: inset 0 -3px transparent;
|
box-shadow: inset 0 -3px transparent;
|
||||||
}
|
}
|
||||||
#mode {
|
#mode {
|
||||||
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;
|
||||||
}
|
}
|
||||||
#taskbar button:hover {
|
#taskbar button:hover {
|
||||||
box-shadow: transparent;
|
box-shadow: transparent;
|
||||||
}
|
}
|
||||||
#taskbar.empty,
|
#taskbar.empty,
|
||||||
window#empty {
|
window#empty {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
#battery.critical:not(.charging) {
|
#battery.critical:not(.charging) {
|
||||||
color: @base09;
|
color: @base09;
|
||||||
animation-name: blink;
|
animation-name: blink;
|
||||||
animation-duration: 0.5s;
|
animation-duration: 0.5s;
|
||||||
animation-timing-function: steps(12);
|
animation-timing-function: steps(12);
|
||||||
animation-iteration-count: infinite;
|
animation-iteration-count: infinite;
|
||||||
animation-direction: alternate;
|
animation-direction: alternate;
|
||||||
}
|
}
|
||||||
#power-profiles-daemon.performance {
|
#power-profiles-daemon.performance {
|
||||||
color: @base0D;
|
color: @base0D;
|
||||||
}
|
}
|
||||||
#power-profiles-daemon.balanced {
|
#power-profiles-daemon.balanced {
|
||||||
color: @base0B;
|
color: @base0B;
|
||||||
}
|
}
|
||||||
#power-profiles-daemon.power-saver {
|
#power-profiles-daemon.power-saver {
|
||||||
color: @base0A;
|
color: @base0A;
|
||||||
}
|
}
|
||||||
label:focus {
|
label:focus {
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
#tray > .passive {
|
#tray > .passive {
|
||||||
-gtk-icon-effect: dim;
|
-gtk-icon-effect: dim;
|
||||||
}
|
}
|
||||||
#tray > .needs-attention {
|
#tray > .needs-attention {
|
||||||
-gtk-icon-effect: highlight;
|
-gtk-icon-effect: highlight;
|
||||||
background-color: @base08;
|
background-color: @base08;
|
||||||
}
|
}
|
||||||
#privacy-item.screenshare {
|
#privacy-item.screenshare {
|
||||||
color: @base0C;
|
color: @base0C;
|
||||||
}
|
}
|
||||||
#privacy-item.audio-in {
|
#privacy-item.audio-in {
|
||||||
color: @base0E;
|
color: @base0E;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user