mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 20:00:42 +00:00
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:
parent
a2632b4dea
commit
ac23da55c5
51 changed files with 1773 additions and 0 deletions
62
home/programs/graphical/bars/eww/default.nix
Normal file
62
home/programs/graphical/bars/eww/default.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue