-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.sh
executable file
·99 lines (67 loc) · 2.89 KB
/
INSTALL.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
#
# _____ __ ___ __ __
# | \.-----.| |_.' _|__| |.-----.-----.
# | -- | _ || _| _| | || -__|__ --|
# |_____/|_____||____|__| |__|__||_____|_____|
#
# Script to setup my dotfiles
# Author: Nepo26
# url: https://github.com/Nepo26/dotfiles
# TODO Check Distribution
# TODO Check if package console-data is installed.
# TODO Check available keyboard maps and select one
#################### --------------- Default Variables --------------- ####################
DOTFILES_LOCATION=$(pwd)
TMUX_CONF=".tmux.conf"
VIM_CONF=".vimrc"
EXTRA_VIM_CONF=".vimrc-extra"
ZSH_CONF=".zshrc"
DEPENDENCIES=(
colorscript
starship
fzf
zsh
bat
krew
kubectl
lsd
nvim
)
#################### --------------- Source Scripts and Utils --------------- ####################
### Utils
source $DOTFILES_LOCATION/support-scripts/utils/fun_log.sh
source $DOTFILES_LOCATION/support-scripts/utils/check_args.sh
source $DOTFILES_LOCATION/support-scripts/utils/copy_folder_to.sh
### Scripts
source $DOTFILES_LOCATION/support-scripts/installFonts.sh
#################### --------------- Link Dotfiles Location to general default locations --------------- ####################
fun_log "Copying tmux conf"
cp "$DOTFILES_LOCATION/home/$TMUX_CONF" ~/$TMUX_CONF
fun_log "Copying vim conf"
cp "$DOTFILES_LOCATION/home/$VIM_CONF" ~/$VIM_CONF
fun_log "Copying zsh conf"
cp "$DOTFILES_LOCATION/home/$ZSH_CONF" ~/$ZSH_CONF
fun_log "Copying Starship conf"
cp "$DOTFILES_LOCATION/config/starship/starship.toml" ~/.config/starship.toml
#fun_log "Copying Nvim init.lua"
#mkdir -p ~/.config/nvim
#cp "$DOTFILES_LOCATION/config/nvim/init.lua" ~/.config/nvim/init.lua
mv ~/.config/nvim ~/.config/nvim.bak
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
# Add extra config besides the default template on VIM
cat "$DOTFILES_LOCATION/home/$EXTRA_VIM_CONF" >> ~/$VIM_CONF
#################### --------------- Copying MISC Files --------------- ####################
# Binaries
fun_log "Installing builtin binaries"
copy_folder_to $DOTFILES_LOCATION/misc/bin ~/.local/bin
# AsciiArt for colorscript
copy_folder_to $DOTFILES_LOCATION/misc/asciiart ~/.local/share/asciiart
#################### --------------- Install Fonts --------------- ####################
install_fonts_from_folder $DOTFILES_LOCATION/misc/fonts
# INSTALL ZSH PLUGINS
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/joshskidmore/zsh-fzf-history-search ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-fzf-history-search