nixfmt all

This commit is contained in:
Noa Aarts 2024-11-07 20:48:01 +01:00
parent 980500842d
commit 42238dc24f
Signed by: noa
GPG key ID: 1850932741EFF672
20 changed files with 333 additions and 245 deletions

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.modules.waybar;
in
@ -41,73 +46,72 @@ in
../../common/colors.nix
];
config =
lib.mkIf cfg.enable
{
modules.waybar.enabled = (
let
mods = config.modules.waybar.modules;
allmodules = mods.left ++ mods.center ++ mods.right;
namedmodules = builtins.map
(n: { name = n; value = { enable = true; }; })
allmodules;
createmodules = builtins.listToAttrs namedmodules;
in
createmodules
);
home.packages = with pkgs;
[
font-awesome
];
programs.waybar = {
enable = true;
package = cfg.package;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 39;
margin-top = 8;
margin-left = 10;
margin-right = 10;
output = builtins.map (display: display.name) config.modules.hyprland.displays;
modules-left = cfg.modules.left;
modules-center = cfg.modules.center;
modules-right = cfg.modules.right;
};
config = lib.mkIf cfg.enable {
modules.waybar.enabled = (
let
mods = config.modules.waybar.modules;
allmodules = mods.left ++ mods.center ++ mods.right;
namedmodules = builtins.map (n: {
name = n;
value = {
enable = true;
};
style = ''
* {
font-family: "Maple Mono NF";
font-size: 14px;
}
}) allmodules;
createmodules = builtins.listToAttrs namedmodules;
in
createmodules
);
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -1px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
border-radius: 999px;
}
tooltip {
background-color: #${config.colorScheme.palette.base00};
border: 1px solid;
border-color: #${config.colorScheme.palette.taskbarText};
border-radius: 10px;
color: #${config.colorScheme.palette.base05};
}
tooltip label {
padding: 5px;
}
'';
home.packages = with pkgs; [
font-awesome
];
programs.waybar = {
enable = true;
package = cfg.package;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 39;
margin-top = 8;
margin-left = 10;
margin-right = 10;
output = builtins.map (display: display.name) config.modules.hyprland.displays;
modules-left = cfg.modules.left;
modules-center = cfg.modules.center;
modules-right = cfg.modules.right;
};
}
;
};
style = ''
* {
font-family: "Maple Mono NF";
font-size: 14px;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -1px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
border-radius: 999px;
}
tooltip {
background-color: #${config.colorScheme.palette.base00};
border: 1px solid;
border-color: #${config.colorScheme.palette.taskbarText};
border-radius: 10px;
color: #${config.colorScheme.palette.base05};
}
tooltip label {
padding: 5px;
}
'';
};
};
}