82 lines
1.5 KiB
Nix
82 lines
1.5 KiB
Nix
{ config, pkgs, lib, inputs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.settings.desktop-environments.niri.waybar;
|
|
in {
|
|
options = {
|
|
settings.desktop-environments.niri.waybar.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
description = ''
|
|
Enable waybar configuration for configuration
|
|
'';
|
|
default = config.settings.desktop-environments.niri.enable;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
stylix.targets.waybar.addCss = false;
|
|
|
|
programs.waybar = {
|
|
enable = true;
|
|
systemd.enable = true;
|
|
};
|
|
|
|
programs.waybar.settings = {
|
|
main = {
|
|
layer = "top";
|
|
position = "top";
|
|
modules-left = [
|
|
"niri/workspaces"
|
|
];
|
|
modules-center = [
|
|
"clock"
|
|
];
|
|
modules-right = [
|
|
"tray"
|
|
"pulseaudio"
|
|
];
|
|
|
|
"clock" = {
|
|
"format" = "{:%H:%M - %a, %d %b %Y}";
|
|
};
|
|
|
|
"tray" = {
|
|
"spacing" = 8;
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.waybar.style = /* css */''
|
|
#workspaces button {
|
|
padding: 0 5px;
|
|
background: transparent;
|
|
color: @base05;
|
|
border-bottom: 2px solid transparent;
|
|
border-radius: 0;
|
|
}
|
|
|
|
window#waybar>box {
|
|
padding: 0 5px;
|
|
}
|
|
|
|
window#waybar {
|
|
background: rgba(0,0,0,0.4);
|
|
}
|
|
|
|
#workspaces button.active {
|
|
border-bottom: 2px solid @base05;
|
|
}
|
|
|
|
#tray {
|
|
padding: 0 5px;
|
|
}
|
|
|
|
#network {
|
|
padding: 0 5px;
|
|
}
|
|
'';
|
|
};
|
|
}
|