fix: declare 'waybar' config and add it to 'niri' desktop

This commit is contained in:
2025-12-03 23:35:59 +01:00
parent dbad023043
commit 683e6e4d10
4 changed files with 88 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
{ {
home.file.".config/niri/config.kdl" = { imports = [ ../../waybar ];
source = ./config.kdl;
}; home.file.".config/niri/config.kdl".source = ./config.kdl;
} }

View File

@@ -0,0 +1,25 @@
[
{
"height": 16,
"spacing": 4,
"modules-left": ["niri/workspaces"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"clock": {
"format": "W{:%V %d %b %H:%M}",
"tooltip-format": "{calendar}",
"format-alt": "{:%Y-%m-%d %H:%M:%S}",
},
"battery": {
"states": {
"good": 80,
"warning": 20,
"critical": 10,
},
"format": "{capacity}%",
"format-charging": "↑{capacity}%",
"format-plugged": "{capacity}%",
"format-alt": "{time}",
},
},
]

View File

@@ -0,0 +1,8 @@
{
programs.waybar = {
enable = true;
};
home.file.".config/waybar/config.jsonc".source = ./config.jsonc;
home.file.".config/waybar/style.css".source = ./style.css;
}

View File

@@ -0,0 +1,52 @@
* {
font-family:
Iosevka Term SS08,
monospace;
font-size: 12px;
border-radius: 0px;
}
.modules-left,
.modules-center,
.modules-right {
margin: 4px;
margin-bottom: 0;
}
window#waybar {
background-color: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button {
padding: 0;
background-color: transparent;
}
#workspaces button:hover {
background: #000000;
}
#workspaces button.focused,
#workspaces button.active {
background-color: #111111;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#clock,
#battery {
padding: 0 4px;
color: #ffffff;
background-color: #111111;
}
#window,
#workspaces {
margin: 0;
}