Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
- # If you come from bash you might have to change your $PATH.
- # export PATH=$HOME/bin:/usr/local/bin:$PATH
- export PATH=$HOME/bin:/usr/local/bin:$PATH
- export PATH=$HOME/chaosmos/.local/bin:$PATH
- export PATH=$PATH:/snap/bin/:$PATH
- export PATH=/usr/lib/postgresql/14/bin:$PATH
- export PATH="$PATH:$HOME/.local/bin"
- export PATH="$HOME/.npm/bin:$PATH"
- export FLYCTL_INSTALL="/home/chaosmos/.fly"
- export PATH="$FLYCTL_INSTALL/bin:$PATH"
- export GOROOT=/usr/local/go
- export GOPATH=$HOME/go
- export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
- # 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"
- # 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 3
- # 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"
- export HISTTIMEFORMAT="%d/%m/%y %T "
- # 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=(
- colors
- colorize
- git
- sudo
- # zsh_reload
- copypath
- copyfile
- command-not-found
- # zsh-nvm
- volta
- autoupdate
- zsh-autosuggestions
- fd
- zsh-docker-aliases
- # fzf
- fzf-tab
- zsh-256color
- # zsh-z
- zoxide
- npm
- yarn
- gulp
- zsh-better-npm-completion
- timer
- systemd
- docker
- docker-compose
- httpie
- heroku
- gh
- httpie
- colored-man-pages
- # thefuck
- F-Sy-H
- )
- source $ZSH/oh-my-zsh.sh
- # User configuration
- # source $(dirname $(gem which colorls))/tab_complete.sh
- #export LS_COLORS="$(vivid generate snazzy)"
- # export LS_COLORS="$(vivid generate molokai)"
- export LS_COLORS="$(vivid generate ~/.config/vivid/themes/my-custom-molokai.yml)"
- export MANPAGER="sh -c 'col -bx | bat -l man -p'"
- export FX_THEME=2
- export EDITOR=micro
- export MICRO_TRUCOLOR=1
- export LANG="en_US.UTF-8"
- export LC_ALL="en_US.UTF-8"
- export COLORTERM=truecolor
- export FX_SHOW_SIZE=true
- # source /home/chaosmos/.local/share/lscolors.sh
- # 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`.
- #
- # Example aliases
- # alias zshconfig="mate ~/.zshrc"
- # alias ohmyzsh="mate ~/.oh-my-zsh"
- # --------------------------------- ALIASES ---------------------------------
- alias d="http --download"
- alias reload_session="omz reload && echo the .zshrc file was updated successfully"
- alias sst="systemctl status"
- alias cp='cp -v'
- alias rm='rm -I'
- alias mv='mv -iv'
- alias ln='ln -sriv'
- alias cl="clear"
- alias pn="pnpm"
- #alias md="mkdir"
- ### FOR LS ###
- alias ls="exa --icons -a --git --color=always --group-directories-first"
- alias l="exa -l -a -h --no-user --no-permissions --icons --git --color=always --group-directories-first -@ -b --created -m"
- alias dis="display"
- # alias ls="colorls --sd -a --gs -h"
- alias tree="tree -I node_modules"
- # alias lt="ls --tree=2 -h --sd -A | grep -R --exclude-dir=node_modules"
- # alias lt="ls --tree=2 -h --sd -A --gs"
- # alias ls="lsd"
- # alias cd="cd && colorls --sd -a --gs -h"
- ### COLORLS FOR LS ###
- # alias ls="colorls --sd -a --gs -h"
- # alias l="ls -l"
- # alias la="ls -a"
- # alias lla="ls -la"
- alias lt="tree -L -a -I 'node_modules|.parcel-cache|cache|.idea|.git|.github'"
- alias lt1="tree -L 1 -a -I 'node_modules|.parcel-cache|cache|.idea|.git|.github'"
- alias lt2="tree -L 2 -a -I 'node_modules|.parcel-cache|cache|.idea|.git|.github'"
- alias lt3="tree -L 3 -a -I 'node_modules|.parcel-cache|cache|.idea|.git|.github'"
- alias lt4="tree -L 4 -a -I 'node_modules|.parcel-cache|cache|.idea|.git|.github'"
- alias sau="sudo apt update && sudo apt full-upgrade -y"
- alias sai="sudo apt install"
- alias fixzsh="zsh_history_fix"
- alias drop_cache="sudo sh -c \"echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'\""
- alias updzshrc="source ~/.zshrc && echo the .zshrc file was updated successfully"
- alias zshconfig="micro ~/.zshrc"
- alias ni="npm install"
- alias npmg="npm install --global"
- alias npmd="npm install --save-dev"
- alias mc="micro"
- alias debi="sudo dpkg -i"
- alias cat="bat"
- # alias grep='grep --color=auto'
- # alias fgrep='fgrep --color=auto'
- # alias egrep='egrep --color=auto'
- # alias diff='diff --color=auto'
- alias ip='ip --color=auto'
- alias top='bashtop'
- alias glo="forgit::log"
- alias gd="forgit::diff"
- alias ga="forgit::add"
- ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#90ffc7'
- FAST_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
- typeset -A FAST_HIGHLIGHT_STYLES
- ZSH_COLORIZE_TOOL=chroma
- ZSH_COLORIZE_CHROMA_FORMATTER=terminal256
- # ZSH_HIGHLIGHT_STYLES[function]='fg=#3fff00'
- # ZSH_HIGHLIGHT_STYLES[function]='fg=#00AFFF'
- # ZSH_HIGHLIGHT_STYLES[builtin]='fg=#b2ffff'
- # ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=lightgreen,underline'
- # ZSH_HIGHLIGHT_STYLES[command]='fg=#00ff00'
- # ZSH_HIGHLIGHT_STYLES[command]='fg=#00ff00'
- # ZSH_HIGHLIGHT_STYLES[precommand]='fg=#00ff4c'
- # ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#ff6347'
- # ZSH_HIGHLIGHT_STYLES[path]='fg=#00AFFF'
- # ZSH_HIGHLIGHT_STYLES[arg0]='fg=#00FF00'
- # FAST_HIGHLIGHT_STYLES[variable]='fg=#28ACB1'
- FAST_HIGHLIGHT_STYLES[alias]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[global-alias]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[suffix-alias]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[builtin]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[hashed-command]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[function]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[command]='fg=#00ff00'
- FAST_HIGHLIGHT_STYLES[precommand]='fg=00ff7f'
- # FAST_HIGHLIGHT_STYLES[path-to-dir]='fg=#28ACB1'
- FAST_HIGHLIGHT_STYLES[path-to-dir]='fg=#00ffff'
- [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
- # fzf's command
- export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude '.git' --exclude 'node_modules'"
- # CTRL-T's command
- export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND --type f"
- # ALT-C's command
- export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d"
- export FZF_DEFAULT_OPTS="
- --layout=reverse
- --info=inline
- --height=90%
- --preview-window=right:60%
- --multi
- --prompt='∼ '
- --pointer='▶'
- --marker='✓'
- --preview '([[ -f {} ]] && (bat --style=numbers,header,grid --color=always {} || cat {})) || ([[ -d {} ]] && (exa -l -a -h --no-user --no-permissions --icons --git --color=always --group-directories-first -@ -b --created -m {} | less)) || echo {} 2> /dev/null | head -200'
- --bind '?:toggle-preview'
- --bind 'ctrl-a:select-all'
- --bind 'ctrl-y:execute-silent(echo {+} | pbcopy)'
- --bind 'ctrl-e:execute(echo {+} | xargs -o vim)'
- --bind 'ctrl-v:execute(code {+})'
- "
- export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS"
- --color=fg:#4ca5ed,bg:#1b2b34,hl:#4cdb33
- --color=fg+:#00ddff,bg+:#343d46,hl+:#2bff05
- --color=info:#fac863,prompt:#07ed35,pointer:#07ed35
- --color=marker:#5fb3b3,spinner:#07ed35,header:#1fdbce
- "
- export FORGIT_FZF_DEFAULT_OPTS="
- --exact
- --border
- --cycle
- --reverse
- --preview-window=bottom:80%
- --height '80%'
- "
- _ZO_FZF_OPTS="
- --exact
- --border
- --cycle
- --reverse
- --preview 'exa -l -a -h --no-user --no-permissions --icons --git --color=always group-directories-first -@ -b $realpath'
- --preview-window=bottom:80%
- --height '80%'
- --layout=reverse
- "
- zstyle ':completion::*:ls::*' fzf-completion-opts --preview='eval head {1}'
- zstyle ':completion:*' fzf-search-display true
- # disable sort when completing `git checkout`
- zstyle ':completion:*:git-checkout:*' sort false
- # set descriptions format to enable group support
- zstyle ':completion:*:descriptions' format '[%d]'
- # set list-colors to enable filename colorizing
- zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
- # preview directory's content with exa when completing cd
- zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -a -h --no-user --no-permissions --icons --git --color=always --group-directories-first -@ -b $realpath'
- zstyle ':fzf-tab:complete:<TAB>:*' fzf-preview 'exa -a -h --no-user --no-permissions --icons --git --color=always --group-directories-first -@ -b $realpath'
- # switch group using `,` and `.`
- zstyle ':fzf-tab:*' switch-group ',' '.'
- zstyle ':completion:*:*:docker:*' option-stacking yes
- zstyle ':completion:*:*:docker-*:*' option-stacking yes
- # # give a preview of commandline arguments when completing `kill`
- # zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
- # zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \
- # [[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w'
- # zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap'
- zstyle ':fzf-tab:complete:systemctl-*:*' fzf-preview 'SYSTEMD_COLORS=1 systemctl status $word'
- # it is an example. you can change it
- zstyle ':fzf-tab:complete:git-(add|diff|restore):*' fzf-preview \
- 'git diff $word | delta'
- zstyle ':fzf-tab:complete:git-log:*' fzf-preview \
- 'git log --color=always $word'
- zstyle ':fzf-tab:complete:git-help:*' fzf-preview \
- 'git help $word | bat -plman --color=always'
- zstyle ':fzf-tab:complete:git-show:*' fzf-preview \
- 'case "$group" in
- "commit tag") git show --color=always $word ;;
- *) git show --color=always $word | delta ;;
- esac'
- zstyle ':fzf-tab:complete:git-checkout:*' fzf-preview \
- 'case "$group" in
- "modified file") git diff $word | delta ;;
- "recent commit object name") git show --color=always $word | delta ;;
- *) git log --color=always $word ;;
- esac'
- _fzf_compgen_path() {
- fd . "$1"
- }
- _fzf_compgen_dir() {
- fd --type d . "$1"
- }
- [ -f ~/.oh-my-zsh/custom/plugins/forgit/forgit.plugin.zsh ] && source ~/.oh-my-zsh/custom/plugins/forgit/forgit.plugin.zsh
- export LIBGL_ALWAYS_INDIRECT=1 #GWSL
- export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 #GWSL
- export PULSE_SERVER=tcp:$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}') #GWSL
- export QT_SCALE_FACTOR=1 #GWSL
- # export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
- # sudo /etc/init.d/dbus start &> /dev/null
- # export LIBGL_ALWAYS_INDIRECT=1
- # Generated for envman. Do not edit.
- [ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
- # Generated for envman. Do not edit.
- [ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
- autoload -Uz compinit && compinit
- eval "$(zoxide init zsh)"
- eval "$(navi widget zsh)"
- # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
- [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
- # export PATH="${PATH}:/home/chaosmos/.cargo/bin/navi"
- # find-in-file - usage: fif <SEARCH_TERM>
- fif() {
- if [ ! "$#" -gt 0 ]; then
- echo "Need a string to search for!";
- return 1;
- fi
- rg --files-with-matches --no-messages "$1" | fzf $FZF_PREVIEW_WINDOW --preview "rg --ignore-case --pretty --context 10 '$1' {}"
- }
- # Select a docker container to start and attach to
- function da() {
- local cid
- cid=$(docker ps -a | sed 1d | fzf -1 -q "$1" | awk '{print $1}')
- [ -n "$cid" ] && docker start "$cid" && docker attach "$cid"
- }
- # Select a running docker container to stop
- function ds() {
- local cid
- cid=$(docker ps | sed 1d | fzf -q "$1" | awk '{print $1}')
- [ -n "$cid" ] && docker stop "$cid"
- }
- # Select a docker container to remove
- function drm() {
- local cid
- cid=$(docker ps -a | sed 1d | fzf -q "$1" | awk '{print $1}')
- [ -n "$cid" ] && docker rm "$cid"
- }
- source /home/chaosmos/.config/broot/launcher/bash/br
- # pnpm
- export PNPM_HOME="/home/chaosmos/.local/share/pnpm"
- export PATH="$PNPM_HOME:$PATH"
- # pnpm end
- # export VOLTA_HOME="$HOME/.volta"
- # export PATH="$VOLTA_HOME/bin:$PATH"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement