diff options
| -rw-r--r-- | modules/desktop/eww/bar.nix (renamed from modules/desktop/eww/yuck.nix) | 0 | ||||
| -rw-r--r-- | modules/desktop/eww/default.nix | 47 | ||||
| -rw-r--r-- | modules/desktop/eww/scss.nix | 28 |
3 files changed, 45 insertions, 30 deletions
diff --git a/modules/desktop/eww/yuck.nix b/modules/desktop/eww/bar.nix index 4f6c158..4f6c158 100644 --- a/modules/desktop/eww/yuck.nix +++ b/modules/desktop/eww/bar.nix diff --git a/modules/desktop/eww/default.nix b/modules/desktop/eww/default.nix index e22f8c6..fad0cc4 100644 --- a/modules/desktop/eww/default.nix +++ b/modules/desktop/eww/default.nix @@ -5,7 +5,7 @@ }: { imports = [ - ./yuck.nix + ./bar.nix ]; options.desktop.eww = { @@ -21,7 +21,50 @@ programs.eww = { enable = true; systemd.enable = true; - scssConfig = builtins.readFile (import ./scss.nix { inherit config; }); + scssConfig = + let + baseSize = config.fonts.size; + in + builtins.readFile ( + config.scheme { + template = + builtins.replaceStrings + [ + "@@font-family@@" + "@@font-size@@" + "@@font-size-icon@@" + "@@font-size-label@@" + "@@font-size-small@@" + "@@font-size-idx@@" + ] + [ + config.fonts.normal + (toString baseSize) + (toString (baseSize + 6)) + (toString (baseSize - 2)) + (toString (baseSize - 6)) + (toString (baseSize - 4)) + ] + (builtins.readFile ./eww.mustache.scss); + } + ); + }; + + systemd.user.services.eww-bar = { + Unit = { + Description = "Open Eww Bar"; + After = [ "eww.service" ]; + Requires = [ "eww.service" ]; + }; + Service = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${lib.getExe config.desktop.eww.package} open bar"; + ExecStop = "${lib.getExe config.desktop.eww.package} close bar"; + }; + Install = { + WantedBy = [ config.programs.eww.systemd.target ]; + }; }; }; } diff --git a/modules/desktop/eww/scss.nix b/modules/desktop/eww/scss.nix deleted file mode 100644 index f625199..0000000 --- a/modules/desktop/eww/scss.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - ... -}: -let - baseSize = config.fonts.size; -in -config.scheme { - template = - builtins.replaceStrings - [ - "@@font-family@@" - "@@font-size@@" - "@@font-size-icon@@" - "@@font-size-label@@" - "@@font-size-small@@" - "@@font-size-idx@@" - ] - [ - config.fonts.normal - (toString baseSize) - (toString (baseSize + 6)) - (toString (baseSize - 2)) - (toString (baseSize - 6)) - (toString (baseSize - 4)) - ] - (builtins.readFile ./eww.mustache.scss); -} |
