feat: lsd -> eza, LS_COLORS sync
This commit is contained in:
parent
75efe54dc0
commit
521417d29d
5 changed files with 102 additions and 47 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"catppuccin-bat": {
|
"catppuccin-bat": {
|
||||||
"cargoLocks": null,
|
"cargoLocks": null,
|
||||||
"date": "2024-03-10",
|
"date": "2024-03-12",
|
||||||
"extract": null,
|
"extract": null,
|
||||||
"name": "catppuccin-bat",
|
"name": "catppuccin-bat",
|
||||||
"passthru": null,
|
"passthru": null,
|
||||||
|
@ -11,12 +11,12 @@
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"leaveDotGit": false,
|
"leaveDotGit": false,
|
||||||
"name": null,
|
"name": null,
|
||||||
"rev": "e9d92785fdf1afe0cd72d8d5ccb6902120d23f77",
|
"rev": "7f5f4f8be7ca2a71712c82e3ce8723674a22bab1",
|
||||||
"sha256": "sha256-bWVgDPaFcJK5sCStt1BvB8MTMy7o2uzLYDAKgWqRs3M=",
|
"sha256": "sha256-DkNZqPhs+U/LCMiYp4gFAorElWik5OGWe12dYinqKWc=",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/catppuccin/bat"
|
"url": "https://github.com/catppuccin/bat"
|
||||||
},
|
},
|
||||||
"version": "e9d92785fdf1afe0cd72d8d5ccb6902120d23f77"
|
"version": "7f5f4f8be7ca2a71712c82e3ce8723674a22bab1"
|
||||||
},
|
},
|
||||||
"catppuccin-wezterm": {
|
"catppuccin-wezterm": {
|
||||||
"cargoLocks": null,
|
"cargoLocks": null,
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
{
|
{
|
||||||
catppuccin-bat = {
|
catppuccin-bat = {
|
||||||
pname = "catppuccin-bat";
|
pname = "catppuccin-bat";
|
||||||
version = "e9d92785fdf1afe0cd72d8d5ccb6902120d23f77";
|
version = "7f5f4f8be7ca2a71712c82e3ce8723674a22bab1";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/catppuccin/bat";
|
url = "https://github.com/catppuccin/bat";
|
||||||
rev = "e9d92785fdf1afe0cd72d8d5ccb6902120d23f77";
|
rev = "7f5f4f8be7ca2a71712c82e3ce8723674a22bab1";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
deepClone = false;
|
deepClone = false;
|
||||||
leaveDotGit = false;
|
leaveDotGit = false;
|
||||||
sha256 = "sha256-bWVgDPaFcJK5sCStt1BvB8MTMy7o2uzLYDAKgWqRs3M=";
|
sha256 = "sha256-DkNZqPhs+U/LCMiYp4gFAorElWik5OGWe12dYinqKWc=";
|
||||||
};
|
};
|
||||||
date = "2024-03-10";
|
date = "2024-03-12";
|
||||||
};
|
};
|
||||||
catppuccin-wezterm = {
|
catppuccin-wezterm = {
|
||||||
pname = "catppuccin-wezterm";
|
pname = "catppuccin-wezterm";
|
||||||
|
|
|
@ -5,6 +5,64 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
|
|
||||||
|
overrides = {
|
||||||
|
mocha = {
|
||||||
|
rosewater = "#ece3e1";
|
||||||
|
flamingo = "#e1d2d2";
|
||||||
|
pink = "#ddccd8";
|
||||||
|
mauve = "#bbb2c9";
|
||||||
|
red = "#c4a2aa";
|
||||||
|
maroon = "#cbadb1";
|
||||||
|
peach = "#d5beb4";
|
||||||
|
yellow = "#ece3d3";
|
||||||
|
green = "#b9ddb6";
|
||||||
|
teal = "#badad4";
|
||||||
|
sky = "#b8d4db";
|
||||||
|
sapphire = "#a9c0ce";
|
||||||
|
blue = "#aab3c7";
|
||||||
|
lavender = "#bfc1d2";
|
||||||
|
text = "#d3d6e1";
|
||||||
|
subtext1 = "#bec2d2";
|
||||||
|
subtext0 = "#a8adc3";
|
||||||
|
overlay2 = "#9299b4";
|
||||||
|
overlay1 = "#7c84a5";
|
||||||
|
overlay0 = "#686f94";
|
||||||
|
surface2 = "#555a7b";
|
||||||
|
surface1 = "#434664";
|
||||||
|
surface0 = "#30314b";
|
||||||
|
base = "#101010";
|
||||||
|
mantle = "#090909";
|
||||||
|
crust = "#080808";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
removeHashes = attrs: builtins.mapAttrs (k: v: lib.removePrefix "#" v) attrs;
|
||||||
|
|
||||||
|
fromYAMLfile = f: let
|
||||||
|
jsonFile = pkgs.runCommand "in-${f}.json" {nativeBuildInputs = [pkgs.gojq];} ''
|
||||||
|
gojq --yaml-input < "${f}" > "$out"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
builtins.fromJSON (builtins.readFile jsonFile);
|
||||||
|
|
||||||
|
vividYaml = let
|
||||||
|
f = flavor: fromYAMLfile "${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml";
|
||||||
|
in {
|
||||||
|
latte = builtins.toJSON (f "latte");
|
||||||
|
mocha = builtins.toJSON (lib.recursiveUpdate (f "mocha") {colors = removeHashes overrides.mocha;});
|
||||||
|
};
|
||||||
|
|
||||||
|
vividBuilder = flavor:
|
||||||
|
pkgs.runCommand "vivid-${flavor}" {
|
||||||
|
nativeBuildInputs = [pkgs.vivid];
|
||||||
|
} ''
|
||||||
|
echo '${builtins.getAttr flavor vividYaml}' > flavor.yml
|
||||||
|
cat ./flavor.yml
|
||||||
|
vivid generate ./flavor.yml > $out
|
||||||
|
'';
|
||||||
|
vividLatte = vividBuilder "latte";
|
||||||
|
vividMocha = vividBuilder "mocha";
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
@ -42,8 +100,12 @@ in {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
zadm_sync() {
|
zadm_sync() {
|
||||||
export STARSHIP_CONFIG__PALETTE="catppuccin_$(dark-mode-ternary mocha latte)"
|
BAT_THEME="Catppuccin $(dark-mode-ternary Mocha Latte)"
|
||||||
export BAT_THEME="Catppuccin $(dark-mode-ternary Mocha Latte)"
|
LS_COLORS="$(cat $(dark-mode-ternary ${vividMocha} ${vividLatte}))"
|
||||||
|
STARSHIP_CONFIG__PALETTE="catppuccin_$(dark-mode-ternary mocha latte)"
|
||||||
|
|
||||||
|
export BAT_THEME LS_COLORS STARSHIP_CONFIG__PALETTE
|
||||||
|
|
||||||
fast-theme "XDG:catppuccin-$(dark-mode-ternary mocha latte)" >/dev/null
|
fast-theme "XDG:catppuccin-$(dark-mode-ternary mocha latte)" >/dev/null
|
||||||
}
|
}
|
||||||
add-zsh-hook precmd zadm_sync
|
add-zsh-hook precmd zadm_sync
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
@import url(//dablulite.github.io/css-snippets/ConsistentChatbar/import.css);
|
@import url(//dablulite.github.io/css-snippets/ConsistentChatbar/import.css);
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap');
|
@import url('//fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--font-primary: "Play", sans-serif;
|
--font-primary: "IBM Plex Sans", sans-serif;
|
||||||
--font-headline: "Play", sans-serif;
|
--font-headline: "IBM Plex Sans", sans-serif;
|
||||||
--font-display: "Play", sans-serif;
|
--font-display: "IBM Plex Sans", sans-serif;
|
||||||
--font-code: "Berkeley Mono", "Symbols Nerd Font", mono;
|
--font-code: "Berkeley Mono", "IBM Plex Mono", "Symbols Nerd Font", mono;
|
||||||
|
}
|
||||||
|
|
||||||
|
div[class*="messageContent__"] {
|
||||||
|
font-family: "IBM Plex Serif", serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
|
|
|
@ -110,6 +110,17 @@ in {
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
direnv.nix-direnv.enable = true;
|
direnv.nix-direnv.enable = true;
|
||||||
|
|
||||||
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
icons = true;
|
||||||
|
extraOptions = [
|
||||||
|
"--group"
|
||||||
|
"--group-directories-first"
|
||||||
|
"--no-permissions"
|
||||||
|
"--octal-permissions"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
colors = {
|
colors = {
|
||||||
|
@ -129,38 +140,6 @@ in {
|
||||||
|
|
||||||
less.enable = true;
|
less.enable = true;
|
||||||
|
|
||||||
lsd = {
|
|
||||||
enable = true;
|
|
||||||
enableAliases = true;
|
|
||||||
settings = {
|
|
||||||
classic = false;
|
|
||||||
blocks = ["permission" "user" "group" "size" "date" "name"];
|
|
||||||
date = "+%y.%m.%d %H:%M";
|
|
||||||
dereference = false;
|
|
||||||
ignore-globs = [".git"];
|
|
||||||
color = {
|
|
||||||
when = "auto";
|
|
||||||
theme = "custom";
|
|
||||||
};
|
|
||||||
icons = {
|
|
||||||
when = "auto";
|
|
||||||
theme = "fancy";
|
|
||||||
separator = " ";
|
|
||||||
};
|
|
||||||
header = false;
|
|
||||||
hyperlink = "auto";
|
|
||||||
indicators = true;
|
|
||||||
layout = "grid";
|
|
||||||
permission = "octal";
|
|
||||||
size = "default";
|
|
||||||
sorting = {
|
|
||||||
column = "name";
|
|
||||||
dir-grouping = "first";
|
|
||||||
};
|
|
||||||
symlink-arrow = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-index-database.comma.enable = true;
|
nix-index-database.comma.enable = true;
|
||||||
|
|
||||||
starship = {
|
starship = {
|
||||||
|
@ -227,11 +206,21 @@ in {
|
||||||
];
|
];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
|
|
||||||
|
ls = "eza";
|
||||||
|
ll = "eza -l";
|
||||||
|
la = "eza -a";
|
||||||
|
lt = "eza -T";
|
||||||
|
lla = "eza -la";
|
||||||
|
llt = "eza -lT";
|
||||||
|
|
||||||
cp = "cp -i";
|
cp = "cp -i";
|
||||||
mv = "mv -i";
|
mv = "mv -i";
|
||||||
rm = "rm -i";
|
rm = "rm -i";
|
||||||
|
|
||||||
# switch between yubikeys for the same GPG key
|
# switch between yubikeys for the same GPG key
|
||||||
switch_yubikeys = ''gpg-connect-agent "scd serialno" "learn --force" "/bye"'';
|
switch_yubikeys = ''gpg-connect-agent "scd serialno" "learn --force" "/bye"'';
|
||||||
|
|
||||||
# podman
|
# podman
|
||||||
docker = "podman";
|
docker = "podman";
|
||||||
docker-compose = "podman-compose";
|
docker-compose = "podman-compose";
|
||||||
|
|
Loading…
Reference in a new issue