From 6c7fab7ddf1737ab79ca2967810b662990c62bd4 Mon Sep 17 00:00:00 2001 From: Kulvir Singh Date: Sun, 28 Apr 2024 17:00:43 +0530 Subject: [PATCH] zsh cleanup --- .bash_profile | 54 ++++++++---------- .config/starship.toml | 107 +++++++++++++++++++++++++++++++++++ .config/zed/settings.json | 3 +- .gitignore | 3 +- .zshrc | 116 +++----------------------------------- readme.md | 35 ++++-------- 6 files changed, 151 insertions(+), 167 deletions(-) create mode 100644 .config/starship.toml diff --git a/.bash_profile b/.bash_profile index 0b12a78..6de642e 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,34 +1,3 @@ -#export PATH=/opt/homebrew/opt/python@3.9/libexec/bin:$PATH:$HOME/bin - -HOST_NAME=MB - -export PATH=$PATH:$HOME/bin - -export CLICOLOR=1 -export LSCOLORS=GxFxCxDxBxegedabagaced - -txtred='\e[0;31m' # Red -txtgrn='\e[0;32m' # Green -bldgrn='\e[1;32m' # Bold Green -bldpur='\e[1;35m' # Bold Purple -txtrst='\e[0m' # Text Reset - -emojis=("🌐" "🎲" "🌡") - -EMOJI=${emojis[$RANDOM % ${#emojis[@]} ]} - -print_before_the_prompt () { - dir=$PWD - home=$HOME - dir=${dir/"$HOME"/"~"} - printf "\n $txtred%s: $bldpur%s $txtgrn%s\n$txtrst" "$HOST_NAME" "$dir" "$(vcprompt)" -} - -PROMPT_COMMAND=print_before_the_prompt -PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" -PS1="$EMOJI > " -eval "$(/opt/homebrew/bin/brew shellenv)" - #fortune | cowsay -f tux "ara ara kulvir kun" # ---------------------- @@ -41,3 +10,26 @@ alias gd='git diff' alias gpl='git pull' alias gp='git push' alias gs='git status' + +alias python='python3' + +alias nv='nvim' + +# Air for GO hot reload +alias air="~/go/bin/air" + +# homebrew +eval "$(/opt/homebrew/bin/brew shellenv)" + +# cool to use tools (if ever wanted to) +alias neofetch="macchina" +# neofetch + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" + +# bun completions +[ -s "/Users/kulvir/.bun/_bun" ] && source "/Users/kulvir/.bun/_bun" + +eval "$(starship init bash)" diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..8eeb7e5 --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,107 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +add_newline = true +continuation_prompt = 'β–Άβ–Ά ' +format = """$directory$all$character""" +palette = "catppuccin_mocha" + +[aws] +symbol = "" + +[aws.region_aliases] +ap-southeast-1 = 'in' + +# [aws.profile_aliases] +# Enterprise_Naming_Scheme-voidstars = 'void**' + +[bun] +format = '[🍞bun $version ](bold green)' +version_format = '${major}.${minor}' + +[c] +format = '[$symbol $name-$version ]($style)' +symbol = "" +version_format = '${major}.${minor}' + +[character] +success_symbol = '[➜ ](bold fg:green)' +error_symbol = '[⊘ ](bold fg:red)' + +[cmd_duration] +disabled = true + +[directory] +truncation_length = 2 + +[git_branch] +format='[ $symbol$branch(: $remote_branch )]($style)' +style='bold purple' +symbol="ξœ₯ " +always_show_remote = true + +[git_state] +cherry_pick = '[πŸ’ PICKING](bold red)' + +[git_metrics] +format = '[+$added]($added_style) [-$deleted]($deleted_style) ' +disabled = false + +[git_status] +format = '([\[$all_status$ahead_behind\]]($style) )' +ahead = '⇑${count}' +diverged = '⇕⇑${ahead_count}⇣${behind_count}' +behind = '⇣${count}' +conflicted = '🏳' +stashed = 'πŸ“¦' +staged = '[++\($count\)](green)' +deleted = 'πŸ—‘' + + +[golang] +format = '[ $version ](bold cyan)' +version_format = '${major}.${minor}' + +[nodejs] +disabled = true + +[package] +disabled = false + +[palettes.catppuccin_mocha] +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" + +[python] +symbol = " " +format = '[$symbol$version ](bold yellow)' +version_format = '${major}.${minor}' + +[sudo] +format = '[ as $symbol]($style)' +symbol = " " +style = 'bold blue' +disabled = false diff --git a/.config/zed/settings.json b/.config/zed/settings.json index 5887a99..dfc567e 100644 --- a/.config/zed/settings.json +++ b/.config/zed/settings.json @@ -1,5 +1,6 @@ { - "features": { + "base_keymap": "VSCode", + "features": { "copilot": false }, "telemetry": { diff --git a/.gitignore b/.gitignore index 12c290b..8c702c9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,10 +6,9 @@ *.cache* *.local* *.npm* -*.oh-my-zsh* *.vscode* *.zcompdump-Kulvir* -*.zcompdump-Kulvir* +*.zcompdump* *.zsh_* *Application* *Desktop/* diff --git a/.zshrc b/.zshrc index 8571078..5e6526b 100644 --- a/.zshrc +++ b/.zshrc @@ -1,108 +1,7 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +### ---- Syntax Highlighting ---- +source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -# 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="robbyrussell" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# 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 one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="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="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# 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 - zsh-autosuggestions - zsh-syntax-highlighting - ) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. - -# ---------------------- -# Git Aliases -# ---------------------- +# ---- Git Aliases ---- alias ga='git add' alias gaa='git add -A' alias gcm='git commit -m' @@ -115,22 +14,21 @@ alias python='python3' # alias ls='colorls' alias nv='nvim' -# Go hot reload package +# ---- Air GO hot reload ---- alias air="~/go/bin/air" -# homebrew +# ---- homebrew ---- eval "$(/opt/homebrew/bin/brew shellenv)" # cool to use tools (if ever wanted to) alias neofetch="macchina" # neofetch -# bun +# ---- bun ---- export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH" # bun completions [ -s "/Users/kulvir/.bun/_bun" ] && source "/Users/kulvir/.bun/_bun" -# spaceship for zsh prompts -source /opt/homebrew/opt/spaceship/spaceship.zsh +eval "$(starship init zsh)" diff --git a/readme.md b/readme.md index 3196ded..47ef47c 100644 --- a/readme.md +++ b/readme.md @@ -1,25 +1,22 @@ -# Fow weekly hard resets +# Every week -## Install all the applications using Homebrew +## brew installs ```bash -sudo brew install aerial alacritty cloudflare-warp discord duckduckgo firefox google-chrome keka kitty linearmouse microsoft-edge obsidian postman raycast spotify stats telegram visual-studio-code zoom +brew install aerial alacritty cloudflare-warp discord duckduckgo firefox google-chrome keka kitty linearmouse microsoft-edge obsidian postman raycast spotify stats telegram ``` -## Install all the Formulae with Homebrew - ```bash -brew install docker git go macchina neofetch neovim node python3 spaceship tmux +brew install docker git go macchina neofetch neovim python3 ripgrep starship tmux zsh-syntax-highlighting ``` -## Some of the applications to install from appstore +## sed nah brew installs -- Zed +- [Zed](https://zed.dev/) - Spark -- ppt -- amie.so +- [amie](amie.so) - steam -- premiere +- premiere pro (always a nightmare) ## I always forget to set it up first @@ -28,17 +25,7 @@ brew install docker git go macchina neofetch neovim node python3 spaceship tmux ## misc stuff -**Link to some cool stuff like wallpapers [drive](https://drive.google.com/drive/folders/1Bdx17wD76t5JKWm4U7bPDri1SqV-SeSj?usp=drive_link)** +**Wallpapers [drive - fkc u](https://drive.google.com/drive/folders/1Bdx17wD76t5JKWm4U7bPDri1SqV-SeSj?usp=drive_link)** -
- Zsh plugins - - [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) - - [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) -
- -
-Package Managers - - [bun](https://bun.sh/docs/installation) - - [tmux/tpm](https://github.com/tmux-plugins/tpm) - - nvim (formatters & linters) -
+- [tmux/tpm](https://github.com/tmux-plugins/tpm) +- [bun](https://bun.sh/docs/installation)