-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·78 lines (69 loc) · 2.32 KB
/
setup.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
#!/usr/bin/env sh
cd ~/.config
# install
read -p "Do you want to upgrade? (y/n): " up
if [ "$up" = "y" ] | [ "$up" = "Y" ] | [ "$up" = "" ] ; then
sudo pacman -Syyu
fi
echo
sudo pacman -S --needed git make gcc clang neovim nodejs npm zsh xclip network-manager-applet flameshot powerline-fonts otf-font-awesome light xdotool wmctrl feh awesome-terminal-fonts github-cli fzf zoxide
echo
read -p "Do you want to install the configured aurs? (y/n): " yay
if [ "$yay" = "y" ] | [ "$yay" = "Y" ] | [ "$yay" = "" ] ; then
yay -S --needed bumblebee-status ulauncher libinput-gestures
else
echo "Skipping..."
fi
echo
if [ ! -d "$HOME/.oh-my-zsh" ] ; then
echo "installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "done"
else
echo "oh-my-zsh installed! skipping..."
fi
if [ ! -d "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ] ; then
echo "installing packer for nvim"
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
echo "done"
else
echo "packer installed! skipping..."
fi
echo
read -p "Do you want to set up the configs? (y/n): " cfg
if [ "$cfg" = "y" ] | [ "$cfg" = "Y" ] | [ "$cfg" = "" ] ; then
echo "setting symlinks"
# setup links
ln -sf dotfiles_dinskid/i3
ln -sf dotfiles_dinskid/nvim
ln -sf dotfiles_dinskid/kitty
ln -sf dotfiles_dinskid/xournalpp
ln -sf dotfiles_dinskid/neofetch
ln -sf dotfiles_dinskid/libinput-gestures.conf
ln -sf dotfiles_dinskid/ulauncher
echo "additional config"
i3-msg reload
sudo gpasswd -a $USER input
sudo chmod +s /usr/bin/light
else
echo "skipping auto config"
fi
echo
read -p "Do you want to set up git? (y/n): " git
if [ "$git" = "y" ] | [ "$git" = "Y" ] | [ "$git" = "" ] ; then
git config --global user.name "Dinesh Vikram V"
git config --global user.email "[email protected]"
# ssh for git
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
read -p "Add public key to github? (y/n): " gh
if [ "$gh" = "y" ] | [ "$gh" = "Y" ] | [ "$gh" = "" ] ; then
gh auth refresh -h github.com -s admin:public_key
read -p "Enter title string for public key: " ts
gh ssh-key add ~/.ssh/id_ed25519.pub -t $ts
fi
else
echo "Skipping git setup..."
fi