Skip to content

Commit

Permalink
Merge pull request #5 from gotenksIN/arch-rebase
Browse files Browse the repository at this point in the history
arch: rewrite all scripts
  • Loading branch information
gotenksIN committed Oct 1, 2021
2 parents 0263d7a + d2c3e07 commit 8934ea3
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 42 deletions.
1 change: 1 addition & 0 deletions arch/alias
Expand Up @@ -5,3 +5,4 @@ alias list='yay -Qs'
alias update='yay -Syy'
alias upgrade='yay -Syyu'
alias cat='bat --style=grid,header --theme="zenburn"'
alias wget='wget2'
13 changes: 0 additions & 13 deletions arch/functions_arch

This file was deleted.

7 changes: 3 additions & 4 deletions arch/install_cinnamon.sh
@@ -1,22 +1,21 @@
#!/usr/bin/env bash

# Install all packages required for cinnamon to work nicely
sudo pacman -Sy xorg-server cinnamon gnome-terminal gnome-screenshot lightdm lightdm-slick-greeter eog nemo-fileroller gedit evince
yay -Sy xorg-server cinnamon gnome-terminal-transparency gnome-screenshot lightdm lightdm-slick-greeter nemo-fileroller gnome-keyring pipewire pipewire-pulse papirus-icon-theme arc-gtk-theme
sudo localectl set-locale LANG=en_US.UTF-8
sudo locale-gen

# Setup lightdm along with slick-greeter plus necessary configs
sudo sed -i "s/#greeter-session=example-gtk-gnome/greeter-session=lightdm-slick-greeter/" /etc/lightdm/lightdm.conf

# Install packages related to bluetooth if needed
echo "Do you have any bluetooth adaptors installed? [y/n]: "
read -r -n1 input
read -e -p "Do you have any bluetooth adaptors installed? [y/n]: " input
if [[ "$input" =~ ^[Yy]$ ]]; then
sudo pacman -Sy bluez bluez-utils blueman
sudo systemctl enable bluetooth.service
fi

# Enable some services for convenience
sudo systemctl enable lightdm.service
sudo systemctl enable NetworkManager.service
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl enable lightdm.service
28 changes: 28 additions & 0 deletions arch/install_efistub.sh
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

read -e -p "Enter your boot disk device (e.g. /dev/sda): " -i "/dev/sda" disk
read -e -p "Enter partition number for your boot partition (e.g. if your /boot is in /dev/sda1, enter 1): " -i "1" part
read -e -p "Enter loader name (e.g. vmlinuz-linux if using `linux`): " -i "vmlinuz-linux" loader
read -e -p "Enter initrd name (e.g. initramfs-linux.img if using `linux`): " -i "initramfs-linux.img" initrd
read -e -p "Enter label for this entry (Label is what would show up in UEFI entries): " -i "rendumOS (efistub)" label

read -e -p "Do you have an Intel or AMD CPU? (Y/n): " input
if [[ "$input" =~ ^[Yy]$ ]]; then
read -e -p "Enter 1 for Intel and 2 for AMD: " cpu
if [[ "$input" =~ ^[1]$ ]]; then
sudo pacman -Sy intel-ucode
microcode="intel-ucode.img"
else
sudo pacman -Sy amd-ucode
microcode="amd-ucode.img"
fi
printf -v largs "%s " \
"root=UUID=$(findmnt -kno UUID /) rw" \
"initrd"=${microcode} "initrd=${initrd}"
else
printf -v largs "%s " \
"root=UUID=$(findmnt -kno UUID /) rw" \
"initrd=${initrd}"
fi

sudo efibootmgr -c -d "${disk}" -p "${part}" -L "${label}" -l "${loader}" -u "${largs%* } quiet splash" --verbose
29 changes: 8 additions & 21 deletions arch/install_nvidia.sh
@@ -1,27 +1,14 @@
#!/usr/bin/env bash

sudo pacman -Sy nvidia nvidia-settings
sudo pacman -Sy nvidia nvidia-utils libvdpau-va-gl

#Stuff for people with a integrated + dedicated GPU
echo "Do you have Intel integrated GPU and discrete NVIDIA GPU? [y/n]: "
read -r -n1 input
read -e -p "Do you have Intel integrated GPU and discrete NVIDIA GPU? [y/n]: " input
if [[ "$input" =~ ^[Yy]$ ]]; then
git clone https://aur.archlinux.org/optimus-manager.git
cd optimus-manager
makepkg -si
cd
yay -Sy system76-power

#Stuff for optimus-manager to work properly
sudo systemctl enable optimus-manager.service
sudo rm /etc/X11/xorg.conf /etc/X11/xorg.conf.d/90-mhwd.conf
sudo systemctl disable bumblebeed.service
sudo optimus-manager --set-startup intel

#Power saving stuff
sudo su
echo "[optimus]" > /etc/optimus-manager/optimus-manager.conf
echo "switching=none" >> /etc/optimus-manager/optimus-manager.conf
echo "pci_power_control=no" >> /etc/optimus-manager/optimus-manager.conf
echo "pci_remove=yes" >> /etc/optimus-manager/optimus-manager.conf
echo "pci_reset=yes" >> /etc/optimus-manager/optimus-manager.conf
fi
# Stuff for system76-power to work properly
sudo systemctl enable system76-power.service
sudo systemctl start system76-power.service
sudo system76-power graphics hybrid
fi
14 changes: 10 additions & 4 deletions arch/setup.sh
@@ -1,18 +1,24 @@
#!/usr/bin/env bash

sudo pacman -Sy git base-devel fortune-mod figlet zsh htop ncdu nano \
wget2 curl aria2 inetutils bat ripgrep p7zip efibootmgr

git clone https://aur.archlinux.org/yay.git --depth 1
cd yay
makepkg -si
cd ..
rm -rf yay

sudo yay -Sy fortune-mod figlet zsh htop git ncdu nano base-devel wget curl aria2 inetutils bat ripgrep p7zip ookla-speedtest-bin
yay -Sy ookla-speedtest-bin

# Guard gui dependent applications behind this
echo "Do you intend on using GUI? [y/n]: "
read -r -n1 input
read -e -p "Do you intend on using GUI? [y/n]: " input
if [[ "$input" =~ ^[Yy]$ ]]; then
yay -Sy microsoft-edge-dev-bin kotatogram-desktop-bin visual-studio-code-insiders-bin vlc steam
yay -Sy microsoft-edge-dev-bin kotatogram-desktop-bin vlc steam \
visual-studio-code-insiders-bin ttf-dejavu ttf-droid \
gnu-free-fonts ttf-liberation noto-fonts noto-fonts-cjk \
noto-fonts-emoji noto-fonts-extra ttf-ubuntu-font-family \
gsfonts qbittorrent
fi

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
Expand Down

0 comments on commit 8934ea3

Please sign in to comment.