mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-24 12:31:31 +01:00
use antigen+oh-my-zsh for easy plugin maintenance
This commit is contained in:
parent
c090bc9a0e
commit
f869ff6d22
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
.DS_store
|
.DS_store
|
||||||
|
*antigen-compat
|
||||||
|
*.zwc
|
||||||
|
|
|
@ -24,6 +24,8 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
alias lsrt='ls -G -lrt | tail -5'
|
alias lsrt='ls -G -lrt | tail -5'
|
||||||
## Add opened files to Textmate's recent menu item
|
## Add opened files to Textmate's recent menu item
|
||||||
alias mate='mate --recent'
|
alias mate='mate --recent'
|
||||||
|
else
|
||||||
|
alias ls='ls --color'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
####
|
####
|
||||||
|
@ -47,17 +49,12 @@ alias ka="killall"
|
||||||
## Load pylab by default when running ipython
|
## Load pylab by default when running ipython
|
||||||
alias ipy="ipython --pylab"
|
alias ipy="ipython --pylab"
|
||||||
|
|
||||||
## Go up one directory or several (with integer argument)
|
|
||||||
alias upcd='. upcd.sh'
|
|
||||||
|
|
||||||
## Show the last 10 modified files
|
## Show the last 10 modified files
|
||||||
if [[ ! "$(uname)" == "Darwin" ]]; then
|
if [[ ! "$(uname)" == "Darwin" ]]; then
|
||||||
alias lsrt="ls -lrt | tail -10"
|
alias lsrt="ls -lrt | tail -10"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## List open connections, TCP and UDP
|
## Stress one CPU core
|
||||||
alias listconnections="lsof -n -i TCP -i UDP"
|
|
||||||
## Stress (run stress &>/dev/null &)
|
|
||||||
alias stress='yes >> /dev/null'
|
alias stress='yes >> /dev/null'
|
||||||
|
|
||||||
# use textmate to diff two files
|
# use textmate to diff two files
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
ret_status="%(?:%{$fg_bold[green]%}➜%{$reset_color%}:%{$fg[red]%}➜%{$reset_color%})"
|
local ret_status="%(?:%{$fg_bold[green]%}➜%{$reset_color%}:%{$fg[red]%}➜%{$reset_color%})"
|
||||||
user="%(#:root@:)"
|
local user="%(#:root@:)"
|
||||||
PROMPT='[%{$fg[red]%}${user}%M%{$reset_color%}][:%{$fg[green]%}%c%{$reset_color%}]$(git_prompt_info) ${ret_status} '
|
PROMPT='[%{$fg[red]%}${user}%M%{$reset_color%}][:%{$fg[green]%}%c%{$reset_color%}]$(git_prompt_info) ${ret_status} '
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
ret_status="%(?:%{$fg_bold[green]%}➜%{$reset_color%}:%{$fg[red]%}➜%{$reset_color%})"
|
local ret_status="%(?:%{$fg_bold[green]%}➜%{$reset_color%}:%{$fg[red]%}➜%{$reset_color%})"
|
||||||
user="%(#:root@:)"
|
local user="%(#:root@:)"
|
||||||
PROMPT='[%*][%{$fg[red]%}${user}%M%{$reset_color%}][:%{$fg[green]%}%c%{$reset_color%}]$(git_prompt_info) ${ret_status} '
|
PROMPT='[%*][%{$fg[red]%}${user}%M%{$reset_color%}][:%{$fg[green]%}%c%{$reset_color%}]$(git_prompt_info) ${ret_status} '
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
# Check for update, set DISABLE_UPDATE_PROMPT=yes to disable the prompt and automatically update
|
# Check for update, set DISABLE_UPDATE_PROMPT=yes to disable the prompt and automatically update
|
||||||
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh
|
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh
|
||||||
|
|
||||||
# oh-my-zsh plugins (some of these have to be installed by running install.sh or install_zsh_plugins, found in install.sh)
|
# antigen plugins
|
||||||
shared_plugins=(git alias-tips sudo common-aliases fast-syntax-highlighting zsh-autosuggestions colored-man-pages zsh-navigation-tools zsh_reload themes)
|
antigen_plugins="git
|
||||||
|
common-alias
|
||||||
|
alias-tips
|
||||||
|
sudo
|
||||||
|
zsh-navigation-tools
|
||||||
|
colored-man-pages
|
||||||
|
zdharma/fast-syntax-highlighting
|
||||||
|
zsh-users/zsh-autosuggestions
|
||||||
|
djui/alias-tips"
|
||||||
|
|
||||||
uname=$(uname -a)
|
uname=$(uname -a)
|
||||||
if [[ $uname == *"Darwin"* ]]; then
|
if [[ $uname == *"Darwin"* ]]; then
|
||||||
if [[ $(which port) ]]; then
|
os_extra="osx"
|
||||||
os_extra=(osx macports)
|
elif [[ $uname == *"ARCH"* || $uname == *"MANJARO"* ]]; then
|
||||||
else
|
os_extra="archlinux systemd"
|
||||||
os_extra=(osx)
|
|
||||||
fi
|
|
||||||
elif [[ $uname == *"ARCH"* ]]; then
|
|
||||||
os_extra=(archlinux systemd)
|
|
||||||
elif [[ $uname == *"MANJARO"* ]]; then
|
|
||||||
os_extra=(archlinux systemd)
|
|
||||||
elif [[ $uname == *"Debian"* ]]; then
|
elif [[ $uname == *"Debian"* ]]; then
|
||||||
os_extra=(debian)
|
os_extra="debian systemd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
plugins="$antigen_plugins $os_extra"
|
||||||
|
|
||||||
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
|
antigen bundles <<EOBUNDLES
|
||||||
|
$plugins
|
||||||
|
EOBUNDLES
|
||||||
|
|
||||||
|
theme=brethil
|
||||||
|
antigen theme $theme
|
||||||
|
antigen apply
|
||||||
|
|
||||||
# Misc environment variables
|
# Misc environment variables
|
||||||
|
|
||||||
# https://www.xkcd.com/378/
|
# https://www.xkcd.com/378/
|
||||||
|
@ -26,11 +40,11 @@ export EDITOR="vim"
|
||||||
|
|
||||||
export HISTSIZE=100000
|
export HISTSIZE=100000
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
if [[ $SSH_CLIENT ]]; then
|
if [[ $SSH_CLIENT ]]; then
|
||||||
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
|
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
|
||||||
fi
|
fi
|
||||||
|
|
||||||
plugins=($shared_plugins $os_extra)
|
|
||||||
|
|
||||||
alias esource="$EDITOR $HOME/.zshrc"
|
alias esource="$EDITOR $HOME/.zshrc"
|
||||||
alias resource="source $HOME/.zshrc"
|
alias resource="source $HOME/.zshrc"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
#
|
#
|
||||||
# brethil, brutally copied from https://github.com/robbyrussell/oh-my-zsh/blob/master/tools/check_for_upgrade.sh
|
# brethil, brutally copied from https://github.com/robbyrussell/oh-my-zsh/blob/master/tools/check_for_upgrade.sh
|
||||||
# This also tries to update amix's vimrc and oh-my-zsh
|
# This also tries to update amix's vimrc and runs "antigen update"
|
||||||
# 14 July 2017
|
# 14 July 2017
|
||||||
|
|
||||||
zmodload zsh/datetime
|
zmodload zsh/datetime
|
||||||
|
@ -29,12 +29,7 @@ function _upgrade_dotfiles() {
|
||||||
echo "Could not upgrade amix's vimrc and plugins (missing .vim_runtime folder)" >&2
|
echo "Could not upgrade amix's vimrc and plugins (missing .vim_runtime folder)" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# custom zsh plugins
|
antigen update
|
||||||
custom_plugins=("alias-tips" "fast-syntax-highlighting" "zsh-autosuggestions")
|
|
||||||
for plugin in $custom_plugins; do
|
|
||||||
(cd $ZSH/custom/plugins/$plugin && git pull -q --rebase && echo "Upgraded oh-my-zsh plugin: $plugin" || echo "Could not upgrade oh-my-zsh plugin: $plugin" >&2)
|
|
||||||
done
|
|
||||||
|
|
||||||
# update the zsh file
|
# update the zsh file
|
||||||
_update_dotfiles_update
|
_update_dotfiles_update
|
||||||
}
|
}
|
||||||
|
|
170
install.sh
170
install.sh
|
@ -1,15 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## brethil's dotfiles installation file
|
## brethil's dotfiles installation script
|
||||||
## 20 June 2016
|
## 20 June 2016
|
||||||
|
|
||||||
# Get the location for the dotfiles
|
# Get the location for the dotfiles
|
||||||
DOTFILES=$PWD
|
DOTFILES=$PWD
|
||||||
|
|
||||||
ZSHTMP="$HOME/.zshrctmp"
|
# Install packages
|
||||||
echo -e "\n\n# brethil's dotfiles:" >> $ZSHTMP
|
# vim, zsh
|
||||||
echo "DOTFILES=$DOTFILES" >> $ZSHTMP
|
# antigen: zsh plugin manager
|
||||||
echo "source \$DOTFILES/brethil_dotfile.sh" >> $ZSHTMP
|
# grc: generic colourizer, colors output of any command
|
||||||
echo -e "# End of brethil's dotfiles\n\n"
|
# ccze: similar to the above
|
||||||
|
# byobu: configuration/wrapper for tmux
|
||||||
|
# bmon: bandwidth monitor, monitors bandwith usage, shows graph
|
||||||
|
# mtr: mytraceroute, traceroute tool
|
||||||
|
# pv: pipe view, monitor the progress of data through a pipe
|
||||||
|
# byobu: tmux wrapper
|
||||||
|
# htop: like top, but bettah
|
||||||
|
PACKAGES="vim zsh antigen git grc ccze bmon mtr pv tmux byobu htop" # TODO: add bat
|
||||||
|
|
||||||
function setup_git {
|
function setup_git {
|
||||||
# set up some git stuff
|
# set up some git stuff
|
||||||
|
@ -17,25 +24,6 @@ function setup_git {
|
||||||
git config --global merge.ff only
|
git config --global merge.ff only
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_rmate {
|
|
||||||
# Install python version of the textmate rmate remote (from github)
|
|
||||||
if [[ $(whoami) == "root" ]]; then
|
|
||||||
destpath="/usr/bin"
|
|
||||||
else
|
|
||||||
destpath="$HOME/bin"
|
|
||||||
fi
|
|
||||||
if [[ -f $destpath/rmate ]]; then
|
|
||||||
echo "rmate already exists: not installed"
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
curl -sL https://raw.githubusercontent.com/sclukey/rmate-python/master/bin/rmate > $destpath/rmate
|
|
||||||
chmod a+x $destpath/rmate
|
|
||||||
ln -s $destpath/rmate $destpath/mate || "Could not create symbolic link to $destpath/mate (already exists?)"
|
|
||||||
echo "Installed rmate (and mate symlink) in $destpath"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_vimrc {
|
function install_vimrc {
|
||||||
# Install vimrc from github.com/amix/vimrc
|
# Install vimrc from github.com/amix/vimrc
|
||||||
git clone "https://github.com/amix/vimrc.git" "$HOME/.vim_runtime" && sh "$HOME/.vim_runtime/install_awesome_vimrc.sh" || return 1
|
git clone "https://github.com/amix/vimrc.git" "$HOME/.vim_runtime" && sh "$HOME/.vim_runtime/install_awesome_vimrc.sh" || return 1
|
||||||
|
@ -45,21 +33,6 @@ function setup_vim {
|
||||||
ln -s $DOTFILES/my_configs.vim $HOME/.vim_runtime/my_configs.vim
|
ln -s $DOTFILES/my_configs.vim $HOME/.vim_runtime/my_configs.vim
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_zsh_plugins {
|
|
||||||
# Install fast-syntax-highlighting (git: zdharma), zsh-autosuggestions (git:zsh-users), alias-tips
|
|
||||||
ZSH_PLUGINS="$HOME/.oh-my-zsh/custom/plugins"
|
|
||||||
mkdir -p "$ZSH_PLUGINS"
|
|
||||||
# NOTE: if adding plugins here, be sure to also add them to the _dotfiles_upgrade function in check_for_upgrade.sh
|
|
||||||
git clone https://github.com/zdharma/fast-syntax-highlighting.git "${ZSH_PLUGINS}/fast-syntax-highlighting" || error=true
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_PLUGINS}/zsh-autosuggestions" || error=true
|
|
||||||
git clone https://github.com/djui/alias-tips.git "${ZSH_PLUGINS}/alias-tips" || error=true
|
|
||||||
if [[ $error ]]; then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add an ssh config file with:
|
# Add an ssh config file with:
|
||||||
# - Connection multiplexer for faster multiple connections
|
# - Connection multiplexer for faster multiple connections
|
||||||
# - Keep connections alive (avoid timeout disconnections)
|
# - Keep connections alive (avoid timeout disconnections)
|
||||||
|
@ -103,7 +76,11 @@ function create_ssh_config {
|
||||||
chmod 755 ~/.ssh/rc
|
chmod 755 ~/.ssh/rc
|
||||||
|
|
||||||
exec 1>>$ssh_config # redirect everything below to the $ssh_config file
|
exec 1>>$ssh_config # redirect everything below to the $ssh_config file
|
||||||
if [[ "$modifyssh" != "n" ]]; then
|
if [[ "$modifyssh" == "n" ]]; then
|
||||||
|
echo "Did not modify $ssh_config."
|
||||||
|
exec 1>&3 # restore stdout
|
||||||
|
return
|
||||||
|
fi
|
||||||
echo "# brethil's dotfiles setup start"
|
echo "# brethil's dotfiles setup start"
|
||||||
echo 'TCPKeepAlive=yes'
|
echo 'TCPKeepAlive=yes'
|
||||||
echo 'ServerAliveCountMax=6'
|
echo 'ServerAliveCountMax=6'
|
||||||
|
@ -132,14 +109,27 @@ function create_ssh_config {
|
||||||
exec 1>&3 # restore stdout
|
exec 1>&3 # restore stdout
|
||||||
echo ".ssh/ssh_config configured. Edit it to enable custom options:"
|
echo ".ssh/ssh_config configured. Edit it to enable custom options:"
|
||||||
echo "- Compression"
|
echo "- Compression"
|
||||||
echo "- Remote forwarding port 52698->52698 (Textmate rmate remote)"
|
echo "- Remote forwarding remote:2222->localhost:22 (revere tunnel to scp back to the original host using mecp)"
|
||||||
echo "- Remote forwarding remote:2222->localhost:22 (mecp)"
|
|
||||||
else
|
|
||||||
echo "Did not modify $ssh_config."
|
|
||||||
fi
|
|
||||||
echo "# End of ssh config."
|
echo "# End of ssh config."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fix_annoyances {
|
||||||
|
## Fix scrolling in byobu
|
||||||
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
|
sed -i '' 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux
|
||||||
|
else
|
||||||
|
sed -i 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove ls from the grc.zsh config: # TODO: fix this on MacOS
|
||||||
|
sed 's|ls \\|#ls \\|' /etc/grc.zsh
|
||||||
|
|
||||||
|
# TODO: add iptables, docker to grc.zsh
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# First setup
|
# First setup
|
||||||
function brethil_dotfiles_setup {
|
function brethil_dotfiles_setup {
|
||||||
bin="$HOME/bin"
|
bin="$HOME/bin"
|
||||||
|
@ -147,18 +137,6 @@ function brethil_dotfiles_setup {
|
||||||
git="$HOME/git"
|
git="$HOME/git"
|
||||||
mkdir -p "$bin" "$projects" "$git" && echo "Created dirs $bin, $projects, $git"
|
mkdir -p "$bin" "$projects" "$git" && echo "Created dirs $bin, $projects, $git"
|
||||||
|
|
||||||
# Install packages
|
|
||||||
# zsh
|
|
||||||
# grc: generic colourizer, colors output of any command
|
|
||||||
# ccze: similar to the above
|
|
||||||
# byobu: configuration/wrapper for tmux
|
|
||||||
# bmon: bandwidth monitor, monitors bandwith usage, shows graph
|
|
||||||
# mtr: mytraceroute, traceroute tool
|
|
||||||
# pv: pipe view, monitor the progress of data through a pipe
|
|
||||||
# byobu: tmux wrapper
|
|
||||||
# htop: like top, but bettah
|
|
||||||
packages="zsh git grc ccze bmon mtr pv tmux byobu htop"
|
|
||||||
|
|
||||||
# Check if running as root, if try using sudo to install packages.
|
# Check if running as root, if try using sudo to install packages.
|
||||||
# If sudo is not installed, launch a shell to try and install it
|
# If sudo is not installed, launch a shell to try and install it
|
||||||
if [[ $(id -u) != 0 ]]; then
|
if [[ $(id -u) != 0 ]]; then
|
||||||
|
@ -182,83 +160,59 @@ function brethil_dotfiles_setup {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(which apt-get ) ]]; then
|
if [[ $(which apt-get ) ]]; then
|
||||||
|
PACKAGES=${PACKAGES/antigen/zsh-antigen/}
|
||||||
|
antigen_path=/usr/share/zsh-antigen/antigen.zsh
|
||||||
install_command="${sudo}apt-get install"
|
install_command="${sudo}apt-get install"
|
||||||
elif [[ $(which pacman) ]]; then
|
elif [[ $(which pacman) ]]; then
|
||||||
pacman -Sy yay # also install the yay aur package managery
|
pacman -Sy yay # also install the yay aur package managery
|
||||||
packages="$packages"
|
antigen_path=/usr/share/zsh/share/antigen.zsh
|
||||||
|
grc_path=/etc/grc.zsh
|
||||||
install_command="${sudo}yay -Sy"
|
install_command="${sudo}yay -Sy"
|
||||||
elif [[ $(which yum) ]]; then
|
elif [[ $(which yum) ]]; then
|
||||||
|
antigen_path=/usr/share/zsh/share/antigen.zsh
|
||||||
install_command="${sudo}yum"
|
install_command="${sudo}yum"
|
||||||
elif [[ $(which port) ]]; then
|
|
||||||
install_command="${sudo}port install"
|
|
||||||
elif [[ $(which brew) ]]; then
|
elif [[ $(which brew) ]]; then
|
||||||
|
antigen_path=/usr/local/share/antigen/antigen.zsh
|
||||||
install_command="${sudo}brew install"
|
install_command="${sudo}brew install"
|
||||||
else
|
else
|
||||||
echo "I do not know how to install the required packages. Quitting."
|
echo "I do not know how to install the required packages. Quitting."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# actually install the packages:
|
if [[ ! -f $antigen_path ]]; then
|
||||||
$install_command $packages
|
echo "antigen.zsh not found, please set up manually in ~/.zshrc" 1>&2
|
||||||
|
exit 0
|
||||||
# Install oh-my-zsh
|
|
||||||
echo "Installing oh-my-zsh..."
|
|
||||||
sh -c "$(curl -sL zsh.dioporc.one | sed 's/env zsh/#env zsh/')" # comment the part that launches zsh
|
|
||||||
|
|
||||||
# oh-my-zsh's zshrc has been installed, prepend the dotfiles setup to it
|
|
||||||
cat "$HOME/.zshrc" >> $ZSHTMP
|
|
||||||
mv $ZSHTMP $HOME/.zshrc
|
|
||||||
|
|
||||||
# Increase history size
|
|
||||||
echo "export HISTSIZE=100000" >> $HOME/.zshrc
|
|
||||||
|
|
||||||
## Fix scrolling in byobu
|
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
|
||||||
sed -i '' 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux
|
|
||||||
else
|
|
||||||
sed -i 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove ls from the grc.zsh config:
|
# actually install the packages
|
||||||
sed 's|ls \\|#ls \\|' /etc/grc.zsh
|
$install_command $PACKAGES
|
||||||
|
|
||||||
# Set m and M to enable/disable mouse mode in tmux/byobu
|
# prepare .zshrc
|
||||||
echo 'bind-key m source $BYOBU_PREFIX/share/byobu/keybindings/mouse.tmux.enable \; display-message "Mouse: ON"' >> ~/.tmux.conf
|
exec 1>&3 # save stdout
|
||||||
echo 'bind-key M source $BYOBU_PREFIX/share/byobu/keybindings/mouse.tmux.disable \; display-message "Mouse: Off"' >> ~/.tmux.conf
|
exec 1>$HOME/.zshrc
|
||||||
|
echo "source $antigen_path"
|
||||||
## Install the rmate client for textmate
|
echo -e "\n\n# brethil's dotfiles:"
|
||||||
#install_rmate && echo "Installed rmate Textmate remote "|| echo "Failed to install rmate Textmate remote"
|
# Source antigen
|
||||||
|
echo "source $antigen_path"
|
||||||
|
echo "DOTFILES=$DOTFILES"
|
||||||
|
echo "source \$DOTFILES/brethil_dotfile.sh"
|
||||||
|
echo -e "# End of brethil's dotfiles\n\n"
|
||||||
|
|
||||||
|
fix_annoyances
|
||||||
# Install vim awesomerc (git amix/vimrc)
|
# Install vim awesomerc (git amix/vimrc)
|
||||||
install_vimrc && echo "Installed vim awesome rc" || echo "Failed to install vim awesome rc"
|
install_vimrc && echo "Installed vim awesome rc" || echo "Failed to install vim awesome rc"
|
||||||
|
setup_vim
|
||||||
# Create ssh config
|
# Create ssh config
|
||||||
create_ssh_config
|
create_ssh_config
|
||||||
# git config
|
# git config
|
||||||
setup_git
|
setup_git
|
||||||
|
|
||||||
# Install new zsh plugins in $ZSH/custom/plugins/
|
|
||||||
install_zsh_plugins && echo "Installed custom zsh plugins in $ZSH/custom/plugins/" || echo "Failed to install custom zsh plugins"
|
|
||||||
|
|
||||||
# Source the plugins defined in brethil_dotfile.sh ($plugins)
|
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
|
||||||
sed -i "" -e 's/plugins=.*/plugins=\( $plugins \)/' $HOME/.zshrc
|
|
||||||
else
|
|
||||||
sed -i -e 's/plugins=.*/plugins=\( $plugins \)/' $HOME/.zshrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Symlink brethil.zsh-theme
|
# Symlink brethil.zsh-theme
|
||||||
ln -s $DOTFILES/brethil.zsh-theme $HOME/.oh-my-zsh/custom/
|
ln -s $DOTFILES/brethil.zsh-theme $HOME/.antigen/bundles/robbyrussell/oh-my-zsh/themes/ # TODO: improve this
|
||||||
# Symlink brethil-minimal.zsh-theme
|
# Symlink brethil-minimal.zsh-theme
|
||||||
ln -s $DOTFILES/brethil-minimal.zsh-theme $HOME/.oh-my-zsh/custom/
|
ln -s $DOTFILES/brethil-minimal.zsh-theme $HOME/.antigen/bundles/robbyrussell/oh-my-zsh/themes/
|
||||||
|
|
||||||
# Set brethil theme
|
# TODO: powerline?
|
||||||
if [[ $(uname) == "Darwin" ]]; then # MacOS has a different syntax for sed
|
|
||||||
sed -i '' 's/ZSH_THEME=".*"/ZSH_THEME="brethil"/' $HOME/.zshrc
|
|
||||||
else
|
|
||||||
sed -i 's/ZSH_THEME=".*"/ZSH_THEME="brethil"/' $HOME/.zshrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
#TODO: replace brethil theme with powerline?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user