71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib;
|
|
mkIf (config.xyno.desktop.niri.enable) {
|
|
xyno.desktop.waybar.config = {
|
|
"niri/window" = {
|
|
max-length = 80;
|
|
};
|
|
modules-left = [
|
|
"niri/workspaces"
|
|
"niri/window"
|
|
];
|
|
};
|
|
xyno.desktop.waybar.style = ''
|
|
|
|
#window,
|
|
#workspaces,
|
|
#tags {
|
|
margin: 0 2px;
|
|
}
|
|
|
|
/* If workspaces is the leftmost module, omit left margin */
|
|
.modules-left > widget:first-child > #workspaces {
|
|
margin-left: 0;
|
|
}
|
|
|
|
/* If workspaces is the rightmost module, omit right margin */
|
|
.modules-right > widget:last-child > #workspaces {
|
|
margin-right: 0;
|
|
}
|
|
#workspaces button {
|
|
padding: 0 2px;
|
|
background-color: #1d2021;
|
|
color: #ebdbb2;
|
|
/* Use box-shadow instead of border so the text isn't offset */
|
|
box-shadow: inset 0 -3px transparent;
|
|
/* Avoid rounded borders under each workspace name */
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
|
|
|
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
#workspaces button:hover {
|
|
background: rgba(0, 0, 0, 0.2);
|
|
/* box-shadow: inset 0 -3px #fbf1c7;
|
|
*/
|
|
background-color: #3c3836;
|
|
}
|
|
|
|
#workspaces button.focused {
|
|
/* box-shadow: inset 0 -3px #fbf1c7;
|
|
*/
|
|
background-color: #3c3836;
|
|
color: #ebdbb2;
|
|
}
|
|
|
|
#workspaces button.occupied {
|
|
color: #d3869b;
|
|
}
|
|
#workspaces button.urgent {
|
|
background-color: #cc241d;
|
|
color: #ebdbb2;
|
|
}
|
|
'';
|
|
|
|
}
|