-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-post.sh
91 lines (62 loc) · 2.44 KB
/
common-post.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
#!/usr/bin/env bash
# Packages
echo -n "Install Rustup? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
# Configuration
echo -n "Setup virt-manager for KVM? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
sudo systemctl enable --now libvirtd
sudo usermod -a -G libvirt $(whoami)
sudo virsh net-autostart default
fi
echo -n "Apply git configuration? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
echo -n "Enter your name: "
read name
echo -n "Enter your email: "
read email
git config --global user.name "$name"
git config --global user.email "$email"
git config --global init.defaultBranch main
git config --global push.autoSetupRemote true
fi
echo -n "Load fastfetch configuration? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
mkdir -p ~/.config/fastfetch
curl -o ~/.config/fastfetch/config.jsonc https://raw.githubusercontent.com/fastfetch-cli/fastfetch/dev/presets/examples/10.jsonc
fi
echo -n "Add simplified fastfetch to .bashrc? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
mkdir -p ~/.config/fastfetch/presets
curl -o ~/.config/fastfetch/presets/9.jsonc https://raw.githubusercontent.com/fastfetch-cli/fastfetch/dev/presets/examples/9.jsonc
echo -e "\nfastfetch -c ~/.config/fastfetch/presets/9.jsonc" >> ~/.bashrc
fi
echo -n "Add starship init to .bashrc? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
echo -e '\neval "$(starship init bash)"' >> ~/.bashrc
fi
echo -n "Apply Wayland & Wayland native input method flag for Brave (Native)? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
cp config/flags/electron-flags.conf ~/.config/brave-flags.conf
fi
echo -n "Apply Wayland & Wayland native input method flag for Brave (Flatpak)? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
flatpak run com.brave.Browser
echo -n "Close Brave to continue"
cp config/flags/electron-flags.conf ~/.var/app/com.brave.Browser/config/brave-flags.conf
fi
echo -n "Apply Wayland & Wayland native input method flag for vscode? [y/N]: "
read answer
if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]]; then
cp config/flags/electron-flags.conf ~/.config/code-flags.conf
fi