about summary refs log tree commit diff
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2024-12-14T13·52+0100
committerProfpatsch <mail@profpatsch.de>2024-12-16T17·27+0000
commitcd521a168e52254a6bf6225403b8b38dd597e8a4 (patch)
tree065b50213079da4e238db03590aa8d74c7019d68
parent6068d044b337eb56ed82636b8d1a48eb34701568 (diff)
feat(users/Profpatsch/alacritty): add modus & ef themes r/9007
Change-Id: I133f29e38f1e9c9c8b75468993b97951aff3e9da
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12894
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
-rw-r--r--users/Profpatsch/alacritty-change-color-scheme/alacritty-change-color-scheme.js1
-rw-r--r--users/Profpatsch/alacritty-change-color-scheme/cool-themes7
-rw-r--r--users/Profpatsch/alacritty.nix42
3 files changed, 48 insertions, 2 deletions
diff --git a/users/Profpatsch/alacritty-change-color-scheme/alacritty-change-color-scheme.js b/users/Profpatsch/alacritty-change-color-scheme/alacritty-change-color-scheme.js
index 3fa274ff3908..94ce639a2a6c 100644
--- a/users/Profpatsch/alacritty-change-color-scheme/alacritty-change-color-scheme.js
+++ b/users/Profpatsch/alacritty-change-color-scheme/alacritty-change-color-scheme.js
@@ -449,6 +449,7 @@ async function exportColorSchemeDbusInterface() {
       }
       const themePath = await getThemePath(theme);
       if (themePath === null) {
+        console.warn(`Theme ${theme} not found`);
         return;
       }
       if (cs === 'dark') {
diff --git a/users/Profpatsch/alacritty-change-color-scheme/cool-themes b/users/Profpatsch/alacritty-change-color-scheme/cool-themes
index ea8bfd46d7ec..8d2a9a519c4a 100644
--- a/users/Profpatsch/alacritty-change-color-scheme/cool-themes
+++ b/users/Profpatsch/alacritty-change-color-scheme/cool-themes
@@ -6,3 +6,10 @@ monokai_pro
 
 
 night_owlish_light
+papercolor_light
+everforest_light
+github_light
+gruvbox_light
+one_light
+papertheme
+rose_pine_dawn
diff --git a/users/Profpatsch/alacritty.nix b/users/Profpatsch/alacritty.nix
index 05300580e34c..a6a9963582f4 100644
--- a/users/Profpatsch/alacritty.nix
+++ b/users/Profpatsch/alacritty.nix
@@ -1,7 +1,8 @@
 { depot, pkgs, lib, ... }:
 
 let
-  bins = depot.nix.getBins pkgs.alacritty [ "alacritty" ];
+  bins = depot.nix.getBins pkgs.alacritty [ "alacritty" ]
+    // depot.nix.getBins pkgs.coreutils [ "mkdir" "cp" "install" ];
 
   # https://github.com/alacritty/alacritty-theme
   themes = {
@@ -37,14 +38,51 @@ let
     ]
   );
 
-  alacritty-themes = pkgs.fetchFromGitHub {
+  alacritty-themes-upstream = pkgs.fetchFromGitHub {
     owner = "alacritty";
     repo = "alacritty-theme";
     rev = "95a7d695605863ede5b7430eb80d9e80f5f504bc";
     sha256 = "sha256-D37MQtNS20ESny5UhW1u6ELo9czP4l+q0S8neH7Wdbc=";
   };
 
+  alacritty-themes-modes-ef = pkgs.fetchFromGitHub {
+    owner = "anhsirk0";
+    repo = "alacritty-themes";
+    rev = "5a2c194a682ec75d46553f9a9d6c43fbf39c689d";
+    sha256 = "sha256-x5QrtSXNc05DNexM+ZtRzd8T9FdthZUzjW/2uEBdRCk=";
+  };
 
+  alacritty-themes = depot.nix.runExecline "alacritty-themes-merged" { } [
+    "importas"
+    "out"
+    "out"
+    "if"
+    [ bins.mkdir "-p" "$\{out}/themes" ]
+    "if"
+    [
+      "elglob"
+      "-0"
+      "themes"
+      "${alacritty-themes-upstream}/themes/*"
+      bins.install
+      "-m644"
+      "-t"
+      "\${out}/themes"
+      "$themes"
+    ]
+    "if"
+    [
+      "elglob"
+      "-0"
+      "themes"
+      "${alacritty-themes-modes-ef}/themes/*"
+      bins.install
+      "-m644"
+      "-t"
+      "\${out}/themes"
+      "$themes"
+    ]
+  ];
 in
 {
   inherit