From f7e1cb03e77b6f920fef493e2c2135c9ca84ce94 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 9 May 2024 02:26:45 +0100 Subject: [PATCH] feat(tools/tldr): customize styling of Rust-based tlrc tldr client --- config/tlrc/config.toml | 76 +++++++++++++++++++++++++++++++++++++++++ install.sh | 1 + zsh/tldr.zsh | 7 ++++ zshrc | 1 + 4 files changed, 85 insertions(+) create mode 100644 config/tlrc/config.toml create mode 100644 zsh/tldr.zsh diff --git a/config/tlrc/config.toml b/config/tlrc/config.toml new file mode 100644 index 0000000..8b3e16a --- /dev/null +++ b/config/tlrc/config.toml @@ -0,0 +1,76 @@ +[output] +show_title = true +platform_title = false +show_hyphens = true +example_prefix = "- " +compact = false +raw_markdown = false + +[indent] +title = 2 +description = 2 +bullet = 2 +example = 4 + +[style.title] +color = "magenta" +background = "default" +bold = true +underline = false +italic = false +dim = false +strikethrough = false + +[style.description] +color = "default" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.bullet] +color = "default" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.example] +color = "green" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.url] +color = "cyan" +background = "default" +bold = false +underline = true +italic = false +dim = false +strikethrough = false + +[style.inline_code] +color = "yellow" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.placeholder] +color = "red" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false diff --git a/install.sh b/install.sh index 39659ac..c1c0080 100755 --- a/install.sh +++ b/install.sh @@ -19,6 +19,7 @@ SYMLINKS=( config/mise/settings.toml config/solargraph/config.yml config/starship.toml + config/tlrc/config.toml config/xkeysnail/config.py default-gems default-go-packages diff --git a/zsh/tldr.zsh b/zsh/tldr.zsh new file mode 100644 index 0000000..eeeeeba --- /dev/null +++ b/zsh/tldr.zsh @@ -0,0 +1,7 @@ +# +# tldr Setup +# + +if command-exists tldr && [ -f "$HOME/.config/tlrc/config.toml" ]; then + alias tldr='tldr --config $HOME/.config/tlrc/config.toml' +fi diff --git a/zshrc b/zshrc index 72804b7..dfb239b 100644 --- a/zshrc +++ b/zshrc @@ -195,6 +195,7 @@ source "$DOTZSH/fzf.zsh" source "$DOTZSH/less.zsh" source "$DOTZSH/neovim.zsh" source "$DOTZSH/nix.zsh" +source "$DOTZSH/tldr.zsh" source "$DOTZSH/tmux.zsh" source "$DOTZSH/zoxide.zsh"