Customise emacs fonts to set variable and fixed pitch fonts

TODO build a fixed pitch slab font at some point to complete the set
This commit is contained in:
Evie Litherland-Smith 2024-03-03 08:30:24 +00:00
parent 192ca0bc2f
commit 506ae03c8b

View file

@ -13,11 +13,16 @@
with config; let
shell = "${pkgs.zsh}/bin/zsh";
font = "${stylix.fonts.monospace.name}-${toString stylix.fonts.sizes.applications}";
fixed-font-family = "${stylix.fonts.monospace.name}";
variable-font-family = "${stylix.fonts.sansSerif.name}";
alpha = "${toString (floor (mul stylix.opacity.applications 100))}";
in ''
(customize-set-variable 'shell-file-name "${shell}")
(add-to-list 'initial-frame-alist '(font . "${font}"))
(add-to-list 'default-frame-alist '(font . "${font}"))
(set-face-attribute 'fixed-pitch nil :family "${fixed-font-family}")
(set-face-attribute 'fixed-pitch-serif nil :family "${fixed-font-family}")
(set-face-attribute 'variable-pitch nil :family "${variable-font-family}")
(add-to-list 'initial-frame-alist '(alpha-background . ${alpha}))
(add-to-list 'default-frame-alist '(alpha-background . ${alpha}))
(scroll-bar-mode -1)