move most important config to ansible
This commit is contained in:
52
roles/zsh/files/.zshrc
Normal file
52
roles/zsh/files/.zshrc
Normal file
@ -0,0 +1,52 @@
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your Oh My Zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
ZSH_THEME="bira"
|
||||
zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
plugins=(
|
||||
git
|
||||
zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
fzf-zsh-plugin
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='nvim'
|
||||
fi
|
||||
|
||||
# TODO prettier solution?
|
||||
DOTFILES_ZSH_DIR="${0:A:h}"
|
||||
|
||||
for zsh_file in "$DOTFILES_ZSH_DIR"/*.zsh; do
|
||||
[[ -r "$zsh_file" ]] && source "$zsh_file"
|
||||
done
|
||||
|
||||
|
||||
# TODO source all files with .zsh suffix
|
||||
# source ./aliases.zsh
|
||||
# source ./dev_env.zsh
|
||||
# source ./tools.zsh
|
||||
|
||||
# TODO
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then
|
||||
source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh"
|
||||
fi
|
||||
|
||||
|
||||
alias drun='docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
|
||||
|
||||
14
roles/zsh/files/aliases.zsh
Normal file
14
roles/zsh/files/aliases.zsh
Normal file
@ -0,0 +1,14 @@
|
||||
alias vim='nvim'
|
||||
|
||||
alias tp='trash-put'
|
||||
alias tl='trash-list'
|
||||
|
||||
alias szrc='source ~/.zshrc'
|
||||
alias dotf='vim ~/dotfiles/'
|
||||
|
||||
rm() {
|
||||
print "ℹ️ Consider using trash-put instead of rm"
|
||||
print "➡️ Running: trash-put $*"
|
||||
print "⚠️ To use real rm, use /bin/rm"
|
||||
trash-put "$@"
|
||||
}
|
||||
8
roles/zsh/files/dev_env.zsh
Normal file
8
roles/zsh/files/dev_env.zsh
Normal file
@ -0,0 +1,8 @@
|
||||
# export DJANGO_SETTINGS_MODULE=config.settings.dev
|
||||
export DATABASE_HOST=127.0.0.1
|
||||
export DATABASE_NAME=cerenim
|
||||
export DATABASE_USER=brainhero
|
||||
export DATABASE_PORT=5432
|
||||
export DATABASE_DJANGO_SCHEMA=django
|
||||
export SECRET_KEY=abasdjkasd
|
||||
export DATABASE_PASSWORD=abcdefghijk
|
||||
7
roles/zsh/files/hosts/personal.zsh
Normal file
7
roles/zsh/files/hosts/personal.zsh
Normal file
@ -0,0 +1,7 @@
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
export ANDROID_HOME=/home/johannes/Android/Sdk
|
||||
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export PATH=$PATH:$ANDROID_HOME/emulator
|
||||
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
||||
1
roles/zsh/files/hosts/work.zsh
Normal file
1
roles/zsh/files/hosts/work.zsh
Normal file
@ -0,0 +1 @@
|
||||
. "$HOME/.local/bin/env"
|
||||
1
roles/zsh/files/tools.zsh
Normal file
1
roles/zsh/files/tools.zsh
Normal file
@ -0,0 +1 @@
|
||||
source /usr/share/autojump/autojump.zsh
|
||||
Reference in New Issue
Block a user