Skip to content

Commit

Permalink
feat(rice): catppuccin -> milspec
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed May 30, 2024
1 parent 72ea1a1 commit 8105c1e
Show file tree
Hide file tree
Showing 20 changed files with 181 additions and 310 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Here's what you can find:
- **Firefox** with privacy-centered settings, though I don't use it heavily anymore.
- My **GPG** & **[Sops.nix](https://github.com/Mic92/sops-nix)** settings
- Other random bits of config tools I've collected over the years
- The **[Catppuccin](https://github.com/catppuccin)** theme, wherever possible
- macOS:
- **[Yabai](https://github.com/koekeishiya/yabai)** as my WM
- Linux:
Expand Down
51 changes: 18 additions & 33 deletions _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,33 @@
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "catppuccin",
"repo": "bat",
"rev": "d714cc1d358ea51bfc02550dabab693f70cccea0",
"sha256": "sha256-Q5B4NDrfCIK3UAMs94vdXnR42k4AXCqZz6sRn8bzmf4=",
"type": "git",
"url": "https://github.com/catppuccin/bat"
"type": "github"
},
"version": "d714cc1d358ea51bfc02550dabab693f70cccea0"
},
"catppuccin-wezterm": {
"milspec": {
"cargoLocks": null,
"date": "2023-04-12",
"date": "2024-05-30",
"extract": null,
"name": "catppuccin-wezterm",
"name": "milspec",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da",
"sha256": "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=",
"type": "git",
"url": "https://github.com/catppuccin/wezterm"
"owner": "nekowinston",
"repo": "milspec.nvim",
"rev": "89b7d29dad6708c04821cbf8ba8c80294f8d1733",
"sha256": "sha256-GWto6Y+2ZJXgTbOApQrhzsBT9sPENhgqoD6SSxykAVE=",
"type": "github"
},
"version": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da"
},
"catppuccin-zsh-fsh": {
"cargoLocks": null,
"date": "2024-04-09",
"extract": null,
"name": "catppuccin-zsh-fsh",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"rev": "dd7baca6e0e943f36d1a6721820346e91f25065f",
"sha256": "sha256-qd/+MHmgP+dOnYm6meSu5oCZ/TunCWGHnHqAXm79ERw=",
"type": "git",
"url": "https://github.com/catppuccin/zsh-fsh"
},
"version": "dd7baca6e0e943f36d1a6721820346e91f25065f"
"version": "89b7d29dad6708c04821cbf8ba8c80294f8d1733"
},
"nekowinston-wezterm-bar": {
"cargoLocks": null,
Expand All @@ -68,10 +51,11 @@
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "nekowinston",
"repo": "wezterm-bar",
"rev": "e96b81460b3ad11a7461934dcb7889ce5079f97f",
"sha256": "sha256-3acxqJ9HMA5hASWq/sVL9QQjfEw5Xrh2fT9nFuGjzHM=",
"type": "git",
"url": "https://github.com/nekowinston/wezterm-bar"
"type": "github"
},
"version": "e96b81460b3ad11a7461934dcb7889ce5079f97f"
},
Expand Down Expand Up @@ -102,10 +86,11 @@
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "zdharma-continuum",
"repo": "fast-syntax-highlighting",
"rev": "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9",
"sha256": "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=",
"type": "git",
"url": "https://github.com/zdharma-continuum/fast-syntax-highlighting"
"type": "github"
},
"version": "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9"
}
Expand Down
53 changes: 18 additions & 35 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,35 @@
catppuccin-bat = {
pname = "catppuccin-bat";
version = "d714cc1d358ea51bfc02550dabab693f70cccea0";
src = fetchgit {
url = "https://github.com/catppuccin/bat";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "d714cc1d358ea51bfc02550dabab693f70cccea0";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "sha256-Q5B4NDrfCIK3UAMs94vdXnR42k4AXCqZz6sRn8bzmf4=";
};
date = "2024-04-25";
};
catppuccin-wezterm = {
pname = "catppuccin-wezterm";
version = "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da";
src = fetchgit {
url = "https://github.com/catppuccin/wezterm";
rev = "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da";
milspec = {
pname = "milspec";
version = "89b7d29dad6708c04821cbf8ba8c80294f8d1733";
src = fetchFromGitHub {
owner = "nekowinston";
repo = "milspec.nvim";
rev = "89b7d29dad6708c04821cbf8ba8c80294f8d1733";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=";
sha256 = "sha256-GWto6Y+2ZJXgTbOApQrhzsBT9sPENhgqoD6SSxykAVE=";
};
date = "2023-04-12";
};
catppuccin-zsh-fsh = {
pname = "catppuccin-zsh-fsh";
version = "dd7baca6e0e943f36d1a6721820346e91f25065f";
src = fetchgit {
url = "https://github.com/catppuccin/zsh-fsh";
rev = "dd7baca6e0e943f36d1a6721820346e91f25065f";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "sha256-qd/+MHmgP+dOnYm6meSu5oCZ/TunCWGHnHqAXm79ERw=";
};
date = "2024-04-09";
date = "2024-05-30";
};
nekowinston-wezterm-bar = {
pname = "nekowinston-wezterm-bar";
version = "e96b81460b3ad11a7461934dcb7889ce5079f97f";
src = fetchgit {
url = "https://github.com/nekowinston/wezterm-bar";
src = fetchFromGitHub {
owner = "nekowinston";
repo = "wezterm-bar";
rev = "e96b81460b3ad11a7461934dcb7889ce5079f97f";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "sha256-3acxqJ9HMA5hASWq/sVL9QQjfEw5Xrh2fT9nFuGjzHM=";
};
date = "2023-05-10";
Expand All @@ -64,12 +48,11 @@
zsh-fast-syntax-highlighting = {
pname = "zsh-fast-syntax-highlighting";
version = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
src = fetchgit {
url = "https://github.com/zdharma-continuum/fast-syntax-highlighting";
src = fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=";
};
date = "2023-07-05";
Expand Down
42 changes: 0 additions & 42 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nekowinston-nur.url = "github:nekowinston/nur";
catppuccin-vsc = {
url = "github:catppuccin/vscode";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin-toolbox = {
url = "github:catppuccin/toolbox";
inputs.nixpkgs.follows = "nixpkgs";
};

agenix = {
url = "github:ryantm/agenix";
Expand Down
29 changes: 20 additions & 9 deletions home/apps/colorscheme-sync.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
let
inherit (pkgs.stdenv) isDarwin isLinux;

vividCatppuccin = pkgs.runCommand "vivid-catppuccin" { nativeBuildInputs = [ pkgs.vivid ]; } ''
milspec = (pkgs.callPackage ../../_sources/generated.nix { }).milspec;

vividMilspec = pkgs.runCommand "vivid-catppuccin" { nativeBuildInputs = [ pkgs.vivid ]; } ''
mkdir -p $out
for flavor in mocha macchiato frappe latte; do
vivid generate "catppuccin-''${flavor}" > "$out/''${flavor}"
for variant in dark light; do
vivid generate "${milspec.src}/extras/vivid/milspec-''${variant}.yml" > "$out/''${variant}"
done
'';
in
Expand Down Expand Up @@ -64,31 +66,40 @@ in
};
};

xdg.configFile."fsh".source = "${milspec.src}/extras/zsh-fast-syntax-highlighting";
programs.zsh.initExtra = ''
zadm_sync() {
local flavor="$(dark-mode-ternary mocha latte)"
local variant="$(dark-mode-ternary dark light)"
export BAT_THEME="Catppuccin ''${(C)flavor}"
export LS_COLORS="$(cat "${vividCatppuccin}/''${flavor}")"
export STARSHIP_CONFIG__PALETTE="catppuccin_''${flavor}"
export LS_COLORS="$(cat "${vividMilspec}/''${variant}")"
export STARSHIP_CONFIG__PALETTE="milspec_''${variant}"
fast-theme "XDG:catppuccin-''${flavor}" >/dev/null
fast-theme "XDG:milspec-''${variant}" >/dev/null
}
add-zsh-hook precmd zadm_sync
'';

programs.nushell.extraConfig = ''
use ${milspec.src}/extras/nu/milspec.nu
$env.config = ($env.config? | default {})
$env.config.color_config = (milspec -R dark)
$env.config.hooks = ($env.config.hooks? | default {})
$env.config.hooks.pre_prompt = (
$env.config.hooks.pre_prompt?
| default []
| append {||
let flavor = dark-mode-ternary "mocha" "latte"
let variant = dark-mode-ternary "dark" "light"
$env.config.color_config = (catppuccin $flavor)
$env.config.color_config = (milspec -R $variant)
$env.BAT_THEME = "Catppuccin " + ($flavor | str capitalize)
$env.STARSHIP_CONFIG__PALETTE = "catppuccin_" + $flavor
$env.LS_COLORS = (cat $"${vividCatppuccin}/($flavor)")
$env.STARSHIP_CONFIG__PALETTE = "milspec_" + $variant
$env.LS_COLORS = (cat $"${vividMilspec}/($variant)")
}
)
'';
Expand Down
9 changes: 6 additions & 3 deletions home/apps/nu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
...
}:
let
plugins = "${pkgs.nu_scripts}/share/nu_scripts";
nu_scripts = "${pkgs.nu_scripts}/share/nu_scripts";

# milspec = (pkgs.callPackage ../../_sources/generated.nix { }).milspec;
milspec.src = /Users/winston/Code/neovim/milspec;

shellAliases = lib.concatStringsSep "\n" (
lib.mapAttrsToList (k: v: "alias ${k} = ${v}") config.home.shellAliases
Expand All @@ -20,7 +23,7 @@ let
name = el.name or el;
filename = el.filename or el;
in
"source ${plugins}/custom-completions/${name}/${filename}-completions.nu"
"source ${nu_scripts}/custom-completions/${name}/${filename}-completions.nu"
) completions
);

Expand Down Expand Up @@ -67,7 +70,7 @@ in
|cmd_name| (try { ${command-not-found} $cmd_name })
}
source ${plugins}/aliases/git/git-aliases.nu
source ${nu_scripts}/aliases/git/git-aliases.nu
''
+ shellAliases
+ mkCompletions completions;
Expand Down
19 changes: 5 additions & 14 deletions home/apps/nu/config.nu
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use ($nu.default-config-dir | path join 'config/keybindings.nu')
use ($nu.default-config-dir | path join 'catppuccin.nu')
# use prompt indicators from starship
$env.PROMPT_INDICATOR = ""
Expand All @@ -15,27 +14,20 @@ $env.config = {
clickable_links: true
}
rm: {
always_trash: false
}
rm: { always_trash: false }
table: {
# basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
mode: thin
# "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
mode: psql
index_mode: auto
# show 'empty list' and 'empty record' placeholders for command output
show_empty: true
# a left right padding of each column in a table
padding: { left: 1, right: 1 }
trim: {
methodology: truncating # `wrapping` or `truncating`
methodology: truncating
truncating_suffix: "…"
}
# show header text on separator/border line
header_on_separator: false
header_on_separator: true
# limit data rows from top and bottom after reaching a set point
# abbreviated_row_count: 10
# abbreviated_row_count: 100
}
error_style: fancy
Expand Down Expand Up @@ -91,7 +83,6 @@ $env.config = {
vi_normal: inherit
}
color_config: (catppuccin "mocha")
use_grid_icons: true
# always, never, number_of_rows, auto
footer_mode: 20
Expand Down
Loading

0 comments on commit 8105c1e

Please sign in to comment.