2023-01-10 02:38:06 +01:00
|
|
|
{ pkgs, lib, paths, config, ... }:
|
|
|
|
let
|
2023-03-12 05:24:25 +01:00
|
|
|
base16-polybar = config.lib.stylix.colors {
|
2023-01-15 21:40:21 +01:00
|
|
|
template = builtins.readFile ./template.mustache;
|
2023-01-10 02:38:06 +01:00
|
|
|
};
|
2023-01-10 02:58:59 +01:00
|
|
|
|
|
|
|
script = ''
|
|
|
|
polybar main &
|
|
|
|
'';
|
2023-01-10 02:38:06 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
services.polybar = {
|
2023-01-10 02:58:59 +01:00
|
|
|
inherit script;
|
2023-01-10 02:38:06 +01:00
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
; Generated theme
|
2023-04-01 21:29:47 +02:00
|
|
|
include-file = ${base16-polybar}
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-01-10 16:05:48 +01:00
|
|
|
; Consistent fonts
|
|
|
|
[fonts]
|
2023-03-12 05:24:25 +01:00
|
|
|
regular = "${config.stylix.fonts.sansSerif.name}"
|
|
|
|
monospace = "${config.stylix.fonts.monospace.name}"
|
2023-01-10 16:05:48 +01:00
|
|
|
|
2023-01-10 02:38:06 +01:00
|
|
|
; Actual config
|
2023-01-12 20:49:08 +01:00
|
|
|
${builtins.readFile ./polybar.ini}
|
2023-01-10 02:38:06 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
xsession = {
|
|
|
|
enable = true;
|
2023-01-10 02:58:59 +01:00
|
|
|
initExtra = script;
|
2023-01-10 02:38:06 +01:00
|
|
|
};
|
|
|
|
}
|