aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/eww
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/eww')
-rw-r--r--modules/desktop/eww/eww.mustache.scss12
-rw-r--r--modules/desktop/eww/scss.nix23
2 files changed, 28 insertions, 7 deletions
diff --git a/modules/desktop/eww/eww.mustache.scss b/modules/desktop/eww/eww.mustache.scss
index 7b409f3..6e8a152 100644
--- a/modules/desktop/eww/eww.mustache.scss
+++ b/modules/desktop/eww/eww.mustache.scss
@@ -1,6 +1,6 @@
* {
- font-family: "Fira Code Nerd Font";
- font-size: 18px;
+ font-family: "@@font-family@@";
+ font-size: @@font-size@@px;
min-height: 0;
}
@@ -28,7 +28,7 @@ window#eww-bar {
.workspace-button, .window-button, .system-item {
color: #{{base07}};
- font-size: 24px;
+ font-size: @@font-size-icon@@px;
background-color: #{{base00}};
background-image: none;
box-shadow: none;
@@ -47,7 +47,7 @@ window#eww-bar {
}
.system-item .system-label.small {
- font-size: 12px;
+ font-size: @@font-size-small@@px;
}
.system > .system-item:last-child {
@@ -55,7 +55,7 @@ window#eww-bar {
}
.system-item .system-label {
- font-size: 16px;
+ font-size: @@font-size-label@@px;
}
.system-item .system-icon {
@@ -72,7 +72,7 @@ window#eww-bar {
}
.workspace-button .workspace-idx {
- font-size: 14px;
+ font-size: @@font-size-idx@@px;
background: #{{base00}};
opacity: 0.7;
color: #{{base07}};
diff --git a/modules/desktop/eww/scss.nix b/modules/desktop/eww/scss.nix
index 408ff64..f625199 100644
--- a/modules/desktop/eww/scss.nix
+++ b/modules/desktop/eww/scss.nix
@@ -2,6 +2,27 @@
config,
...
}:
+let
+ baseSize = config.fonts.size;
+in
config.scheme {
- template = builtins.readFile ./eww.mustache.scss;
+ 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);
}