-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfedora_personal_setup.sh
92 lines (63 loc) · 2.25 KB
/
fedora_personal_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
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#
# Shell script to automate Fedora Workstation setup for personal use.
#
echo Starting Script
sleep 1
# Functions
essential_packages()
{
# Essential packages
echo Installing essential packages
sudo dnf group install "C Development Tools and Libraries" -y
sleep 3
sudo dnf install zsh vim git neofetch nnn kitty util-linux-user kernel-devel gnome-tweaks -y
}
ohmyzsh()
{
# Oh My Zsh and Plugins
echo Installing Oh My Zsh and plugins
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
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
}
powerlevel10k()
{
# Powerlevel10k
echo Installing Powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
}
zshrc_vimrc_vimplug()
{
# Confiure .zshrc
echo Writing .zshrc
rm .zshrc ; wget https://raw.githubusercontent.com/siddlv/dotfiles/master/.zshrc
# Configure .vimrc and install vim-plug
echo Writing .vimrc and installing vim-plug
rm .vimrc ; wget https://raw.githubusercontent.com/siddlv/dotfiles/master/.vimrc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
}
kitty()
{
# Configure kitty.conf and install kitty themes
echo Installing Kitty theme and writing kitty.conf
THEME=https://raw.githubusercontent.com/dexpota/kitty-themes/master/themes/gruvbox_dark.conf
wget "$THEME" -P ~/.config/kitty/kitty-themes/themes
cd ~/.config/kitty
ln -s ./kitty-themes/themes/gruvbox_dark.conf ~/.config/kitty/theme.conf
wget https://raw.githubusercontent.com/siddlv/dotfiles/master/kitty.conf
cd
}
error()
{
# Error message
echo ERROR! Run Script Again. && exit 0
}
cleanup()
{
# Delete script, close terminal and exit
rm -r fedora_personal_setup.sh ; kill -9 $PPID ; exit 0
}
# Script
essential_packages && kitty && ohmyzsh && zshrc_vimrc_vimplug && powerlevel10k && cleanup || error