From 1f858c896e41df68bc8d6c5377b345c76a50e823 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Sat, 9 Nov 2024 16:15:01 -0500 Subject: [PATCH] feat: delta theme --- .config/nix/TODO.md | 1 + .config/nix/files/delta/themes.gitconfig | 20 ++++++++++++++++++++ .config/nix/modules/git.nix | 4 ++++ .config/nix/modules/home-manager.nix | 4 ++++ 4 files changed, 29 insertions(+) create mode 100644 .config/nix/files/delta/themes.gitconfig diff --git a/.config/nix/TODO.md b/.config/nix/TODO.md index 1f79c50..2d42771 100644 --- a/.config/nix/TODO.md +++ b/.config/nix/TODO.md @@ -1,5 +1,6 @@ # TODO +- bat theme - delta theme https://dandavison.github.io/delta/custom-themes.html - separate repo for dotfiles (remove bare git repo) - swap fish pure for starship prompt (https://starship.rs) diff --git a/.config/nix/files/delta/themes.gitconfig b/.config/nix/files/delta/themes.gitconfig new file mode 100644 index 0000000..42d1171 --- /dev/null +++ b/.config/nix/files/delta/themes.gitconfig @@ -0,0 +1,20 @@ +[delta "rsms-dark"] + file-style = "#BFBFBF" + file-decoration-style = "#272725 ul" + line-numbers-zero-style = "#4A4945" + line-numbers-right-style = "#272725" + line-numbers-left-style = "#272725" + + hunk-header-style = "omit" + + line-numbers-minus-style = "#F43" + minus-emph-style = syntax "#F43" + minus-empty-line-marker-style = syntax "#3D0500" + minus-non-emph-style = syntax "#3D0500" + minus-style = syntax "#3D0500" + + line-numbers-plus-style = "#00DB6E" + plus-emph-style = syntax "#00DB6E" + plus-empty-line-marker-style = syntax "#002E17" + plus-non-emph-style = syntax "#002E17" + plus-style = syntax "#002E17" diff --git a/.config/nix/modules/git.nix b/.config/nix/modules/git.nix index 3dced3c..d309830 100644 --- a/.config/nix/modules/git.nix +++ b/.config/nix/modules/git.nix @@ -49,6 +49,7 @@ }; credential.helper = "osxkeychain"; delta = { + features = "rsms-dark"; # TODO: nvim support # hyperlinks = true; navigate = true; @@ -60,6 +61,9 @@ format = "ssh"; ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; }; + include = { + path = "~/.config/delta/themes.gitconfig"; + }; init.defaultBranch = "main"; interactive = { diffFilter = "delta --color-only"; diff --git a/.config/nix/modules/home-manager.nix b/.config/nix/modules/home-manager.nix index 44b1862..9e7e463 100644 --- a/.config/nix/modules/home-manager.nix +++ b/.config/nix/modules/home-manager.nix @@ -73,6 +73,10 @@ xdg = { enable = true; configFile = { + "delta" = { + source = ../files/delta; + recursive = true; + }; "fish" = { source = ../files/fish; recursive = true;