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
|
|
|
|
2020-12-18 17:09:21 +00:00
|
|
|
export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$PATH
|
2020-06-11 13:11:19 +00:00
|
|
|
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
export ZSH="/usr/share/oh-my-zsh"
|
|
|
|
export HISTFILE="$XDG_CACHE_HOME/zsh_history"
|
|
|
|
|
|
|
|
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.
|
|
|
|
# [[ ! -f "$XDG_CACHE_HOME/p10k.zsh" ]] || source "$XDG_CACHE_HOME/p10k.zsh"
|
|
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|
|
fi
|
|
|
|
|
2020-06-25 19:28:33 +00:00
|
|
|
# wal subshell
|
2020-10-07 23:29:54 +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"
|
|
|
|
|
|
|
|
plugins=(
|
|
|
|
git
|
|
|
|
last-working-dir
|
|
|
|
colored-man-pages
|
|
|
|
extract
|
|
|
|
z
|
|
|
|
)
|
|
|
|
|
|
|
|
# start oh my zsh
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
|
|
|
|
autoload -U compinit && compinit -d "$XDG_CACHE_HOME/zcompdump"
|
|
|
|
|
|
|
|
# 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
|
|
|
|
source /usr/share/doc/pkgfile/command-not-found.zsh
|
|
|
|
|
|
|
|
# Variables
|
|
|
|
|
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 '
|
|
|
|
|
|
|
|
[ -z $SSH_CONNECTION ] && alias ls='lsd'
|
|
|
|
|
|
|
|
alias svim='sudo -E nvim'
|
|
|
|
alias xclip='xclip -selection "clipboard"'
|
|
|
|
alias mixer='ncpamixer'
|
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"
|
|
|
|
alias ssh="TERM=xterm-256color ssh"
|
2020-06-30 22:27:03 +00:00
|
|
|
alias yt-dl-audio="youtube-dl --extract-audio --audio-format mp3"
|
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"
|
|
|
|
|