-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·107 lines (92 loc) · 3.27 KB
/
setup
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
99
100
101
102
103
104
105
106
107
#!/bin/bash
# The follwoing will attempt to install all needed packages to run dwm
# This is a quick and dirty script there are no error checking
# This script is meant to run on a clean fresh system
#
# Below is a list of the packages that would be installed
#
# # install yay
# nmcli dev wifi list
# nmcli dev wifi connect "essid" password "*******"
# cd /opt
# sudo git clone https://aur.archlinux.org/yay-git.git
# sudo chmod -R user:user yay-git
# cd yay-git
# makepkg -si
#### Check for yay ####
ISYAY=/sbin/yay
if [ -f "$ISYAY" ]; then
echo -e "yay was located, moving on.\n"
yay -Suy
else
echo -e "yay was not located, please install yay. Exiting script.\n"
exit
fi
### Disable wifi powersave mode ###
read -n1 -rep 'Would you like to disable wifi powersave? (y,n)' WIFI
if [[ $WIFI == "Y" || $WIFI == "y" ]]; then
LOC="/etc/NetworkManager/conf.d/wifi-powersave.conf"
echo -e "The following has been added to $LOC.\n"
echo -e "[connection]\nwifi.powersave = 2" | sudo tee -a $LOC
echo -e "\n"
echo -e "Restarting NetworkManager service...\n"
sudo systemctl restart NetworkManager
sleep 3
fi
### Install all of the above pacakges ####
read -n1 -rep 'Would you like to install the packages? (y,n)' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
sudo pacman -Syu base-devel xorg-xinit xorg-server libx11 libxinerama libxft webkit2gtk
yay -Syu rustup rustc
rustup default nightly
cargo install kanata
yay -Syu --noconfirm eza vim starship zoxide z firefox ttf-nerd-fonts-symbols* ttf-maple ttf-iosevka-nerd \
zsh git neovim zellij picom rofi joshuto alacritty fzf flameshot superfile \
youtube-dl mpv lazygit ly xdg-utils wireless_tools gum \
glow bat npm yarn unzip fd acpi toipe feh neofetch btop \
pass ripgrep docker docker-compose brightnessctl bluez bluez-utils \
python3 python3-pip xclip nb bob tlp tlp-rdw
# brew install gh planetscale/tap/pscale
# Start the bluetooth service
echo -e "Starting the Bluetooth Service...\n"
sudo systemctl enable --now bluetooth.service
sleep 2
# Clean out other portals
echo -e "Cleaning out conflicting xdg portals...\n"
yay -R --noconfirm xdg-desktop-portal-gnome xdg-desktop-portal-gtk
fi
### Copy Config Files ###
read -n1 -rep 'Would you like to copy config files? (y,n)' CFG
if [[ $CFG == "Y" || $CFG == "y" ]]; then
echo -e "Copying config files...\n"
cp -R dwm ~/.config/
cp -R alacritty ~/.config/
cp -R nvim ~/.config/
cp -R zellij ~/.config/
cp -R lazygit ~/.config/
cp -R zsh ~/.config/
cp -R picom ~/.config/
cp -R rofi ~/.config/
cp -R starship ~/.config/
# cp -R .z* ~/
fi
### pwd migration ###
#### old machine ####
pass-push
mkdir ~/exported-keys
cd ~/exported-keys
gpg-pub-out # gpg --output public.pgp --armor --export devpheon@gmail.com
gpg-pvt-out # gpg --output private.pgp --armor --export-secret-key devpheon@gmail.com
#### new machine ####
gh repo clone Pheon-Dev/pwd-store .password-store
#### copy exported keys directory from old machine ####
cp -r /mnt/path/exported-keys ~/
cd ~/exported-keys
gpg-pvt-import # gpg --import private.pgp
gpg-pub-import # gpg --import public.pgp
Create a file /etc/X11/xorg.conf.d/30-touchpad.conf that contains this:
Section "InputClass"
Identifier "touchpad catchall"
Driver "libinput"
Option "Tapping" "on"
EndSection