1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-12 05:40:17 +00:00

init .files

This commit is contained in:
mlunax 2020-01-24 01:39:19 +01:00
parent 1b20a9de75
commit 01bb6feebf
No known key found for this signature in database
GPG key ID: 364432466E2171B9
6 changed files with 56 additions and 1 deletions

3
.zsh/aliases.zsh Normal file
View file

@ -0,0 +1,3 @@
alias wget='wget -c'
alias zshrc='source ~/.zshrc'
alias dps='docker ps -a --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"'

1
.zsh/cdtemp.zsh Normal file
View file

@ -0,0 +1 @@
cdtemp () { cd $(mktemp -d) }

View file

@ -0,0 +1,9 @@
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir vcs)
else
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator dir vcs)
fi
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs disk_usage)
POWERLEVEL9K_MODE='nerdfont-complete'

28
.zshrc Normal file
View file

@ -0,0 +1,28 @@
export TERM="xterm-256color"
export OTHER=$HOME/.zsh
export ZSH=$HOME/.oh-my-zsh
export ZSH_THEME="powerlevel9k/powerlevel9k"
source $OTHER/powerlevel_settings.sh
source $ZSH/oh-my-zsh.sh
COMPLETION_WAITING_DOTS="true"
plugins=(git docker)
export EDITOR=nano
export JAVA_HOME=
for f in $OTHER/*; do
if [ -f $f ]; then
source $f
fi
done
if [ -d "$HOME/.zsh-custom" ]; then
for f in $HOME/.zsh-custom/*; do
if [ -f $f ]; then
source $f
fi
done
fi
autoload -Uz compinit && compinit -i

View file

@ -4,5 +4,5 @@
### The inspiration taken from [ptrcnull](https://github.com/ptrcnull/)[/dotfiles](https://github.com/ptrcnull/dotfiles)
------
### More practical version of [linuxscripts](https://github.com/mlunax/linuxscript)
### More practical version of [linuxscripts](https://github.com/mlunax/linuxscripts)
------

14
install.zsh Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env zsh
# env, because some OSes keep zsh in /bin (I'm looking at you, Alpine)
cp .zshrc $HOME
if [ ! -d "${HOME}/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
if [ ! -d "${HOME}/.oh-my-zsh/custom/themes/powerlevel9k" ]; then
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
fi
if [ -d "${HOME}/.zsh" ]; then
rm -r $HOME/.zsh
fi
cp -r .zsh $HOME
source $HOME/.zshrc