mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-10 02:05:16 +03:00
Clean commit tree
This commit is contained in:
commit
4508ba6353
15
README.md
Normal file
15
README.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# ivabus-dotfiles
|
||||||
|
|
||||||
|
## Default dotfiles installation
|
||||||
|
|
||||||
|
- zshrc (oh-my-zsh + autosuggestion + syntax highlighting) ([oh-my-zsh](https://ohmyz.sh) + [zsh-users/zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions/) + [zsh-users/zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting))
|
||||||
|
- [ivabus-zsh-theme](https://github.com/ivabus/ivabus-zsh-theme)
|
||||||
|
- nvim config
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sh -c "$(curl -fsSL https://ivabus.dev/dotfiles)"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Upgrading dotfiles
|
||||||
|
|
||||||
|
Just run `upgrade_dotfiles` in your shell. Script will `git pull`, then relink old dotfiles, link new if needed and upgrade oh-my-zsh.
|
9
init
Normal file
9
init
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! command -v git &> /dev/null
|
||||||
|
then
|
||||||
|
echo "git should be installed"
|
||||||
|
exit 255
|
||||||
|
fi
|
||||||
|
git clone https://github.com/ivabus/ivabus-dotfiles $HOME/.dotfiles
|
||||||
|
sh $HOME/.dotfiles/tools/install.sh
|
17
nvim.vim
Normal file
17
nvim.vim
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
filetype plugin indent on
|
||||||
|
set showmatch
|
||||||
|
set hlsearch
|
||||||
|
set incsearch
|
||||||
|
set autoindent
|
||||||
|
set noexpandtab
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set number
|
||||||
|
set wildmode=longest, list
|
||||||
|
set cc=80
|
||||||
|
syntax on
|
||||||
|
set noswapfile
|
||||||
|
set backupdir=~/.cache/vim
|
||||||
|
set completeopt=noinsert,menuone,noselect
|
||||||
|
set cursorline
|
||||||
|
set relativenumber
|
35
tools/install.sh
Normal file
35
tools/install.sh
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
CURRENTDIR="$(pwd)"
|
||||||
|
GREEN="\033[32m"
|
||||||
|
RED="\033[31m"
|
||||||
|
DEFAULTC="\033[0m"
|
||||||
|
|
||||||
|
echo "${GREEN}Welcome to ivabus .dotfiles installer$DEFAULT"
|
||||||
|
echo "Dotfiles will be installed to $HOME/.dotfiles"
|
||||||
|
echo "Press enter to continue"
|
||||||
|
read A
|
||||||
|
|
||||||
|
# check for zsh
|
||||||
|
|
||||||
|
if ! command -v zsh > /dev/null
|
||||||
|
then
|
||||||
|
echo "zsh is not installed"
|
||||||
|
echo "${RED}Aborting.$DEFAULTC"
|
||||||
|
exit 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install oh-my-zsh and plugins
|
||||||
|
|
||||||
|
ZSH="$HOME/.dotfiles/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.dotfiles/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.dotfiles/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.dotfiles/oh-my-zsh/custom/plugins/zsh-autosuggestions > /dev/null
|
||||||
|
|
||||||
|
# linking dotfiles to their original locations
|
||||||
|
|
||||||
|
sh $HOME/.dotfiles/tools/relink.sh
|
||||||
|
|
||||||
|
cd $CURRENTDIR
|
||||||
|
|
||||||
|
echo "${GREEN}Dotfiles installed and linked.$DEFAULTC"
|
14
tools/relink.sh
Normal file
14
tools/relink.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# script that (re)links all dotfiles during the installation or upgrade.
|
||||||
|
# do not run manually
|
||||||
|
|
||||||
|
GREEN="\033[32m"
|
||||||
|
DEFAULTC="\033[0m"
|
||||||
|
|
||||||
|
mkdir -p $HOME/.config/nvim >/dev/null 2>&1
|
||||||
|
rm $HOME/.zshrc $HOME/.config/nvim/init.vim >/dev/null 2>&1
|
||||||
|
ln -s $HOME/.dotfiles/zshrc $HOME/.zshrc
|
||||||
|
echo "${GREEN}.zshrc linked: $DEFAULTC$HOME/.dotfiles/zshrc $GREEN-> $DEFAULTC$HOME/.zshrc"
|
||||||
|
ln -s $HOME/.dotfiles/nvim.vim $HOME/.config/nvim/init.vim
|
||||||
|
echo "${GREEN}neovim config linked: $DEFAULTC$HOME/.dotfiles/nvim.vim $GREEN-> $DEFAULTC$HOME/.config/nvim/init.vim"
|
16
tools/upgrade.sh
Normal file
16
tools/upgrade.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Dotfiles upgrade script that just pulls new dotfiles from repo
|
||||||
|
# oh-my-zsh update included!
|
||||||
|
|
||||||
|
CURRENTDIR="$(pwd)"
|
||||||
|
GREEN="\033[32m"
|
||||||
|
DEFAULTC="\033[0m"
|
||||||
|
|
||||||
|
cd $HOME/.dotfiles
|
||||||
|
echo "${GREEN}Upgrading dotfiles$DEFAULTC"
|
||||||
|
git pull
|
||||||
|
sh tools/relink.sh
|
||||||
|
echo "${GREEN}Upgrading oh-my-zsh$DEFAULTC"
|
||||||
|
zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null
|
||||||
|
cd $CURRENTDIR
|
Loading…
Reference in a new issue