From e1cd93d6d13d017d2b9f9e00785d4bba9aa6f90e Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 29 Jul 2023 13:10:46 +0800 Subject: [PATCH] feat: customize all app's theme to catppuccin-mocha --- flake.lock | 119 +++ flake.nix | 184 ++-- .../{alacritty/default.nix => alacritty.nix} | 5 +- .../desktop/alacritty/theme_catppuccin.yml | 40 - home/base/desktop/default.nix | 4 +- .../desktop/{helix/default.nix => helix.nix} | 13 +- .../desktop/helix/theme_catppuccin_mocha.toml | 149 --- home/base/desktop/kitty.nix | 2 +- home/base/server/{bat/default.nix => bat.nix} | 4 +- home/base/server/bat/Catppuccin-mocha.tmTheme | 959 ------------------ home/base/server/core.nix | 22 +- home/base/server/default.nix | 2 +- home/base/server/nushell/config.nu | 74 +- home/base/server/starship.nix | 6 +- home/linux/base/btop.nix | 15 + home/linux/base/default.nix | 1 + home/linux/base/system-tools.nix | 2 - home/linux/fcitx5/classicui.conf | 1 + home/linux/fcitx5/default.nix | 6 +- home/linux/hyprland/default.nix | 27 +- home/linux/hyprland/gtk-3.0/settings.ini | 16 - home/linux/hyprland/gtkrc-2.0 | 19 - home/linux/hyprland/hypr-conf/hyprland.conf | 3 + home/linux/i3/config | 69 +- 24 files changed, 432 insertions(+), 1310 deletions(-) rename home/base/desktop/{alacritty/default.nix => alacritty.nix} (95%) delete mode 100644 home/base/desktop/alacritty/theme_catppuccin.yml rename home/base/desktop/{helix/default.nix => helix.nix} (53%) delete mode 100644 home/base/desktop/helix/theme_catppuccin_mocha.toml rename home/base/server/{bat/default.nix => bat.nix} (72%) delete mode 100644 home/base/server/bat/Catppuccin-mocha.tmTheme create mode 100644 home/linux/base/btop.nix create mode 100644 home/linux/fcitx5/classicui.conf delete mode 100644 home/linux/hyprland/gtk-3.0/settings.ini delete mode 100644 home/linux/hyprland/gtkrc-2.0 diff --git a/flake.lock b/flake.lock index 5db55b1d..36c11549 100644 --- a/flake.lock +++ b/flake.lock @@ -38,6 +38,118 @@ "type": "github" } }, + "catppuccin-alacritty": { + "flake": false, + "locked": { + "lastModified": 1664239314, + "narHash": "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=", + "owner": "catppuccin", + "repo": "alacritty", + "rev": "3c808cbb4f9c87be43ba5241bc57373c793d2f17", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "alacritty", + "type": "github" + } + }, + "catppuccin-bat": { + "flake": false, + "locked": { + "lastModified": 1668065083, + "narHash": "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=", + "owner": "catppuccin", + "repo": "bat", + "rev": "ba4d16880d63e656acced2b7d4e034e4a93f74b1", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "bat", + "type": "github" + } + }, + "catppuccin-btop": { + "flake": false, + "locked": { + "lastModified": 1686163899, + "narHash": "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk=", + "owner": "catppuccin", + "repo": "btop", + "rev": "89ff712eb62747491a76a7902c475007244ff202", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "btop", + "type": "github" + } + }, + "catppuccin-fcitx5": { + "flake": false, + "locked": { + "lastModified": 1664946380, + "narHash": "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=", + "owner": "catppuccin", + "repo": "fcitx5", + "rev": "ce244cfdf43a648d984719fdfd1d60aab09f5c97", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "fcitx5", + "type": "github" + } + }, + "catppuccin-helix": { + "flake": false, + "locked": { + "lastModified": 1680791535, + "narHash": "sha256-aa8KZ7/1TXcBqaV/TYOZ8rpusOf5QeQ9i2Upnncbziw=", + "owner": "catppuccin", + "repo": "helix", + "rev": "5677c16dc95297a804caea9161072ff174018fdd", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "helix", + "type": "github" + } + }, + "catppuccin-hyprland": { + "flake": false, + "locked": { + "lastModified": 1683122293, + "narHash": "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=", + "owner": "catppuccin", + "repo": "hyprland", + "rev": "99a88fd21fac270bd999d4a26cf0f4a4222c58be", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "hyprland", + "type": "github" + } + }, + "catppuccin-starship": { + "flake": false, + "locked": { + "lastModified": 1689246850, + "narHash": "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=", + "owner": "catppuccin", + "repo": "starship", + "rev": "5629d2356f62a9f2f8efad3ff37476c19969bd4f", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "starship", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -464,6 +576,13 @@ "inputs": { "agenix": "agenix", "astronvim": "astronvim", + "catppuccin-alacritty": "catppuccin-alacritty", + "catppuccin-bat": "catppuccin-bat", + "catppuccin-btop": "catppuccin-btop", + "catppuccin-fcitx5": "catppuccin-fcitx5", + "catppuccin-helix": "catppuccin-helix", + "catppuccin-hyprland": "catppuccin-hyprland", + "catppuccin-starship": "catppuccin-starship", "home-manager": "home-manager_2", "hyprland": "hyprland", "mysecrets": "mysecrets", diff --git a/flake.nix b/flake.nix index 3bf134c3..4907b3e7 100644 --- a/flake.nix +++ b/flake.nix @@ -8,82 +8,6 @@ # ################################################################################################################## - # the nixConfig here only affects the flake itself, not the system configuration! - nixConfig = { - experimental-features = ["nix-command" "flakes"]; - - substituters = [ - # replace official cache with a mirror located in China - "https://mirrors.ustc.edu.cn/nix-channels/store" - "https://cache.nixos.org" - ]; - - # nix community's cache server - extra-substituters = [ - "https://nix-community.cachix.org" - "https://nixpkgs-wayland.cachix.org" - ]; - extra-trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" - ]; - }; - - # This is the standard format for flake.nix. `inputs` are the dependencies of the flake, - # Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built. - inputs = { - # There are many ways to reference flake inputs. The most widely used is github:owner/name/reference, - # which represents the GitHub repository URL + branch/commit-id/tag. - - # Official NixOS package source, using nixos's stable branch by default - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - - # for macos - nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin"; - nix-darwin = { - url = "github:lnl7/nix-darwin"; - inputs.nixpkgs.follows = "nixpkgs-darwin"; - }; - - # home-manager, used for managing user configuration - home-manager = { - url = "github:nix-community/home-manager/release-23.05"; - # The `follows` keyword in inputs is used for inheritance. - # Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake, - # to avoid problems caused by different versions of nixpkgs dependencies. - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # modern window compositor - hyprland.url = "github:hyprwm/Hyprland/v0.27.2"; - # community wayland nixpkgs - nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; - - # generate iso/qcow2/docker/... image from nixos configuration - nixos-generators = { - url = "github:nix-community/nixos-generators"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # secrets management, lock with git commit at 2023/7/15 - agenix.url = "github:ryantm/agenix/0d8c5325fc81daf00532e3e26c6752f7bcde1143"; - - # AstroNvim is an aesthetic and feature-rich neovim config. - astronvim = { - url = "github:AstroNvim/AstroNvim/v3.34.0"; - flake = false; - }; - - # my private secrets, it's a private repository, you need to replace it with your own. - # use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time - mysecrets = { - url = "git+ssh://git@github.com/ryan4yin/nix-secrets.git?shallow=1"; - flake = false; - }; - }; - # The `outputs` function will return all the build results of the flake. # A flake can have many use cases and different types of outputs, # parameters in `outputs` are defined in `inputs` and can be referenced by their names. @@ -231,4 +155,112 @@ nixpkgs.legacyPackages.${system}.alejandra ); }; + + + # This is the standard format for flake.nix. `inputs` are the dependencies of the flake, + # Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built. + inputs = { + # There are many ways to reference flake inputs. The most widely used is github:owner/name/reference, + # which represents the GitHub repository URL + branch/commit-id/tag. + + # Official NixOS package source, using nixos's stable branch by default + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + # for macos + nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin"; + nix-darwin = { + url = "github:lnl7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs-darwin"; + }; + + # home-manager, used for managing user configuration + home-manager = { + url = "github:nix-community/home-manager/release-23.05"; + # The `follows` keyword in inputs is used for inheritance. + # Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake, + # to avoid problems caused by different versions of nixpkgs dependencies. + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # modern window compositor + hyprland.url = "github:hyprwm/Hyprland/v0.27.2"; + # community wayland nixpkgs + nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; + + # generate iso/qcow2/docker/... image from nixos configuration + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # secrets management, lock with git commit at 2023/7/15 + agenix.url = "github:ryantm/agenix/0d8c5325fc81daf00532e3e26c6752f7bcde1143"; + + # AstroNvim is an aesthetic and feature-rich neovim config. + astronvim = { + url = "github:AstroNvim/AstroNvim/v3.34.0"; + flake = false; + }; + + # my private secrets, it's a private repository, you need to replace it with your own. + # use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time + mysecrets = { + url = "git+ssh://git@github.com/ryan4yin/nix-secrets.git?shallow=1"; + flake = false; + }; + + # color scheme - catppuccin + catppuccin-btop = { + url = "github:catppuccin/btop"; + flake = false; + }; + catppuccin-fcitx5 = { + url = "github:catppuccin/fcitx5"; + flake = false; + }; + catppuccin-bat = { + url = "github:catppuccin/bat"; + flake = false; + }; + catppuccin-alacritty = { + url = "github:catppuccin/alacritty"; + flake = false; + }; + catppuccin-helix = { + url = "github:catppuccin/helix"; + flake = false; + }; + catppuccin-starship = { + url = "github:catppuccin/starship"; + flake = false; + }; + catppuccin-hyprland = { + url = "github:catppuccin/hyprland"; + flake = false; + }; + }; + + + # the nixConfig here only affects the flake itself, not the system configuration! + nixConfig = { + experimental-features = ["nix-command" "flakes"]; + + substituters = [ + # replace official cache with a mirror located in China + "https://mirrors.ustc.edu.cn/nix-channels/store" + "https://cache.nixos.org" + ]; + + # nix community's cache server + extra-substituters = [ + "https://nix-community.cachix.org" + "https://nixpkgs-wayland.cachix.org" + ]; + extra-trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" + ]; + }; } diff --git a/home/base/desktop/alacritty/default.nix b/home/base/desktop/alacritty.nix similarity index 95% rename from home/base/desktop/alacritty/default.nix rename to home/base/desktop/alacritty.nix index 0a509f10..068857b3 100644 --- a/home/base/desktop/alacritty/default.nix +++ b/home/base/desktop/alacritty.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: +{pkgs, catppuccin-alacritty, ...}: ########################################################### # # Alacritty Configuration @@ -18,6 +18,7 @@ # ########################################################### { + xdg.configFile."alacritty/theme_catppuccin.yml".source = "${catppuccin-alacritty}/catppuccin-mocha.yml"; programs.alacritty = { enable = true; }; @@ -95,6 +96,4 @@ size: 13 '' ); - - xdg.configFile."alacritty/theme_catppuccin.yml".source = ./theme_catppuccin.yml; } diff --git a/home/base/desktop/alacritty/theme_catppuccin.yml b/home/base/desktop/alacritty/theme_catppuccin.yml deleted file mode 100644 index fd99700d..00000000 --- a/home/base/desktop/alacritty/theme_catppuccin.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Catppuccin theme scheme for Alacritty - -colors: - primary: - background: '#1E1E2E' - foreground: '0xd6d6d6' - - cursor: - text: '#CDD6F4' - cursor: '#D9D9D9' - - normal: - black: '#181A1F' - red: '#E86671' - green: '#98C379' - yellow: '#E5C07B' - blue: '#61AFEF' - magenta: '#C678DD' - cyan: '#54AFBC' - white: '#ABB2BF' - - bright: - black: '#5C6370' - red: '#E86671' - green: '#98C379' - yellow: '#E5C07B' - blue: '#61AFEF' - magenta: '#C678DD' - cyan: '#54AFBC' - white: '0xf7f7f7' - - dim: - black: '#5C6370' - red: '0x74423f' - green: '#98C379' - yellow: '#E5C07B' - blue: '#61AFEF' - magenta: '0x6e4962' - cyan: '0x5c8482' - white: '0x828282' diff --git a/home/base/desktop/default.nix b/home/base/desktop/default.nix index 3974f2cd..5788be3c 100644 --- a/home/base/desktop/default.nix +++ b/home/base/desktop/default.nix @@ -2,11 +2,11 @@ imports = [ ../server - ./alacritty - ./helix ./neovim + ./alacritty.nix ./development.nix + ./helix.nix ./kitty.nix ./media.nix ./shell.nix diff --git a/home/base/desktop/helix/default.nix b/home/base/desktop/helix.nix similarity index 53% rename from home/base/desktop/helix/default.nix rename to home/base/desktop/helix.nix index fd2fdd52..0d22c84b 100644 --- a/home/base/desktop/helix/default.nix +++ b/home/base/desktop/helix.nix @@ -1,7 +1,8 @@ -{ pkgs, lib, ... }: +{ pkgs, catppuccin-helix, ... }: { - xdg.configFile."helix/themes/catppuccin_mocha.toml".source = ./theme_catppuccin_mocha.toml; + # https://github.com/catppuccin/helix + xdg.configFile."helix/themes".source = "${catppuccin-helix}/themes/default"; programs.helix = { enable = true; @@ -10,7 +11,15 @@ theme = "catppuccin_mocha"; editor = { line-number = "relative"; + cursorline = true; + color-modes = true; lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + indent-guides.render = true; }; keys.normal = { space.space = "file_picker"; diff --git a/home/base/desktop/helix/theme_catppuccin_mocha.toml b/home/base/desktop/helix/theme_catppuccin_mocha.toml deleted file mode 100644 index 0728c088..00000000 --- a/home/base/desktop/helix/theme_catppuccin_mocha.toml +++ /dev/null @@ -1,149 +0,0 @@ -# https://github.com/catppuccin/helix/blob/main/themes/default/catppuccin_mocha.toml - -# Syntax highlighting -# ------------------- -"type" = "yellow" - -"constructor" = "sapphire" - -"constant" = "peach" -"constant.builtin" = "peach" -"constant.character" = "teal" -"constant.character.escape" = "pink" - -"string" = "green" -"string.regexp" = "peach" -"string.special" = "blue" - -"comment" = { fg = "overlay1", modifiers = ["italic"] } - -"variable" = "text" -"variable.parameter" = { fg = "maroon", modifiers = ["italic"] } -"variable.builtin" = "red" -"variable.other.member" = "teal" - -"label" = "sapphire" # used for lifetimes - -"punctuation" = "overlay2" -"punctuation.special" = "sky" - -"keyword" = "mauve" -"keyword.control.conditional" = { fg = "mauve", modifiers = ["italic"] } - -"operator" = "sky" - -"function" = "blue" -"function.macro" = "mauve" - -"tag" = "mauve" -"attribute" = "blue" - -"namespace" = { fg = "blue", modifiers = ["italic"] } - -"special" = "blue" # fuzzy highlight - -"markup.heading.marker" = { fg = "peach", modifiers = ["bold"] } -"markup.heading.1" = "lavender" -"markup.heading.2" = "mauve" -"markup.heading.3" = "green" -"markup.heading.4" = "yellow" -"markup.heading.5" = "pink" -"markup.heading.6" = "teal" -"markup.list" = "mauve" -"markup.bold" = { modifiers = ["bold"] } -"markup.italic" = { modifiers = ["italic"] } -"markup.link.url" = { fg = "rosewater", modifiers = ["italic", "underlined"] } -"markup.link.text" = "blue" -"markup.raw" = "flamingo" - -"diff.plus" = "green" -"diff.minus" = "red" -"diff.delta" = "blue" - -# User Interface -# -------------- -"ui.background" = { fg = "text", bg = "base" } - -"ui.linenr" = { fg = "surface1" } -"ui.linenr.selected" = { fg = "lavender" } - -"ui.statusline" = { fg = "subtext1", bg = "mantle" } -"ui.statusline.inactive" = { fg = "surface2", bg = "mantle" } -"ui.statusline.normal" = { fg = "base", bg = "lavender", modifiers = ["bold"] } -"ui.statusline.insert" = { fg = "base", bg = "green", modifiers = ["bold"] } -"ui.statusline.select" = { fg = "base", bg = "flamingo", modifiers = ["bold"] } - -"ui.popup" = { fg = "text", bg = "surface0" } -"ui.window" = { fg = "crust" } -"ui.help" = { fg = "overlay2", bg = "surface0" } - -"ui.bufferline" = { fg = "subtext0", bg = "mantle" } -"ui.bufferline.active" = { fg = "mauve", bg = "base", underline = { color = "mauve", style = "line" } } -"ui.bufferline.background" = { bg = "crust" } - -"ui.text" = "text" -"ui.text.focus" = { fg = "text", bg = "surface0", modifiers = ["bold"] } -"ui.text.inactive" = { fg = "overlay1" } - -"ui.virtual" = "overlay0" -"ui.virtual.ruler" = { bg = "surface0" } -"ui.virtual.indent-guide" = "surface0" -"ui.virtual.inlay-hint" = { fg = "surface1", bg = "mantle" } - -"ui.selection" = { bg = "surface1" } - -"ui.cursor" = { fg = "base", bg = "secondary_cursor" } -"ui.cursor.primary" = { fg = "base", bg = "rosewater" } -"ui.cursor.match" = { fg = "peach", modifiers = ["bold"] } - -"ui.cursorline.primary" = { bg = "cursorline" } - -"ui.highlight" = { bg = "surface1", modifiers = ["bold"] } - -"ui.menu" = { fg = "overlay2", bg = "surface0" } -"ui.menu.selected" = { fg = "text", bg = "surface1", modifiers = ["bold"] } - -"diagnostic.error" = { underline = { color = "red", style = "curl" } } -"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } } -"diagnostic.info" = { underline = { color = "sky", style = "curl" } } -"diagnostic.hint" = { underline = { color = "teal", style = "curl" } } - -error = "red" -warning = "yellow" -info = "sky" -hint = "teal" - -[palette] -# catppuccin palette colors -rosewater = "#f5e0dc" -flamingo = "#f2cdcd" -pink = "#f5c2e7" -mauve = "#cba6f7" -red = "#f38ba8" -maroon = "#eba0ac" -peach = "#fab387" -yellow = "#f9e2af" -green = "#a6e3a1" -teal = "#94e2d5" -sky = "#89dceb" -sapphire = "#74c7ec" -blue = "#89b4fa" -lavender = "#b4befe" - -text = "#cdd6f4" -subtext1 = "#bac2de" -subtext0 = "#a6adc8" -overlay2 = "#9399b2" -overlay1 = "#7f849c" -overlay0 = "#6c7086" -surface2 = "#585b70" -surface1 = "#45475a" -surface0 = "#313244" - -base = "#1e1e2e" -mantle = "#181825" -crust = "#11111b" - -# derived colors by blending existing palette colors -cursorline = "#2a2b3c" -secondary_cursor = "#b5a6a8" diff --git a/home/base/desktop/kitty.nix b/home/base/desktop/kitty.nix index 07a23966..82d483f3 100644 --- a/home/base/desktop/kitty.nix +++ b/home/base/desktop/kitty.nix @@ -27,7 +27,7 @@ { programs.kitty = { enable = true; - theme = "Catppuccin-Mocha"; + theme = "Catppuccin-Mocha"; # kitty has catppuccin theme built-in font = { name = "JetBrainsMono Nerd Font"; # use different font size on macOS diff --git a/home/base/server/bat/default.nix b/home/base/server/bat.nix similarity index 72% rename from home/base/server/bat/default.nix rename to home/base/server/bat.nix index 3e4e4a5c..880ec9d8 100644 --- a/home/base/server/bat/default.nix +++ b/home/base/server/bat.nix @@ -1,4 +1,4 @@ -{...}: { +{ catppuccin-bat, ...}: { # a cat(1) clone with syntax highlighting and Git integration. programs.bat = { enable = true; @@ -8,7 +8,7 @@ }; themes = { # https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme - Catppuccin-mocha = builtins.readFile ./Catppuccin-mocha.tmTheme; + Catppuccin-mocha = builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme"; }; }; } diff --git a/home/base/server/bat/Catppuccin-mocha.tmTheme b/home/base/server/bat/Catppuccin-mocha.tmTheme deleted file mode 100644 index 3b9b72c7..00000000 --- a/home/base/server/bat/Catppuccin-mocha.tmTheme +++ /dev/null @@ -1,959 +0,0 @@ - - - - - name - Catppuccin - settings - - - settings - - foreground - #cdd6f4 - background - #1e1e2e - caret - #bac2de - invisibles - #a6adc8 - gutterForeground - #9399b2 - gutterForegroundHighlight - #a6e3a1 - lineHighlight - #585b70 - selection - #6c7086 - selectionBorder - #1e1e2e - activeGuide - #fab387 - findHighlightForeground - #181825 - findHighlight - #f9e2af - bracketsForeground - #9399b2 - bracketContentsForeground - #9399b2 - - - - name - Comment - scope - comment - settings - - foreground - #6c7086 - fontStyle - italic - - - - name - String - scope - string - settings - - foreground - #a6e3a1 - fontStyle - - - - - name - String regex - scope - string.regexp - settings - - foreground - #fab387 - fontStyle - - - - - name - Number - scope - constant.numeric - settings - - foreground - #fab387 - fontStyle - - - - - name - Boolean - scope - constant.language.boolean - settings - - foreground - #fab387 - fontStyle - bold italic - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #b4befe - fontStyle - italic - - - - name - Built-in function - scope - support.function.builtin - settings - - foreground - #fab387 - fontStyle - italic - - - - name - User-defined constant - scope - variable.other.constant - settings - - foreground - #fab387 - fontStyle - - - - - name - Variable - scope - variable - settings - - - - name - Keyword - scope - keyword - settings - - foreground - #f38ba8 - fontStyle - italic - - - - name - Conditional/loop - scope - keyword.control.loop, keyword.control.conditional, keyword.control.c++ - settings - - foreground - #cba6f7 - fontStyle - bold - - - - name - Return - scope - keyword.control.return, keyword.control.flow.return - settings - - foreground - #f5c2e7 - fontStyle - bold - - - - name - Exception - scope - support.type.exception - settings - - foreground - #fab387 - fontStyle - italic - - - - name - Operator - scope - keyword.operator, punctuation.accessor - settings - - foreground - #89dceb - fontStyle - bold - - - - name - Punctuation separator - scope - punctuation.separator - settings - - foreground - #94e2d5 - fontStyle - - - - - name - Punctuation terminator - scope - punctuation.terminator - settings - - foreground - #94e2d5 - fontStyle - - - - - name - Punctuation bracket - scope - punctuation.section - settings - - foreground - #9399b2 - fontStyle - - - - - name - Include - scope - keyword.control.import.include - settings - - foreground - #94e2d5 - fontStyle - italic - - - - name - Storage - scope - storage - settings - - foreground - #f38ba8 - fontStyle - - - - - name - Storage type - scope - storage.type - settings - - foreground - #f9e2af - fontStyle - italic - - - - name - Storage modifier - scope - storage.modifier - settings - - foreground - #f38ba8 - fontStyle - - - - - name - Storage type namespace - scope - entity.name.namespace, meta.path - settings - - foreground - #f5e0dc - fontStyle - italic - - - - name - Storage type class - scope - storage.type.class - settings - - foreground - #f5e0dc - fontStyle - italic - - - - name - Label - scope - entity.name.label - settings - - foreground - #89b4fa - fontStyle - - - - - name - Keyword class - scope - keyword.declaration.class - settings - - foreground - #f38ba8 - fontStyle - italic - - - - name - Class name - scope - entity.name.class, meta.toc-list.full-identifier - settings - - foreground - #89dceb - fontStyle - - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - foreground - #89dceb - fontStyle - italic - - - - name - Function name - scope - entity.name.function, variable.function - settings - - foreground - #89b4fa - fontStyle - italic - - - - name - Function macro - scope - entity.name.function.preprocessor - settings - - foreground - #f38ba8 - fontStyle - - - - - name - Macro directive - ifdef - scope - keyword.control.import - settings - - foreground - #f38ba8 - fontStyle - - - - - name - Constructor - scope - entity.name.function.constructor, entity.name.function.destructor - settings - - foreground - #b4befe - fontStyle - - - - - name - Function argument - scope - variable.parameter.function - settings - - foreground - #f5e0dc - fontStyle - italic - - - - name - Function declaration - scope - keyword.declaration.function - settings - - foreground - #eba0ac - fontStyle - italic - - - - name - Library function - scope - support.function - settings - - foreground - #89dceb - fontStyle - - - - - name - Library constant - scope - support.constant - settings - - foreground - #89b4fa - fontStyle - - - - - name - Library class/type - scope - support.type, support.class - settings - - foreground - #89b4fa - fontStyle - italic - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Variable function - scope - variable.function - settings - - foreground - #89b4fa - fontStyle - italic - - - - name - Variable parameter - scope - variable.parameter - settings - - foreground - #f5e0dc - fontStyle - italic - - - - name - Variable other - scope - variable.other - settings - - foreground - #cdd6f4 - fontStyle - italic - - - - name - Variable field - scope - variable.other.member - settings - - foreground - #f5e0dc - fontStyle - - - - - name - Variable language - scope - variable.language - settings - - foreground - #94e2d5 - fontStyle - - - - - name - Tag name - scope - entity.name.tag - settings - - foreground - #fab387 - fontStyle - - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - foreground - #cba6f7 - fontStyle - italic - - - - name - Tag delimiter - scope - punctuation.definition.tag - settings - - foreground - #eba0ac - fontStyle - - - - - name - Markdown URL - scope - markup.underline.link.markdown - settings - - foreground - #f5e0dc - fontStyle - italic underline - - - - name - Markdown reference - scope - meta.link.inline.description - settings - - foreground - #b4befe - fontStyle - bold - - - - name - Markdown literal - scope - comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline - settings - - foreground - #94e2d5 - fontStyle - italic - - - - name - Markdown title - scope - punctuation.definition.heading, entity.name.section - settings - - foreground - #89b4fa - fontStyle - bold - - - - name - Markdown emphasis - scope - markup.italic - settings - - foreground - #eba0ac - fontStyle - italic - - - - name - Markdown strong - scope - markup.bold - settings - - foreground - #eba0ac - fontStyle - bold - - - - name - Escape - scope - constant.character.escape - settings - - foreground - #f5c2e7 - fontStyle - - - - - name - Bash built-in function - scope - source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell - settings - - foreground - #f5c2e7 - fontStyle - - - - - name - Bash parameter - scope - variable.language.shell - settings - - foreground - #f38ba8 - fontStyle - italic - - - - name - Lua field - scope - source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua - settings - - foreground - #b4befe - fontStyle - italic - - - - name - Lua constructor - scope - source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua - settings - - foreground - #f2cdcd - fontStyle - - - - - name - Java constant - scope - entity.name.constant.java - settings - - foreground - #94e2d5 - fontStyle - - - - - name - CSS property - scope - support.type.property-name.css - settings - - foreground - #f2cdcd - fontStyle - italic - - - - name - CSS constant - scope - support.constant.property-value.css - settings - - foreground - #cdd6f4 - fontStyle - - - - - name - CSS suffix - scope - constant.numeric.suffix.css, keyword.other.unit.css - settings - - foreground - #94e2d5 - fontStyle - italic - - - - name - CSS variable property - scope - variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css - settings - - foreground - #94e2d5 - fontStyle - - - - - name - SCSS tag - scope - entity.name.tag.css - settings - - foreground - #b4befe - fontStyle - - - - - name - SASS variable - scope - variable.other.sass - settings - - foreground - #94e2d5 - fontStyle - - - - - name - Invalid - scope - invalid - settings - - foreground - #cdd6f4 - background - #f38ba8 - fontStyle - - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - foreground - #cdd6f4 - background - #cba6f7 - fontStyle - - - - - name - Diff header - scope - meta.diff, meta.diff.header - settings - - foreground - #6c7086 - fontStyle - - - - - name - Diff deleted - scope - markup.deleted - settings - - foreground - #f38ba8 - fontStyle - - - - - name - Diff inserted - scope - markup.inserted - settings - - foreground - #a6e3a1 - fontStyle - - - - - name - Diff changed - scope - markup.changed - settings - - foreground - #f9e2af - fontStyle - - - - - name - Message error - scope - message.error - settings - - foreground - #f38ba8 - fontStyle - - - - - uuid - 4d0379b5-ef82-467b-b8b8-365889420646 - colorSpaceName - sRGB - semanticClass - theme.dark.Catppuccin - author - BrunDerSchwarzmagier - - diff --git a/home/base/server/core.nix b/home/base/server/core.nix index abdfb09d..55ac2d1c 100644 --- a/home/base/server/core.nix +++ b/home/base/server/core.nix @@ -13,7 +13,6 @@ ripgrep # recursively searches directories for a regex pattern jq # A lightweight and flexible command-line JSON processor yq-go # yaml processer https://github.com/mikefarah/yq - fzf # A command-line fuzzy finder # networking tools mtr # A network diagnostic tool @@ -66,6 +65,27 @@ icons = true; }; + # A command-line fuzzy finder + fzf = { + enable = true; + # https://github.com/catppuccin/fzf + # catppuccin-mocha + colors = { + "bg+" = "#313244"; + "bg" = "#1e1e2e"; + "spinner" = "#f5e0dc"; + "hl" = "#f38ba8"; + "fg" = "#cdd6f4"; + "header" = "#f38ba8"; + "info" = "#cba6f7"; + "pointer" = "#f5e0dc"; + "marker" = "#f5e0dc"; + "fg+" = "#cdd6f4"; + "prompt" = "#cba6f7"; + "hl+" = "#f38ba8"; + }; + }; + # skim provides a single executable: sk. # Basically anywhere you would want to use grep, try sk instead. skim = { diff --git a/home/base/server/default.nix b/home/base/server/default.nix index 383728cb..308e5962 100644 --- a/home/base/server/default.nix +++ b/home/base/server/default.nix @@ -1,11 +1,11 @@ {...}: { imports = [ - ./bat ./nushell ./tmux ./zellij ./bash.nix + ./bat.nix ./core.nix ./git.nix ./starship.nix diff --git a/home/base/server/nushell/config.nu b/home/base/server/nushell/config.nu index 4f4a50ad..9cbf2729 100644 --- a/home/base/server/nushell/config.nu +++ b/home/base/server/nushell/config.nu @@ -2,8 +2,79 @@ # # version = 0.81.1 +# let's define some colors + +# https://github.com/catppuccin/i3/blob/main/themes/catppuccin-mocha +let rosewater = "#f5e0dc" +let flamingo = "#f2cdcd" +let pink = "#f5c2e7" +let mauve = "#cba6f7" +let red = "#f38ba8" +let maroon = "#eba0ac" +let peach = "#fab387" +let green = "#a6e3a1" +let teal = "#94e2d5" +let sky = "#89dceb" +let sapphire = "#74c7ec" +let blue = "#89b4fa" +let lavender = "#b4befe" +let text = "#cdd6f4" +let subtext1 = "#bac2de" +let subtext0 = "#a6adc8" +let overlay2 = "#9399b2" +let overlay1 = "#7f849c" +let overlay0 = "#6c7086" +let surface2 = "#585b70" +let surface1 = "#45475a" +let surface0 = "#313244" +let base = "#1e1e2e" +let mantle = "#181825" +let crust = "#11111b" + +# we're creating a theme here that uses the colors we defined above. + +let catppuccin_theme = { + separator: $overlay2 + leading_trailing_space_bg: $surface2 + header: $red + date: $pink + filesize: $green + row_index: $text + bool: $peach + int: $red + duration: $sky + range: $sapphire + float: $lavender + string: $text + nothing: $overlay1 + binary: $subtext1 + cellpath: $subtext0 + hints: dark_gray + + shape_garbage: { fg: $overlay2 bg: $red attr: b} + shape_bool: $maroon + shape_int: { fg: $pink attr: b} + shape_float: { fg: $pink attr: b} + shape_range: { fg: $overlay0 attr: b} + shape_internalcall: { fg: $maroon attr: b} + shape_external: $mauve + shape_externalarg: { fg: $red attr: b} + shape_literal: $flamingo + shape_operator: $rosewater + shape_signature: { fg: $red attr: b} + shape_string: $red + shape_filepath: $peach + shape_globpattern: { fg: $teal attr: b} + shape_variable: $pink + shape_flag: { fg: $mauve attr: b} + shape_custom: {attr: b} +} + # The default config record. This is where much of your global configuration is setup. let-env config = { + color_config: $catppuccin_theme # <-- this is the theme + use_ansi_coloring: true + # true or false to enable or disable the welcome banner at startup show_banner: false @@ -42,9 +113,8 @@ let-env config = { footer_mode: "25" # always, never, number_of_rows, auto float_precision: 2 # the precision for displaying floats in tables # buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL - use_ansi_coloring: true bracketed_paste: true # enable bracketed paste, currently useless on windows edit_mode: emacs # emacs, vi shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. -} \ No newline at end of file +} diff --git a/home/base/server/starship.nix b/home/base/server/starship.nix index 4dd3e4c8..dc5571bd 100644 --- a/home/base/server/starship.nix +++ b/home/base/server/starship.nix @@ -1,4 +1,4 @@ -{...}: { +{ catppuccin-starship, ...}: { programs.starship = { enable = true; @@ -20,6 +20,8 @@ format = "on [$symbol$active(\($region\))]($style) "; symbol = "🅶 ️"; }; - }; + + palette = "catppuccin_mocha"; + } // builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml"); }; } diff --git a/home/linux/base/btop.nix b/home/linux/base/btop.nix new file mode 100644 index 00000000..4049a573 --- /dev/null +++ b/home/linux/base/btop.nix @@ -0,0 +1,15 @@ +{ catppuccin-btop, ... }: + +{ + # https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme + home.file.".config/btop/themes".source = "${catppuccin-btop}/themes"; + + # replacement of htop/nmon + programs.btop = { + enable = true; + settings = { + color_theme = "catppuccin_mocha"; + theme_background = false; # make btop transparent + }; + }; +} diff --git a/home/linux/base/default.nix b/home/linux/base/default.nix index 60e82c2e..78057c5f 100644 --- a/home/linux/base/default.nix +++ b/home/linux/base/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./btop.nix ./shell.nix ./system-tools.nix ]; diff --git a/home/linux/base/system-tools.nix b/home/linux/base/system-tools.nix index d9847abb..59435dd7 100644 --- a/home/linux/base/system-tools.nix +++ b/home/linux/base/system-tools.nix @@ -1,8 +1,6 @@ {pkgs, ...}: { # Linux Only Packages, not available on Darwin home.packages = with pkgs; [ - btop # replacement of htop/nmon - htop nmon iotop iftop diff --git a/home/linux/fcitx5/classicui.conf b/home/linux/fcitx5/classicui.conf new file mode 100644 index 00000000..7c217f56 --- /dev/null +++ b/home/linux/fcitx5/classicui.conf @@ -0,0 +1 @@ +Theme=catppuccin-mocha # or macchiato, frappe, latte diff --git a/home/linux/fcitx5/default.nix b/home/linux/fcitx5/default.nix index 227eb014..957d9925 100644 --- a/home/linux/fcitx5/default.nix +++ b/home/linux/fcitx5/default.nix @@ -2,10 +2,14 @@ pkgs, config, lib, + catppuccin-fcitx5, ... }: { home.file.".config/fcitx5/profile".source = ./profile; - home.file.".config/fcitx5/profile-bak".source = ./profile; # used for backup + + # color schema + home.file.".local/share/fcitx5/themes".source = "${catppuccin-fcitx5}/src"; + # home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf; # every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile file, # which will override my config managed by home-manager diff --git a/home/linux/hyprland/default.nix b/home/linux/hyprland/default.nix index ce5c0f7b..5cb2b0e4 100644 --- a/home/linux/hyprland/default.nix +++ b/home/linux/hyprland/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, catppuccin-hyprland, ...}: { imports = [ ./wayland-apps.nix ]; @@ -14,13 +14,28 @@ # copy the scripts directory recursively recursive = true; }; - home.file.".config/gtk-3.0" = { - source = ./gtk-3.0; - recursive = true; - }; - home.file.".gtkrc-2.0".source = ./gtkrc-2.0; + home.file.".config/hypr-themes".source = "${catppuccin-hyprland}/themes"; + home.file.".config/hypr/wallpapers/wallpaper.png".source = ../wallpapers/wallpaper.png; + # gtk's theme settings, generate files: + # 1. ~/.gtkrc-2.0 + # 2. ~/.config/gtk-3.0/settings.ini + # 3. ~/.config/gtk-4.0/settings.ini + gtk = { + enable = true; + theme = { + # https://github.com/catppuccin/gtk + name = "Catppuccin-Macchiato-Compact-Pink-dark"; + package = pkgs.catppuccin-gtk.override { + accents = [ "pink" ]; + size = "compact"; + tweaks = [ "rimless" "black" ]; + variant = "macchiato"; + }; + }; + }; + # music player - mpd home.file.".config/mpd" = { source = ./mpd; diff --git a/home/linux/hyprland/gtk-3.0/settings.ini b/home/linux/hyprland/gtk-3.0/settings.ini deleted file mode 100644 index d82c27fe..00000000 --- a/home/linux/hyprland/gtk-3.0/settings.ini +++ /dev/null @@ -1,16 +0,0 @@ -[Settings] -gtk-theme-name=Arc-Dark -gtk-icon-theme-name=Qogir-dark -gtk-font-name=Noto Sans 10 -gtk-cursor-theme-name=Qogir-dark -gtk-cursor-theme-size=64 -gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=0 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle=hintmedium -gtk-xft-rgba=rgb \ No newline at end of file diff --git a/home/linux/hyprland/gtkrc-2.0 b/home/linux/hyprland/gtkrc-2.0 deleted file mode 100644 index 6275c047..00000000 --- a/home/linux/hyprland/gtkrc-2.0 +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT! This file will be overwritten by LXAppearance. -# Any customization should be done in ~/.gtkrc-2.0.mine instead. - -include "~/.gtkrc-2.0.mine" -gtk-theme-name="Arc-Dark" -gtk-icon-theme-name="Qogir-dark" -gtk-font-name="Noto Sans 10" -gtk-cursor-theme-name="Qogir-dark" -gtk-cursor-theme-size=64 -gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=0 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle="hintmedium" -gtk-xft-rgba="rgb" \ No newline at end of file diff --git a/home/linux/hyprland/hypr-conf/hyprland.conf b/home/linux/hyprland/hypr-conf/hyprland.conf index 0243e105..c425925a 100644 --- a/home/linux/hyprland/hypr-conf/hyprland.conf +++ b/home/linux/hyprland/hypr-conf/hyprland.conf @@ -1,5 +1,8 @@ ## Hyprland configuration file +# color-scheme: cappuccin-mocha +source=~/.config/hypr-themes/mocha.conf + #-- Output ---------------------------------------------------- # Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info. diff --git a/home/linux/i3/config b/home/linux/i3/config index 2eacf0ce..0b43f6cf 100644 --- a/home/linux/i3/config +++ b/home/linux/i3/config @@ -312,25 +312,42 @@ for_window [class="urxvt"] border pixel 1 # color settings for bar and windows # ###################################### -# Define colors variables: -set $darkbluetrans #08052be6 -set $darkblue #08052b -set $lightblue #5294e2 -set $urgentred #e53935 -set $white #ffffff -set $black #000000 -set $purple #e345ff -set $darkgrey #383c4a -set $grey #b0b5bd -set $mediumgrey #8b8b8b -set $yellowbrown #e1b700 +# https://github.com/catppuccin/i3/blob/main/themes/catppuccin-mocha +set $rosewater #f5e0dc +set $flamingo #f2cdcd +set $pink #f5c2e7 +set $mauve #cba6f7 +set $red #f38ba8 +set $maroon #eba0ac +set $peach #fab387 +set $green #a6e3a1 +set $teal #94e2d5 +set $sky #89dceb +set $sapphire #74c7ec +set $blue #89b4fa +set $lavender #b4befe +set $text #cdd6f4 +set $subtext1 #bac2de +set $subtext0 #a6adc8 +set $overlay2 #9399b2 +set $overlay1 #7f849c +set $overlay0 #6c7086 +set $surface2 #585b70 +set $surface1 #45475a +set $surface0 #313244 +set $base #1e1e2e +# use colors in the RGBA format, the last two digits are transparency +set $base_i3bar #1e1e2ee6 +set $mantle #181825 +set $crust #11111b -# define colors for windows: -#class border bground text indicator child_border -client.focused $lightblue $darkblue $white $mediumgrey $mediumgrey -client.unfocused $darkblue $darkblue $grey $darkgrey $darkgrey -client.focused_inactive $darkblue $darkblue $grey $black $black -client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown +# target title bg text indicator border +client.focused $red $base $text $rosewater $red +client.focused_inactive $mauve $base $text $rosewater $mauve +client.unfocused $lavender $base $text $rosewater $lavender +client.urgent $pink $base $lavender $overlay0 $pink +client.placeholder $overlay0 $base $text $overlay0 $overlay0 +client.background $base ############################################ @@ -361,14 +378,14 @@ bar { ##strip_workspace_name no colors { - separator $purple - background $darkgrey - statusline $white - # border bg txt indicator - focused_workspace $mediumgrey $grey $darkgrey $purple - active_workspace $lightblue $mediumgrey $darkgrey $purple - inactive_workspace $darkgrey $darkgrey $grey $purple - urgent_workspace $urgentred $urgentred $white $purple + separator $pink + background $base_transparent + statusline $lavender + # border bg txt indicator + focused_workspace $surface2 $overlay1 $surface1 $pink + active_workspace $peach $surface2 $surface1 $pink + inactive_workspace $surface1 $surface2 $overlay1 $pink + urgent_workspace $red $red $lavender $pink } }