From 79974b69a581fd2fa623f63a0bfb373e09f830b9 Mon Sep 17 00:00:00 2001 From: cswimr Date: Thu, 19 Dec 2024 12:34:42 -0500 Subject: [PATCH] add Catppuccin color schemes for Konsole --- home-manager/plasma.nix | 54 +++++++++++++++++++-------------- nixos/gui-pkgs.nix | 4 ++- packages/catppuccin-konsole.nix | 21 +++++++++++++ 3 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 packages/catppuccin-konsole.nix diff --git a/home-manager/plasma.nix b/home-manager/plasma.nix index 04899a8..ed4d54a 100644 --- a/home-manager/plasma.nix +++ b/home-manager/plasma.nix @@ -1,4 +1,4 @@ -{ user, ... }: +{ pkgs, user, ... }: { programs.plasma = let @@ -133,30 +133,40 @@ kwinrc.Plugins.zoomEnabled = false; }; }; - programs.konsole = { - enable = true; - defaultProfile = "xonsh"; - profiles = { - "xonsh" = { - command = "/run/current-system/sw/bin/xonsh"; - colorScheme = "Catppuccin-Mocha"; - font = { - name = "ComicCodeLigatures Nerd Font"; - size = 12; - }; - extraConfig = { - "General" = { - "Directory" = "/home/${user}"; - "Icon" = "nix-snowflake"; - "StartInCurrentSessionDir" = false; + programs.konsole = + let + colorSchemesPackage = pkgs.callPackage ../packages/catppuccin-konsole.nix { inherit pkgs; }; + in + { + enable = true; + customColorSchemes = { + "Catppuccin Latte" = "${colorSchemesPackage}/themes/catppuccin-latte.colorscheme"; + "Catppuccin Frappe" = "${colorSchemesPackage}/themes/catppuccin-frappe.colorscheme"; + "Catppuccin Macchiato" = "${colorSchemesPackage}/themes/catppuccin-macchiato.colorscheme"; + "Catppuccin Mocha" = "${colorSchemesPackage}/themes/catppuccin-mocha.colorscheme"; + }; + defaultProfile = "xonsh"; + profiles = { + "xonsh" = { + command = "/run/current-system/sw/bin/xonsh"; + colorScheme = "Catppuccin Mocha"; + font = { + name = "ComicCodeLigatures Nerd Font"; + size = 12; }; - "Interaction Options" = { - "AllowEscapedLinks" = true; - "OpenLinksByDirectClickEnabled" = true; - "UnderlineFilesEnabled" = true; + extraConfig = { + "General" = { + "Directory" = "/home/${user}"; + "Icon" = "nix-snowflake"; + "StartInCurrentSessionDir" = false; + }; + "Interaction Options" = { + "AllowEscapedLinks" = true; + "OpenLinksByDirectClickEnabled" = true; + "UnderlineFilesEnabled" = true; + }; }; }; }; }; - }; } diff --git a/nixos/gui-pkgs.nix b/nixos/gui-pkgs.nix index 125c3c4..ae9315d 100644 --- a/nixos/gui-pkgs.nix +++ b/nixos/gui-pkgs.nix @@ -4,7 +4,10 @@ ... }: let + customfonts = pkgs.callPackage ../packages/customfonts.nix { inherit pkgs; }; + catppuccin-konsole = pkgs.callPackage ../packages/catppuccin-konsole.nix { inherit pkgs; }; kdePackages = with pkgs.kdePackages; [ + catppuccin-konsole plasma-browser-integration ]; packages = with pkgs; [ @@ -21,7 +24,6 @@ let libnotify hoppscotch ]; - customfonts = pkgs.callPackage ../packages/customfonts.nix { inherit pkgs; }; in { environment.systemPackages = lib.lists.unique (kdePackages ++ packages); diff --git a/packages/catppuccin-konsole.nix b/packages/catppuccin-konsole.nix new file mode 100644 index 0000000..4b64eb0 --- /dev/null +++ b/packages/catppuccin-konsole.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +pkgs.stdenv.mkDerivation { + name = "catppuccin-konsole"; + version = "1.0.0"; + + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "konsole"; + rev = "3b64040e3f4ae5afb2347e7be8a38bc3cd8c73a8"; + sha256 = "sha256-d5+ygDrNl2qBxZ5Cn4U7d836+ZHz77m6/yxTIANd9BU"; + }; + + installPhase = '' + runHook preInstall + + install -Dm644 themes/*.colorscheme -t $out/themes + + runHook postInstall + ''; +}