From 0b7c9829277caa66e1c3d6df48a1afb2d241ab55 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:55:04 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Install=20cheat;=20uninstall=20tldr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cheat/conf.yml | 82 ++++++++++++++++++++++++++++++++++++++ cheat/install.fish | 10 +++++ cheat/settings.config.fish | 3 ++ fish/install.fish | 1 - 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 cheat/conf.yml create mode 100755 cheat/install.fish create mode 100644 cheat/settings.config.fish diff --git a/cheat/conf.yml b/cheat/conf.yml new file mode 100644 index 0000000..4e1f157 --- /dev/null +++ b/cheat/conf.yml @@ -0,0 +1,82 @@ +--- +# The editor to use with 'cheat -e '. Defaults to $EDITOR or $VISUAL. +editor: nvim + +# Should 'cheat' always colorize output? +colorize: true + +# Which 'chroma' colorscheme should be applied to the output? +# Options are available here: +# https://github.com/alecthomas/chroma/tree/master/styles +style: catppuccin-mocha + +# Which 'chroma' "formatter" should be applied? +# One of: "terminal", "terminal256", "terminal16m" +formatter: terminal256 + +# Through which pager should output be piped? +# 'less -FRX' is recommended on Unix systems +# 'more' is recommended on Windows +pager: less -FRX + +# Cheatpaths are paths at which cheatsheets are available on your local +# filesystem. +# +# It is useful to sort cheatsheets into different cheatpaths for organizational +# purposes. For example, you might want one cheatpath for community +# cheatsheets, one for personal cheatsheets, one for cheatsheets pertaining to +# your day job, one for code snippets, etc. +# +# Cheatpaths are scoped, such that more "local" cheatpaths take priority over +# more "global" cheatpaths. (The most global cheatpath is listed first in this +# file; the most local is listed last.) For example, if there is a 'tar' +# cheatsheet on both global and local paths, you'll be presented with the local +# one by default. ('cheat -p' can be used to view cheatsheets from alternative +# cheatpaths.) +# +# Cheatpaths can also be tagged as "read only". This instructs cheat not to +# automatically create cheatsheets on a read-only cheatpath. Instead, when you +# would like to edit a read-only cheatsheet using 'cheat -e', cheat will +# perform a copy-on-write of that cheatsheet from a read-only cheatpath to a +# writeable cheatpath. +# +# This is very useful when you would like to maintain, for example, a +# "pristine" repository of community cheatsheets on one cheatpath, and an +# editable personal reponsity of cheatsheets on another cheatpath. +# +# Cheatpaths can be also configured to automatically apply tags to cheatsheets +# on certain paths, which can be useful for querying purposes. +# Example: 'cheat -t work jenkins'. +# +# Community cheatsheets must be installed separately, though you may have +# downloaded them automatically when installing 'cheat'. If not, you may +# download them here: +# +# https://github.com/cheat/cheatsheets +cheatpaths: + # Cheatpath properties mean the following: + # 'name': the name of the cheatpath (view with 'cheat -d', filter with 'cheat -p') + # 'path': the filesystem path of the cheatsheet directory (view with 'cheat -d') + # 'tags': tags that should be automatically applied to sheets on this path + # 'readonly': shall user-created ('cheat -e') cheatsheets be saved here? + - name: community + path: /Users/marley/.config/cheat/cheatsheets/community + tags: [community] + readonly: true + + # If you have personalized cheatsheets, list them last. They will take + # precedence over the more global cheatsheets. + - name: personal + path: /Users/marley/dotfiles/cheat/sheets + tags: [personal] + readonly: false + + # While it requires no configuration here, it's also worth noting that + # cheat will automatically append directories named '.cheat' within the + # current working directory to the 'cheatpath'. This can be very useful if + # you'd like to closely associate cheatsheets with, for example, a directory + # containing source code. + # + # Such "directory-scoped" cheatsheets will be treated as the most "local" + # cheatsheets, and will override less "local" cheatsheets. Similarly, + # directory-scoped cheatsheets will always be editable ('readonly: false'). diff --git a/cheat/install.fish b/cheat/install.fish new file mode 100755 index 0000000..4a67ca0 --- /dev/null +++ b/cheat/install.fish @@ -0,0 +1,10 @@ +#!/usr/bin/env fish + +source "$DOT/script/utils.fish" +source "$DOT/homebrew/brew_utils.fish" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +print_subtitle Cheatsheets + +brew_install Cheat cheat diff --git a/cheat/settings.config.fish b/cheat/settings.config.fish new file mode 100644 index 0000000..5e2f108 --- /dev/null +++ b/cheat/settings.config.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +set -gx CHEAT_CONFIG_PATH "~/dotfiles/cheat/conf.yml" diff --git a/fish/install.fish b/fish/install.fish index 5e25988..c42b7da 100755 --- a/fish/install.fish +++ b/fish/install.fish @@ -25,5 +25,4 @@ execute "fisher install decors/fish-colored-man" fish-colored-man brew_install "FiraCode Nerd Font" font-fira-code-nerd-font "" homebrew/cask-fonts brew_install "Starship Prompt" starship brew_install "The Fuck" thefuck -npm_install "tldr pages" tldr brew_install eza eza