diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4ea8bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.history/* diff --git a/.zsh_plugins.txt b/.zsh_plugins.txt new file mode 100644 index 0000000..26efb58 --- /dev/null +++ b/.zsh_plugins.txt @@ -0,0 +1,8 @@ +# Themes +romkatv/powerlevel10k +# Plugins +MichaelAquilina/zsh-you-should-use # Reminds of aliases +zsh-users/zsh-syntax-highlighting # Fish like Syntax highlighting +zsh-users/zsh-completions # Additional completion definitions for Zsh +zsh-users/zsh-autosuggestions # Fish-like fast/unobtrusive autosuggestions for zsh +supercrabtree/k # Nice directory listening \ No newline at end of file diff --git a/aliases b/aliases index 71fcebe..cd7e428 100644 --- a/aliases +++ b/aliases @@ -1,5 +1,5 @@ ## Aliases -alias ll='ls -la' +alias ll='k' alias grep='grep --color=auto' alias ports='netstat -an | grep LISTEN' alias df='df -h' @@ -23,11 +23,6 @@ alias dstart="docker-compose up -d " alias drestart="docker-compose stop && docker-compose up -d" alias drestartl="docker-compose stop && docker-compose up -d && docker-compose logs -f" alias dstats="docker stats" -if [ "$(uname)" = "Darwin" ]; then - alias ls='ls -G' -else - alias ls='ls --color=auto' -fi alias plextraktsync="cd /opt/plextraktsync/ && docker-compose run --rm plextraktsync" alias plexmetamanager="cd /opt/plexmetamanger/ && docker-compose run --rm plex-meta-manager --run" ## Aliases with parameters diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index 8e4cf37..511b27b --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ ## Define Arrays packages=( "zsh" "htop" "figlet" "tmux" "curl" "net-tools" "dnsutils" "tree" ) -configfiles=( ".zshrc" ".antigen.zsh" ".p10k.zsh" ".tmux.conf" ".config/htop/htoprc" "/usr/share/nano/yaml.nanorc" ) +configfiles=( ".zshrc" ".zsh_plugins.txt" ".p10k.zsh" ".tmux.conf" ".config/htop/htoprc" "/usr/share/nano/yaml.nanorc" ) configfileslinux=( "/etc/nanorc" ) motdfiles=( "/etc/update-motd.d/00-header" "/etc/update-motd.d/10-uname" "/etc/update-motd.d/10-sysinfo" "/etc/update-motd.d/90-footer" ) @@ -15,9 +15,7 @@ else mkdir ~/.config/htop fi - ## Install packages - if [ "$(uname)" = "Darwin" ]; then echo MacOS found - no installation of packages needed. else @@ -36,7 +34,6 @@ echo $i is installed - skipping. fi ## Remove Config Files - for j in "${configfiles[@]}" do rm $j @@ -49,7 +46,6 @@ if [ "$(uname)" != "Darwin" ]; then done fi - ## Remove Motd Files if [ "$(uname)" = "Darwin" ]; then echo MacOS found - no motd files to remove. @@ -62,8 +58,21 @@ do done fi -## Install Antigen -curl -L git.io/antigen > .antigen.zsh +## Remove Antigen if installed +if [ -d ~/.antigen ]; then + echo Antigen is installed. Removing... + rm -R ~/.antigen + rm ~/.antigen.zsh +fi + + +## Install Antidote - replacement of Antigen +if test -f ~/.antidote; then + echo "Antidote allready installed." +else + echo "Installing antidote..." + git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote +fi ## Create Symlinks ln -s ~/.zshconfig/zshrc .zshrc @@ -71,21 +80,11 @@ ln -s ~/.zshconfig/yaml.nanorc /usr/share/nano/yaml.nanorc ln -s ~/.zshconfig/tmux .tmux.conf ln -s ~/.zshconfig/htoprc .config/htop/htoprc ln -s ~/.zshconfig/p10k.zsh .p10k.zsh -if [ "$(uname)" != "Darwin" ]; then - ln -s ~/.zshconfig/nanorc /etc/nanorc -else - echo MacOS found - No linking of Nanorc needed. -fi - - +ln -s ~/.zshconfig/.zsh_plugins.txt .zsh_plugins.txt +ln -s ~/.zshconfig/nanorc /etc/nanorc ## Make ZSH as default Shell -if [ "$(uname)" = "Darwin" ]; then - echo MacOS found - ZSH is already default shell. -else chsh -s $(which zsh) -fi - ## Copy Files, fix permissions if [ "$(uname)" = "Darwin" ]; then diff --git a/motd/00-header b/motd/00-header old mode 100755 new mode 100644 diff --git a/motd/10-sysinfo b/motd/10-sysinfo old mode 100755 new mode 100644 diff --git a/motd/90-footer b/motd/90-footer old mode 100755 new mode 100644 diff --git a/zshrc b/zshrc index cd5f4c9..1b1b741 100644 --- a/zshrc +++ b/zshrc @@ -1,20 +1,14 @@ +# source antidote +source ${ZDOTDIR:-~}/.antidote/antidote.zsh + +# initialize plugins statically with ${ZDOTDIR:-~}/.zsh_plugins.txt +antidote load + # Aliases source ~/.zshconfig/aliases -# Themes & Plugins - -source ~/.antigen.zsh -antigen bundle agkozak/zsh-z -antigen theme romkatv/powerlevel10k -antigen bundle "MichaelAquilina/zsh-you-should-use" -antigen bundle zsh-users/zsh-syntax-highlighting - -# Shit for OSX -if [ "$(uname)" != "Darwin" ]; then - antigen bundle brew -fi -antigen apply -autoload -U compinit && compinit +autoload -Uz promptinit && promptinit && prompt powerlevel10k +#autoload -Uz promptinit && promptinit && prompt powerlevel10k zstyle ':completion:*' menu select ### Settings fuer History