Bat: use old theme syntax

This commit is contained in:
Toast 2023-10-24 20:15:14 +02:00
parent 5f5c16503a
commit 0d6bdf7d94

View file

@ -1,14 +1,7 @@
{ config, pkgs, ... }:
{
home-manager = {
users.toast.programs.bat = {
enable = true;
config = {
theme = "catppuccin-mocha";
};
themes = {
catppuccin-mocha = {
let
# Home manager on 23.05 doesn't understand the new format, so I'll use the old one until 23.11 becomes stable
newformat = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
@ -17,6 +10,17 @@
};
file = "Catppuccin-mocha.tmTheme";
};
oldformat = builtins.readFile (newformat.src + "/${newformat.file}");
in
{
home-manager = {
users.toast.programs.bat = {
enable = true;
config = {
theme = "catppuccin-mocha";
};
themes = {
catppuccin-mocha = oldformat;
};
};
};