From d339e45fc7b42783937e30a952afa2b80793fc27 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 20 Jun 2024 16:32:29 +0100 Subject: [PATCH] Add font size to konsole config Set Emacs font size programatically instead of fixed --- programs/desktop/plasma6/konsole.nix | 5 ++++- programs/emacs/default.nix | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/programs/desktop/plasma6/konsole.nix b/programs/desktop/plasma6/konsole.nix index 0f97acb..a49634a 100644 --- a/programs/desktop/plasma6/konsole.nix +++ b/programs/desktop/plasma6/konsole.nix @@ -6,7 +6,10 @@ profiles.onelight = { name = "One-Light"; colorScheme = "onelight"; - font.name = fonts.monospace.name; + font = { + name = fonts.monospace.name; + size = fonts.sizes.terminal; + }; extraConfig = { "Interaction Options" = { "TextEditorCmd" = 6; diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix index 5d700d7..ce45c77 100644 --- a/programs/emacs/default.nix +++ b/programs/emacs/default.nix @@ -25,6 +25,7 @@ extraConfig = let fixed-font-family = "${fonts.monospace.name}"; variable-font-family = "${fonts.sansSerif.name}"; + font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10)); custom-theme-name = "nix"; custom-theme = pkgs.writeTextFile { name = "custom-emacs-theme"; @@ -35,7 +36,7 @@ (custom-theme-set-faces '${custom-theme-name} - '(default ((t (:family "${fixed-font-family}" :height 120)))) + '(default ((t (:family "${fixed-font-family}" :height ${font-height})))) '(fixed-pitch ((t (:family "${fixed-font-family}")))) '(fixed-pitch-serif ((t (:family "${fixed-font-family}")))) '(variable-pitch ((t (:family "${variable-font-family}")))))