From 2092b9cfde25465db06c68acf543c24319aa12f8 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 5 Mar 2023 00:25:40 +0700 Subject: [PATCH] chore: add vivid, add check exist bin zsh --- data/data.toml | 8 ++ data/vivid/catppuccin-mocha.yml | 136 ++++++++++++++++++++++++++++++++ data/wezterm/wezterm.lua | 2 +- data/zsh/extra-zshrc | 25 ++++-- 4 files changed, 163 insertions(+), 8 deletions(-) create mode 100644 data/vivid/catppuccin-mocha.yml diff --git a/data/data.toml b/data/data.toml index 8457ec8..31f7c06 100644 --- a/data/data.toml +++ b/data/data.toml @@ -54,6 +54,14 @@ url = "https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tm internal = "data/fd/.ignore" external = "~/.ignore" +[[apps.vivid.paths]] +internal = "data/vivid/catppuccin-mocha.yml" +external = "~/.config/vivid/catppuccin-mocha.yml" + +[[apps.vivid.paths]] +internal = "data/vivid/catppuccin-mocha.yml" +url = "https://raw.githubusercontent.com/sharkdp/vivid/master/themes/catppuccin-mocha.yml" + [[apps.zsh.paths]] internal = "data/zsh/extra-zshrc" external = "~/.config/zsh/extra-zshrc" diff --git a/data/vivid/catppuccin-mocha.yml b/data/vivid/catppuccin-mocha.yml new file mode 100644 index 0000000..3e3fa35 --- /dev/null +++ b/data/vivid/catppuccin-mocha.yml @@ -0,0 +1,136 @@ +colors: + # Original "catppuccin" theme + # https://github.com/catppuccin/catppuccin + + 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' + +core: + normal_text: {} + regular_file: {} + reset_to_normal: {} + + directory: + foreground: blue + + symlink: + foreground: pink + + multi_hard_link: {} + + fifo: + foreground: crust + background: blue + + socket: + foreground: crust + background: pink + + door: + foreground: crust + background: pink + + block_device: + foreground: sapphire + background: surface0 + + character_device: + foreground: pink + background: surface0 + + broken_symlink: + foreground: crust + background: red + + missing_symlink_target: + foreground: crust + background: red + + setuid: {} + + setgid: {} + + file_with_capability: {} + + sticky_other_writable: {} + + other_writable: {} + + sticky: {} + + executable_file: + foreground: red + font-style: bold + +text: + special: + foreground: base + background: yellow + + todo: + font-style: bold + + licenses: + foreground: overlay2 + + configuration: + foreground: yellow + + other: + foreground: yellow + +markup: + foreground: yellow + +programming: + source: + foreground: green + + tooling: + foreground: teal + + continuous-integration: + foreground: green + +media: + foreground: flamingo + +office: + foreground: red + +archives: + foreground: sapphire + font-style: underline + +executable: + foreground: red + font-style: bold + +unimportant: + foreground: surface2 diff --git a/data/wezterm/wezterm.lua b/data/wezterm/wezterm.lua index 123a260..a0d4cda 100644 --- a/data/wezterm/wezterm.lua +++ b/data/wezterm/wezterm.lua @@ -25,6 +25,6 @@ return { hide_tab_bar_if_only_one_tab = true, tab_bar_at_bottom = true, window_background_opacity = 0.9, - text_background_opacity = 0.5, + text_background_opacity = 0.8, audible_bell = "Disabled", } diff --git a/data/zsh/extra-zshrc b/data/zsh/extra-zshrc index ee7ff17..627fd29 100644 --- a/data/zsh/extra-zshrc +++ b/data/zsh/extra-zshrc @@ -30,9 +30,11 @@ DISABLE_UNTRACKED_FILES_DIRTY="true" DISABLE_MAGIC_FUNCTIONS="true" # nvim -export EDITOR=nvim -export VISUAL=nvim -export GIT_EDITOR=nvim +if command -v nvim &> /dev/null; then + export EDITOR=nvim + export VISUAL=nvim + export GIT_EDITOR=nvim +fi # go export GOPATH=$HOME/go @@ -43,9 +45,11 @@ export GOPRIVATE=github.com/make-go-great,github.com/haunt98 # fzf # https://github.com/junegunn/fzf#environment-variables -export FZF_DEFAULT_COMMAND="fd --type file" -export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export FZF_ALT_C_COMMAND="fd --type directory" +if command -v fd &> /dev/null; then + export FZF_DEFAULT_COMMAND="fd --type file" + export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + export FZF_ALT_C_COMMAND="fd --type directory" +fi # https://github.com/catppuccin/fzf export FZF_DEFAULT_OPTS=" \ @@ -64,4 +68,11 @@ alias kssh="kitty +kitten ssh" export RESTIC_PASSWORD_FILE=$HOME/.restic_password_file # https://difftastic.wilfred.me.uk/git.html -export GIT_EXTERNAL_DIFF=difft +if command -v difft &> /dev/null; then + export GIT_EXTERNAL_DIFF=difft +fi + +# https://github.com/sharkdp/vivid +if command -v vivid &> /dev/null; then + export LS_COLORS="$(vivid generate ~/.config/vivid/catppuccin-mocha.yml)" +fi