Skip to content

Commit

Permalink
Merge pull request #8 from StrangeRanger/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger authored Apr 25, 2024
2 parents efa4f09 + 2f12705 commit ad4987d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 248 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@ All notable changes to this project will be documented in this file.

As a note, if the changelog only says "removed(program)", assume it's been removed from the entire readme. If it's only from a specific section, it'll be specified within the parentheses of the change.

## Unreleased
## 2024.4.25

- **added(programs)**: `cheat`
- **added(programs)**: `fzf-tab`
- **added(programs)**: `eza`
- **added(init.vim)**: `mechatroner/rainbow_csv`
- **added(zshrc)**: Updated and added new zstyle settings. They are now located in a section called "Zsh Style Configurations".
- **added(readme)**: Added a few new sections for future documentation.
- **changed(zshrc)**: Checks if `fzf` is installed before sourcing `fzf-tab`.
- **changed(zshrc)**: Removed azure `autoload` and `source`.
- **changed(readme)**: Add recommended method of installing `fzf` on Linux.
- **changed(aliases)**: Rename several aliases.
- **changed(aliases)**: Add new alias for `eza`.
- **removed(aliases)**: Removed `lsd` based aliases.
- **removed(zshrc)**: `PATH` variable updated.

## 2024.4.22

This update is a major overhaul and rewrite of the entire repository. Because of this, I will not be listing all of the changes, as it would be too much to list. However, I will list some of the major changes:

- **changed(progams)**: Added and removed many programs. The programs better reflect what I consistently use and/or like to have on hand at any given time.
- **changed(programs)**: Added and removed many programs. The programs better reflect what I consistently use and/or like to have on hand at any given time.
- **changed(vim => neovim)**: I've switched from using Vim to Neovim. All configurations and documentation referring to vim have been updated to reflect this change.
- **changed(init.vim)**: The main configuration file for Neovim has been updated to reflect the changes made to the programs and plugins.
- **changed(aliases)**: Updated and added new aliases.
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ This document serves as a guide for how I customize my macOS and Linux terminals

### NOTICE

If you are viewing this document on GitHub or as a standard markdown file, you will not be able to see the interactive elements, such as the details and tabs. To view the document in its entirety, please visit the [website](https://cut.hthompson.dev).
If you view this document on GitHub or as a standard markdown file, you will not see the interactive elements, such as the details and tabs. To view the document in its entirety, please visit the [website](https://cut.hthompson.dev).

## Useful Programs

The following table contains a list of terminal programs that I find particularly useful. These programs are separated into two categories: Third Party Package Managers (TPPM) and Native Package Managers (NPM).

The Third Party Package Managers section includes programs that are not installed using the system's default package manager, or installing them using a different package manager is suggested. These programs are typically installed using package managers like Homebrew, Pip, Cargo, Npm, Gem, or Git. I've included a brief description of each program and the relevant package manager(s) that can install it.
The Third Party Package Managers section includes programs not installed using the system's default package manager. These programs are typically installed using tools like Homebrew, Pip, Cargo, Npm, Gem, or Git. I've included a brief description of each program and the relevant package manager(s) that can install it.

/// details | Git Installations
While most of these programs can be installed via git, they will not be marked as such unless recommended by the program's documentation or myself, or if it's the only other way to install the program.
///

The Native Package Managers section includes programs that are installed using the system's default package manager. Since the primary Linux distributions I use are Debian based, all of the programs in this section are confirmed installable via apt. For other Linux distributions, you can check [Repology](https://repology.org/) to see if the program is available in your distribution's package manager. Just like with TPPM, I've included a brief description for each program and a link with the number of repository families featuring the package.
The Native Package Managers section includes programs that can be installed using the system's default package manager. Since the primary Linux distributions I use are Debian based, all of the programs in this section are confirmed installable via apt. For other Linux distributions, you can check [Repology](https://repology.org/) to see if the program is available in your distribution's package manager. Like with TPPM, I've included a brief description for each program and a link with the number of repository families featuring the package.

/// tab | Third Party Package Manager
{{ read_csv("includes/csv/useful-packages-tppm.csv") }}
Expand All @@ -48,7 +48,7 @@ In combination with oh-my-zsh, I use [Powerlevel10k](https://github.com/romkatv/

### ZSH Resource File

Below are the configurations for my `.zshrc` file, divided into two sections: macOS and Linux. The macOS configurations are tailored for macOS, while the other is designed for Linux.
Below are tshe configurations for my `.zshrc` file, divided into two sections: macOS and Linux. The macOS configurations are tailored for macOS, while the other is designed for Linux.

You are welcome to use this resource in any manner you prefer. My intention is to offer it as a guide for structuring your own `.zshrc` file and to present additional configurations not detailed elsewhere in this document.

Expand Down Expand Up @@ -157,6 +157,10 @@ If you prefer not to use all the features offered by vim-plug, you can opt for a

...coming soon...

### Installed TreeSitter Parsers

...coming soon...

## Terminal Profile

/// tab | macOS
Expand Down
3 changes: 2 additions & 1 deletion includes/csv/useful-packages-npm.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Programs,Description,Number of Repository Families Featuring this Package,Is a C
[codespell](https://github.com/codespell-project/codespell),Check code for common misspellings.,[![Packaging status](https://repology.org/badge/tiny-repos/codespell.svg)](https://repology.org/project/codespell/versions),Yes," "
[deborphan](https://tracker.debian.org/pkg/deborphan),"Program that can find unused packages, e.g. libraries.",[![Packaging status](https://repology.org/badge/tiny-repos/deborphan.svg)](https://repology.org/project/deborphan/versions),Yes,Specific to Debian based distributions.
[duf](https://github.com/muesli/duf),Disk Usage/Free Utility - a better 'df' alternative.,[![Packaging status](https://repology.org/badge/tiny-repos/duf.svg)](https://repology.org/project/duf/versions),Yes," "
[eza](https://github.com/eza-community/eza),"A modern, maintained replacement for `ls`.",[![Packaging status](https://repology.org/badge/tiny-repos/eza.svg)](https://repology.org/project/eza/versions),Yes,"For the apt package installation, see [here](https://github.com/eza-community/eza/blob/main/INSTALL.md#debian-and-ubuntu)."
[ffmpeg](https://github.com/FFmpeg/FFmpeg),"FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.",[![Packaging status](https://repology.org/badge/tiny-repos/ffmpeg.svg)](https://repology.org/project/ffmpeg/versions),???," "
[fzf](https://github.com/junegunn/fzf),A command-line fuzzy finder.,[![Packaging status](https://repology.org/badge/tiny-repos/fzf.svg)](https://repology.org/project/fzf/versions),Yes," "
[fzf](https://github.com/junegunn/fzf),A command-line fuzzy finder.,[![Packaging status](https://repology.org/badge/tiny-repos/fzf.svg)](https://repology.org/project/fzf/versions),Yes,Recommended install method: [Git](https://github.com/Aloxaf/fzf-tab) OR [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf)
[gallery-dl](https://github.com/mikf/gallery-dl),Command-line program to download image galleries and collections from several image hosting sites.,[![Packaging status](https://repology.org/badge/tiny-repos/gallery-dl.svg)](https://repology.org/project/gallery-dl/versions),Yes," "
[git](https://github.com/git/git),"Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.",[![Packaging status](https://repology.org/badge/tiny-repos/git.svg)](https://repology.org/project/git/versions),Yes," "
[git-delta](https://github.com/dandavison/delta),"A syntax-highlighting pager for git, diff, and grep output",[![Packaging status](https://repology.org/badge/tiny-repos/git-delta.svg)](https://repology.org/project/git-delta/versions),No," "
Expand Down
2 changes: 2 additions & 0 deletions includes/csv/useful-packages-tppm.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Programs,Description,Applicable OS's,Available Package Managers,Is a Command,Oth
[codespell](https://github.com/codespell-project/codespell),Check code for common misspellings.,macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/codespell?color=f9d194)](https://formulae.brew.sh/formula/codespell)<br>[![PyPI](https://img.shields.io/pypi/v/codespell?color=3572A5)](https://pypi.org/project/codespell/),Yes," "
[coreutils](https://github.com/coreutils/coreutils),"These are the GNU core utilities. This package is the union of the GNU `fileutils`, `sh-utils`, and `textutils` packages.",macOS,[![homebrew version](https://img.shields.io/homebrew/v/coreutils?color=f9d194)](https://formulae.brew.sh/formula/coreutils),Collection,"All GNU commands installed via coreutils, are the same as they are on Linux, but prefixed with a `g` (i.e. `gcp` for `cp`)."
[duf](https://github.com/muesli/duf),Disk Usage/Free Utility - a better 'df' alternative.,macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/duf?color=f9d194)](https://formulae.brew.sh/formula/duf),Yes," "
[eza](https://github.com/eza-community/eza),"A modern, maintained replacement for `ls`.",macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/eza?color=f9d194)](https://formulae.brew.sh/formula/eza)<br>[![Crates.io](https://img.shields.io/crates/v/eza?color=dea584)](https://crates.io/crates/eza),Yes," "
[ffmpeg](https://github.com/FFmpeg/FFmpeg),"FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.",macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/ffmpeg?color=f9d194)](https://formulae.brew.sh/formula/ffmpeg),Yes," "
[fzf](https://github.com/junegunn/fzf),A command-line fuzzy finder.,macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/fzf?color=f9d194)](https://formulae.brew.sh/formula/fzf),Yes," "
[fzf-tab](https://github.com/Aloxaf/fzf-tab),Replace zsh's default completion selection menu with fzf!,macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/fzf-tab?color=f9d194)](https://formulae.brew.sh/formula/fzf-tab)<br>[![Github](https://img.shields.io/badge/git-git%20clone-lightgrey)](https://github.com/Aloxaf/fzf-tab),No," "
[gallery-dl](https://github.com/mikf/gallery-dl),Command-line program to download image galleries and collections from several image hosting sites.,macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/gallery-dl?color=f9d194)](https://formulae.brew.sh/formula/gallery-dl)<br>[![PyPI](https://img.shields.io/pypi/v/gallery-dl?color=3572A5)](https://pypi.org/project/gallery-dl/),Yes," "
[git](https://github.com/git/git),"Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.",macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/git?color=f9d194)](https://formulae.brew.sh/formula/git),Yes," "
[git-delta](https://github.com/dandavison/delta),"A syntax-highlighting pager for git, diff, and grep output",macOS<br>Linux,[![homebrew version](https://img.shields.io/homebrew/v/git-delta?color=f9d194)](https://formulae.brew.sh/formula/git-delta)<br>[![Crates.io](https://img.shields.io/crates/v/git-delta?color=dea584)](https://crates.io/crates/git-delta),No," "
Expand Down
95 changes: 3 additions & 92 deletions includes/zshrc-files/zshrc-linux-snippet.zsh
Original file line number Diff line number Diff line change
@@ -1,67 +1,11 @@
# If PowerLevel10K's Instant Prompt is enabled, `export GPG_TTY=$(tty)` needs to be
# placed at the top of this file. Find more information here:
# https://unix.stackexchange.com/questions/608842/zshrc-export-gpg-tty-tty-says-not-a-tty/608921#608921
export GPG_TTY=$(tty)

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
HIST_STAMPS="yyyy-mm-dd"

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
#plugins=(git colored-man-pages copybuffer copypath copyfile bgnotify) # Desktop
plugins=(git colored-man-pages) # Server

# Zsh "plugin" installed via git and the following command:
# git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
zsh_completion="${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src"
[[ -d $zsh_completion ]] && fpath+=${zsh_completion}

source $ZSH/oh-my-zsh.sh


####[ Personal Configurations ]#########################################################
# --8<-- [start:user_config]
####[[ Aliases ]]#######################################################################
####[[[ Group 1 ]]]#####################################################################


## General aliases.
alias zls="eza"

## Update based aliases.
alias updatezshplugins="bash ~/Programs/mass-git/mass-git -p ~/.oh-my-zsh/custom/plugins/ -r"
alias updatecopilot="bash ~/Programs/mass-git/mass-git -p ~/.config/nvim/pack/github/ -r"
Expand Down Expand Up @@ -116,41 +60,8 @@ ugit - ugit helps you undo git commands without much effort.
\""
# --8<-- [end:user_config]


####[[ Environmental Variables ]]#######################################################


# --8<-- [start:ls_colors]
## Modifies the colors of files and directories in the terminal.
export LS_COLORS="di=34:ln=36:so=35:pi=1;33:ex=32:bd=34;46:cd=1;33;40:su=30;41:sg=30;46:tw=30;42:ow=30;1;43"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
# --8<-- [end:ls_colors]

# PATH value...
export PATH="$PATH:/home/hunter/.local/bin"


####[[ Sourced Files ]]#################################################################


# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# Zsh "plugin" installed via git and the following command:
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
zsh_syntax_highlighting="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
[[ -f $zsh_syntax_highlighting ]] && source "$zsh_syntax_highlighting"

# Zsh "plugin" installed via git and the following command:
# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
zsh_autosuggestions="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
[[ -f $zsh_autosuggestions ]] && source "$zsh_autosuggestions"

# Zsh "plugin" installed via git and the following command:
# git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
fzf_tab="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab/fzf-tab.plugin.zsh"
[[ -f $fzf_tab ]] && source "$fzf_tab"


####[[ Others ]]########################################################################
#### These are generally configurations set up by setup scripts or other programs.
29 changes: 25 additions & 4 deletions includes/zshrc-files/zshrc-linux.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,17 @@ plugins=(git colored-man-pages) # Server
zsh_completion="${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src"
[[ -d $zsh_completion ]] && fpath+=${zsh_completion}

source $ZSH/oh-my-zsh.sh
source "$ZSH/oh-my-zsh.sh"


####[ Personal Configurations ]#########################################################
####[[ Aliases ]]#######################################################################
####[[[ Group 1 ]]]#####################################################################


## General aliases.
alias zls="eza"

## Update based aliases.
alias updatezshplugins="bash ~/Programs/mass-git/mass-git -p ~/.oh-my-zsh/custom/plugins/ -r"
alias updatecopilot="bash ~/Programs/mass-git/mass-git -p ~/.config/nvim/pack/github/ -r"
Expand Down Expand Up @@ -120,10 +123,11 @@ ugit - ugit helps you undo git commands without much effort.

## Modifies the colors of files and directories in the terminal.
export LS_COLORS="di=34:ln=36:so=35:pi=1;33:ex=32:bd=34;46:cd=1;33;40:su=30;41:sg=30;46:tw=30;42:ow=30;1;43"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
# This is set in the Zsh Style Configurations section.
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

# PATH value...
export PATH="$PATH:/home/hunter/.local/bin"
export PATH="$PATH:$HOME/.local/bin"


####[[ Sourced Files ]]#################################################################
Expand All @@ -145,7 +149,24 @@ zsh_autosuggestions="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggesti
# Zsh "plugin" installed via git and the following command:
# git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
fzf_tab="${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab/fzf-tab.plugin.zsh"
[[ -f $fzf_tab ]] && source "$fzf_tab"
[[ -f $fzf_tab ]] && hash fzf 2>/dev/null && source "$fzf_tab"


####[[ Zsh Style Configurations ]]######################################################


# Disable sort when completing `git checkout`.
zstyle ':completion:*:git-checkout:*' sort false
# Set descriptions format to enable group support.
# NOTE: Don't use escape sequences here, fzf-tab will ignore them.
zstyle ':completion:*:descriptions' format '[%d]'
# Set list-colors to enable filename colorizing.
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
## Preview directory's content with `eza` when completing `cd`.
hash eza 2>/dev/null \
&& zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
# Wwitch group using `<` and `>`.
zstyle ':fzf-tab:*' switch-group '<' '>'


####[[ Others ]]########################################################################
Expand Down
Loading

0 comments on commit ad4987d

Please sign in to comment.