fix: declare 'waybar' config and add it to 'niri' desktop
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
home.file.".config/niri/config.kdl" = {
|
||||
source = ./config.kdl;
|
||||
};
|
||||
imports = [ ../../waybar ];
|
||||
|
||||
home.file.".config/niri/config.kdl".source = ./config.kdl;
|
||||
}
|
||||
|
||||
25
home/modules/waybar/config.jsonc
Normal file
25
home/modules/waybar/config.jsonc
Normal 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}",
|
||||
},
|
||||
},
|
||||
]
|
||||
8
home/modules/waybar/default.nix
Normal file
8
home/modules/waybar/default.nix
Normal 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;
|
||||
}
|
||||
52
home/modules/waybar/style.css
Normal file
52
home/modules/waybar/style.css
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user