2020-06-11 13:11:19 +00:00
|
|
|
############################
|
|
|
|
# #
|
|
|
|
# ███████╗███████╗██╗ ██╗ #
|
|
|
|
# ╚══███╔╝██╔════╝██║ ██║ #
|
|
|
|
# ███╔╝ ███████╗███████║ #
|
|
|
|
# ███╔╝ ╚════██║██╔══██║ #
|
|
|
|
# ███████╗███████║██║ ██║ #
|
|
|
|
# ╚══════╝╚══════╝╚═╝ ╚═╝ #
|
|
|
|
# #
|
|
|
|
############################
|
|
|
|
|
2020-06-11 19:54:49 +00:00
|
|
|
# Required packages:
|
|
|
|
# - zsh
|
2020-08-03 15:03:44 +00:00
|
|
|
# - oh-my-zsh-git (AUR)
|
2020-08-03 14:28:12 +00:00
|
|
|
# - zsh-theme-powerlevel10k
|
|
|
|
# - zsh-syntax-highlighting
|
2020-06-11 19:54:49 +00:00
|
|
|
# - zsh-completions
|
|
|
|
# - zsh-autosuggestions
|
2020-08-03 14:28:12 +00:00
|
|
|
# - nerd-font-hack (AUR)
|
2020-06-24 10:08:39 +00:00
|
|
|
# - lsd
|
|
|
|
# - fzf
|
|
|
|
# - pkgfile
|
2020-07-14 21:04:54 +00:00
|
|
|
# - trash-cli (with gvfs)
|
2020-06-11 19:54:49 +00:00
|
|
|
|
2023-05-05 13:03:03 +00:00
|
|
|
export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
|
2020-06-11 13:11:19 +00:00
|
|
|
|
|
|
|
[[ $- != *i* ]] && return
|
2021-02-26 15:11:35 +00:00
|
|
|
[ -n $SSH_CONNECTION ] && source ~/.profile
|
2020-06-11 13:11:19 +00:00
|
|
|
|
|
|
|
# Oh my zsh stuff
|
|
|
|
|
2020-06-12 15:41:36 +00:00
|
|
|
# powerline instant promt
|
|
|
|
if [ -z $SSH_CONNECTION ]; then
|
|
|
|
|
|
|
|
# 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
|
2020-06-11 13:11:19 +00:00
|
|
|
fi
|
|
|
|
|
2023-05-05 13:03:03 +00:00
|
|
|
ZSH="/usr/share/oh-my-zsh"
|
|
|
|
HISTFILE="$XDG_CACHE_HOME/zsh_history"
|
2020-06-11 13:11:19 +00:00
|
|
|
|
|
|
|
if [[ -n $SSH_CONNECTION ]]; then
|
|
|
|
ZSH_THEME="gallois"
|
|
|
|
else
|
|
|
|
ZSH_THEME="../../zsh-theme-powerlevel10k/powerlevel10k"
|
|
|
|
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
2022-06-08 19:36:49 +00:00
|
|
|
[[ ! -f "$XDG_CACHE_HOME/p10k.zsh" ]] || source "$XDG_CACHE_HOME/p10k.zsh"
|
|
|
|
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
2020-06-11 13:11:19 +00:00
|
|
|
fi
|
|
|
|
|
2020-06-25 19:28:33 +00:00
|
|
|
# wal subshell
|
2023-12-02 01:22:06 +00:00
|
|
|
(cat ~/.cache/wal/sequences &)
|
2020-06-25 19:28:33 +00:00
|
|
|
|
2020-06-11 13:11:19 +00:00
|
|
|
DISABLE_UPDATE_PROMPT=true
|
|
|
|
DISABLE_AUTO_UPDATE=true
|
|
|
|
ZSH_CACHE_DIR="$XDG_CACHE_HOME/oh-my-zsh" # mkdir ~/.cache/oh-my-zsh
|
|
|
|
_Z_DATA="$XDG_CACHE_HOME/z"
|
2023-05-05 13:03:03 +00:00
|
|
|
ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST
|
2021-02-26 15:11:35 +00:00
|
|
|
|
2020-06-11 13:11:19 +00:00
|
|
|
plugins=(
|
|
|
|
git
|
|
|
|
last-working-dir
|
|
|
|
extract
|
|
|
|
z
|
|
|
|
)
|
|
|
|
|
2023-05-05 13:03:03 +00:00
|
|
|
autoload -U compinit
|
|
|
|
|
2020-06-11 13:11:19 +00:00
|
|
|
# start oh my zsh
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
|
|
|
|
# Sytax highlight
|
|
|
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
|
|
|
|
# autosugestion
|
|
|
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
|
2020-06-24 10:08:39 +00:00
|
|
|
# command not found
|
2023-05-05 13:03:03 +00:00
|
|
|
source /usr/share/doc/pkgfile/command-not-found.zsh # dont forget to run pkgfile -u
|
2020-06-24 10:08:39 +00:00
|
|
|
|
|
|
|
# Variables
|
|
|
|
|
2023-12-02 01:22:06 +00:00
|
|
|
export MANPAGER="bat -l man -p"
|
2023-05-05 13:03:03 +00:00
|
|
|
|
2020-06-30 22:27:03 +00:00
|
|
|
# ZSH percent fix
|
|
|
|
export PROMPT_EOL_MARK=""
|
|
|
|
|
2020-06-24 10:08:39 +00:00
|
|
|
# FZF
|
|
|
|
export FZF_DEFAULT_COMMAND="fd --type file --color=always"
|
|
|
|
export FZF_DEFAULT_OPTS="--ansi"
|
|
|
|
|
2020-06-11 13:11:19 +00:00
|
|
|
# Aliases
|
|
|
|
alias vim="nvim"
|
|
|
|
alias sudo='sudo '
|
|
|
|
alias please='sudo '
|
|
|
|
|
2021-05-24 13:31:03 +00:00
|
|
|
[ -z $SSH_CONNECTION ] && alias ls='exa --icons'
|
2020-06-11 13:11:19 +00:00
|
|
|
|
2024-01-11 23:39:49 +00:00
|
|
|
alias svim='sudoedit'
|
2020-06-11 14:05:02 +00:00
|
|
|
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfile config --local status.showUntrackedFiles no
|
2020-06-15 14:49:25 +00:00
|
|
|
alias open="xdg-open"
|
2020-06-25 17:52:20 +00:00
|
|
|
alias mixer="pulsemixer"
|
2023-05-05 13:03:03 +00:00
|
|
|
alias yt-dl-audio="yt-dlp --extract-audio --audio-format mp3 -o '%(title)s.%(ext)s'"
|
2020-07-14 21:04:54 +00:00
|
|
|
alias rm="trash"
|
2020-10-26 23:09:54 +00:00
|
|
|
alias modx="chmod +x"
|
2020-10-27 23:14:23 +00:00
|
|
|
alias mv="mv -iv"
|
|
|
|
alias cp="cp -riv"
|
|
|
|
alias mkdir="mkdir -pv"
|
2021-02-26 15:11:35 +00:00
|
|
|
alias yeet="sudo pacman -Rns"
|
2021-05-24 13:31:03 +00:00
|
|
|
alias ip="ip -c=auto"
|
2021-10-28 17:43:04 +00:00
|
|
|
alias syu="sudo pacman -Syu"
|
|
|
|
alias virsh="virsh -c qemu:///system"
|
2023-05-05 13:03:03 +00:00
|
|
|
alias k="kubectl"
|
|
|
|
alias ssh="TERM=xterm-256color ssh"
|
2023-12-02 01:22:06 +00:00
|
|
|
alias df="duf"
|
|
|
|
alias nom="npm"
|