2020-01-25 18:28:20 +01:00
|
|
|
# arisu's zsh config
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# Oh my zsh
|
2020-01-25 19:41:15 +01:00
|
|
|
export ZSH="$HOME/.oh-my-zsh"
|
2020-01-25 18:28:20 +01:00
|
|
|
plugins=(git)
|
|
|
|
COMPLETION_WAITING_DOTS="true"
|
|
|
|
ZSH_THEME="powerlevel10k/powerlevel10k" # `p10k configure`
|
|
|
|
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
|
|
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# LANG
|
|
|
|
export LANG=en_US.UTF-8
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# Auto completion
|
2020-01-25 19:41:15 +01:00
|
|
|
fpath=(~/.zsh/functions $fpath)
|
2020-01-25 18:28:20 +01:00
|
|
|
autoload -U compinit
|
|
|
|
zstyle ':completion:*' menu select
|
|
|
|
zmodload zsh/complist
|
|
|
|
compinit
|
|
|
|
_comp_options+=(globdots)
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# PATH
|
|
|
|
export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" # Ruby
|
|
|
|
export PATH="$PATH:$HOME/.composer/vendor/bin" # Composer
|
|
|
|
export PATH="$HOME/dev/android/platform-tools:$HOME/dev/android/bin:$PATH" # Android platform tools
|
|
|
|
export PATH="$PATH:$HOME/.rvm/bin" # Ruby rvm
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# Editor
|
|
|
|
export EDITOR=micro
|
|
|
|
VISUAL=$EDITOR
|
2019-04-22 20:22:38 +02:00
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
## Aliases ##
|
2020-01-25 19:41:15 +01:00
|
|
|
setopt complete_aliases
|
2019-04-22 20:22:38 +02:00
|
|
|
|
2020-01-25 19:41:15 +01:00
|
|
|
alias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
|
2020-01-25 20:01:57 +01:00
|
|
|
compdef dotgit='git'
|
2020-01-25 18:28:20 +01:00
|
|
|
alias authy="/usr/bin/electron4 --app /usr/lib/authy/app.asar"
|
2019-05-01 01:45:27 +02:00
|
|
|
|
2020-01-25 19:41:15 +01:00
|
|
|
alias syslog="sudo journalctl -f | ccze"
|
|
|
|
journal() {
|
|
|
|
sudo journalctl -f -u $1 | ccze
|
|
|
|
}
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# Random chars
|
2019-06-19 13:25:59 +02:00
|
|
|
rndanchars() {
|
|
|
|
openssl rand -base64 $1 | sed ':a;N;$!ba;s/\n//g' | sed 's/[+\/=]//g' | head -c $1
|
|
|
|
}
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# FFMPEG
|
2019-06-19 13:25:59 +02:00
|
|
|
convert-tomov() {
|
|
|
|
ffmpeg -i "$1" -c:v dnxhd -c:a pcm_s24le -profile:v dnxhr_hq "$2"
|
|
|
|
}
|
|
|
|
|
|
|
|
convert-tomp4() {
|
2020-01-25 18:28:20 +01:00
|
|
|
ffmpeg -i "$1" -c:v libx264 -pix_fmt yuv420p -profile:v high -movflags faststart -c:a aac -ar 48000 -b:a 384000 "$2"
|
2019-06-19 13:25:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
convert-todavinci() {
|
|
|
|
ffmpeg -i "$1" -map 0:v -map 0:a -c:v mpeg4 -qscale:v 1 -c:a pcm_s24le "$1.davinci.mov"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-25 18:28:20 +01:00
|
|
|
# Syntax highlighting (should be last)
|
|
|
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|