diff options
| -rw-r--r-- | modules/desktop/eww/eww.mustache.scss | 12 | ||||
| -rw-r--r-- | modules/desktop/eww/scss.nix | 23 | ||||
| -rw-r--r-- | modules/desktop/rofi/default.nix | 22 | ||||
| -rw-r--r-- | modules/desktop/rofi/theme.mustache.rasi | 4 |
4 files changed, 48 insertions, 13 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); } diff --git a/modules/desktop/rofi/default.nix b/modules/desktop/rofi/default.nix index d40ccbb..c50447d 100644 --- a/modules/desktop/rofi/default.nix +++ b/modules/desktop/rofi/default.nix @@ -16,10 +16,24 @@ config = lib.mkIf config.desktop.enable { programs.rofi = { enable = true; - theme = "${config.scheme { - template = builtins.readFile ./theme.mustache.rasi; - extension = ".rasi"; - }}"; + theme = + let + template = + builtins.replaceStrings + [ + "@@rofi-font@@" + "@@rofi-font-message@@" + ] + [ + ''"${config.fonts.normal} Bold ${toString config.fonts.size}"'' + ''"${config.fonts.normal} Bold ${toString (config.fonts.size - 4)}"'' + ] + (builtins.readFile ./theme.mustache.rasi); + in + "${config.scheme { + inherit template; + extension = ".rasi"; + }}"; extraConfig = { modi = "drun"; show-icons = true; diff --git a/modules/desktop/rofi/theme.mustache.rasi b/modules/desktop/rofi/theme.mustache.rasi index b2005c1..19a3252 100644 --- a/modules/desktop/rofi/theme.mustache.rasi +++ b/modules/desktop/rofi/theme.mustache.rasi @@ -41,7 +41,7 @@ urgent-background: @base00; urgent-foreground: @base08; - font: "FiraCode Nerd Font Bold 18"; + font: @@rofi-font@@; } window { @@ -151,7 +151,7 @@ message { textbox { background-color: transparent; text-color: @foreground; - font: "FiraCode Nerd Font Bold 14"; + font: @@rofi-font-message@@; } error-message { |
