split waybar into multiple files
This commit is contained in:
parent
53c7532351
commit
7cff7f09c3
29 changed files with 953 additions and 617 deletions
71
modules/desktop/waybar/niri.nix
Normal file
71
modules/desktop/waybar/niri.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
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;
|
||||
}
|
||||
'';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue