feat: add stylix and switch font to (very similar) JetBrainsMono for italic support

This commit is contained in:
oddlama 2023-09-21 17:08:44 +02:00
parent e65dac849a
commit 75e943cd1e
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
8 changed files with 229 additions and 61 deletions

View file

@ -1,12 +1,19 @@
{pkgs, ...}: {
{
config,
lib,
pkgs,
...
}: {
home.sessionVariables = {
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
};
stylix.targets.kitty.enable = true;
programs.kitty = {
enable = true;
settings = {
font_family = "FiraCode Nerd Font";
font_size = 20;
bold_font = "${config.programs.kitty.font.name} Bold";
italic_font = "${config.programs.kitty.font.name} Italic";
bold_italic_font = "${config.programs.kitty.font.name} Bold Italic";
# Do not wait for inherited child processes.
close_on_child_death = "yes";
@ -63,7 +70,10 @@
"ctrl+shift+." = "change_font_size all -2.0";
"ctrl+shift+," = "change_font_size all +2.0";
};
extraConfig = ''
# XXX: mkForce to prevent stylix from appending theme.
# Fix this by making a correct theme that can be used.
# TODO aaaaaaaaaa
extraConfig = lib.mkForce ''
# Use nvim as scrollback pager
scrollback_pager nvim -u NONE -c "set nonumber nolist showtabline=0 foldcolumn=0 laststatus=0" -c "autocmd TermOpen * normal G" -c "silent write! /tmp/kitty_scrollback_buffer | te head -c-1 /tmp/kitty_scrollback_buffer; rm /tmp/kitty_scrollback_buffer; cat"
'';