Add eww bar

This configuration was simply copied from my old Arch Linux system.
There are some issues that still need to be solved, namely with fonts
and missing bitcoin price script, but it's mostly minor.
This commit is contained in:
ItsDrike 2024-06-20 14:05:43 +02:00
parent a2632b4dea
commit ac23da55c5
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
51 changed files with 1773 additions and 0 deletions

View file

@ -0,0 +1,62 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.bars.eww;
in {
config = mkIf cfg.enable {
programs.eww = {
enable = true;
configDir = ./config;
};
systemd.user.services = {
"eww" = {
Unit = {
Description = "ElKowar's Wacky Widgets (eww) daemon";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
Restart = "always";
ExecStart = pkgs.writeShellScript "eww-daemon" ''
${pkgs.eww}/bin/eww daemon --no-daemonize
'';
# Takes a value between -20 and 19. Higher values (e.g. 19) mean lower priority.
# Lower priority means the process will get less CPU time and therefore will be slower.
# Fortunately, I do not need my status bar to be fast. Also, te difference is almost
# unnoticeable and definitely negligible.
Nice = 19;
};
Install.WantedBy = [ "graphical-session.target" ];
};
"eww-window@" = {
Unit = {
Description = "Open %I eww (ElKowar's Wacky Widgets) window";
After = [ "eww.service" ];
PartOf = [ "graphical-session-pre.target" ];
};
Service = {
Type = "oneshot";
RemainAfterExit = true;
ExecStartPre = "${pkgs.eww}/bin/eww ping";
ExecStart = "${pkgs.eww}/bin/eww open %i";
ExecStop = "${pkgs.eww}/bin/eww close %i";
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
};
}