summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-07-21 11:51:46 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-07-21 11:51:46 +0900
commitd0da2874a22fa71b1cd4800fd89fd0b344a23a85 (patch)
tree9f6b8bb81b074aca0d15063007916b2142fd5985
parentbba121dab93a214e45a009aaca3655c804caddc4 (diff)
Init
-rwxr-xr-xpublic/thesiah.sh48
-rwxr-xr-xstatic/thesiah.sh48
2 files changed, 46 insertions, 50 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh
index 80ccb33..9f3a858 100755
--- a/public/thesiah.sh
+++ b/public/thesiah.sh
@@ -440,14 +440,6 @@ sambasetup() {
esac
}
-bbswitchsetup() {
- whiptail --infobox "Setting up bbswitch..." 7 50
- pacman -Qq bbswitch >/dev/null 2>&1 || installpkg bbswitch
- sleep 1
- echo "bbswitch" > /etc/modules-load.d/bbswitch.conf >/dev/null 2>&1
- echo "options bbswitch load_state=0 unload_state=1" > /etc/modprobe.d/bbswitch.conf >/dev/null 2>&1
-}
-
bluezsetup() {
whiptail --infobox "Setting up bluetooth..." 7 50
pacman -Qq bluez >/dev/null 2>&1 || installpkg bluez
@@ -534,6 +526,14 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf
tlp start >/dev/null 2>&1
}
+bbswitchsetup() {
+ whiptail --infobox "Setting up bbswitch..." 7 50
+ pacman -Qq bbswitch >/dev/null 2>&1 || installpkg bbswitch
+ sleep 1
+ echo "bbswitch" > /etc/modules-load.d/bbswitch.conf >/dev/null 2>&1
+ echo "options bbswitch load_state=0 unload_state=1" > /etc/modprobe.d/bbswitch.conf >/dev/null 2>&1
+}
+
sshsetup() {
whiptail --infobox "Setting up ssh..." 7 50
[ -x "$(command -v "ssh")" ] || installpkg openssh
@@ -580,6 +580,17 @@ LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/nul
sv start elogind >/dev/null 2>&1 || sv force-restart elogind >/dev/null 2>&1
}
+microsetup() {
+ microinfo=$(lspci | grep -E "VGA|Display")
+ if echo "$microinfo" | grep -qi "Intel"; then
+ installpkg xf86-video-intel
+ installpkg intel-ucode
+ elif echo "$microinfo" | grep -qi "AMD"; then
+ installpkg xf86-video-amdgpu
+ installpkg amd-ucode
+ fi
+}
+
dashsetup() {
whiptail --infobox "Setting shell to dash..." 7 50
[ -x "$(command -v "dash")" ] || installpkg dash
@@ -598,17 +609,6 @@ Depends = dash' > /usr/share/libalpm/hooks/relinking-dash.hook
ln -sfT dash /usr/bin/sh
}
-microsetup() {
- microinfo=$(lspci | grep -E "VGA|Display")
- if echo "$microinfo" | grep -qi "Intel"; then
- installpkg xf86-video-intel
- installpkg intel-ucode
- elif echo "$microinfo" | grep -qi "AMD"; then
- installpkg xf86-video-amdgpu
- installpkg amd-ucode
- fi
-}
-
finalize() {
unset pass1 pass2
unset epass1 epass2
@@ -767,18 +767,12 @@ ufwsetup
# Set up samba
sambasetup
-# Set up bbswitch
-bbswitchsetup
-
# Set up bluez
bluezsetup
# Set up cronjob
cronsetup
-# Set up tlp
-tlpsetup
-
# Set up ssh
sshsetup
@@ -799,6 +793,10 @@ librewolfsetup || error "Failed to set up librewolf."
putgitrepo "$passwordrepo" "/home/$name/.local/share" "$repobranch"
putgitrepo "$obsidianrepo" "/home/$name" "$repobranch"
putgitrepo "$webrepo" "/home/$name" "$repobranch"
+ # Set up tlp
+ tlpsetup
+ # Set up bbswitch
+ bbswitchsetup
}
# Make grub fast
diff --git a/static/thesiah.sh b/static/thesiah.sh
index 80ccb33..9f3a858 100755
--- a/static/thesiah.sh
+++ b/static/thesiah.sh
@@ -440,14 +440,6 @@ sambasetup() {
esac
}
-bbswitchsetup() {
- whiptail --infobox "Setting up bbswitch..." 7 50
- pacman -Qq bbswitch >/dev/null 2>&1 || installpkg bbswitch
- sleep 1
- echo "bbswitch" > /etc/modules-load.d/bbswitch.conf >/dev/null 2>&1
- echo "options bbswitch load_state=0 unload_state=1" > /etc/modprobe.d/bbswitch.conf >/dev/null 2>&1
-}
-
bluezsetup() {
whiptail --infobox "Setting up bluetooth..." 7 50
pacman -Qq bluez >/dev/null 2>&1 || installpkg bluez
@@ -534,6 +526,14 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf
tlp start >/dev/null 2>&1
}
+bbswitchsetup() {
+ whiptail --infobox "Setting up bbswitch..." 7 50
+ pacman -Qq bbswitch >/dev/null 2>&1 || installpkg bbswitch
+ sleep 1
+ echo "bbswitch" > /etc/modules-load.d/bbswitch.conf >/dev/null 2>&1
+ echo "options bbswitch load_state=0 unload_state=1" > /etc/modprobe.d/bbswitch.conf >/dev/null 2>&1
+}
+
sshsetup() {
whiptail --infobox "Setting up ssh..." 7 50
[ -x "$(command -v "ssh")" ] || installpkg openssh
@@ -580,6 +580,17 @@ LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/nul
sv start elogind >/dev/null 2>&1 || sv force-restart elogind >/dev/null 2>&1
}
+microsetup() {
+ microinfo=$(lspci | grep -E "VGA|Display")
+ if echo "$microinfo" | grep -qi "Intel"; then
+ installpkg xf86-video-intel
+ installpkg intel-ucode
+ elif echo "$microinfo" | grep -qi "AMD"; then
+ installpkg xf86-video-amdgpu
+ installpkg amd-ucode
+ fi
+}
+
dashsetup() {
whiptail --infobox "Setting shell to dash..." 7 50
[ -x "$(command -v "dash")" ] || installpkg dash
@@ -598,17 +609,6 @@ Depends = dash' > /usr/share/libalpm/hooks/relinking-dash.hook
ln -sfT dash /usr/bin/sh
}
-microsetup() {
- microinfo=$(lspci | grep -E "VGA|Display")
- if echo "$microinfo" | grep -qi "Intel"; then
- installpkg xf86-video-intel
- installpkg intel-ucode
- elif echo "$microinfo" | grep -qi "AMD"; then
- installpkg xf86-video-amdgpu
- installpkg amd-ucode
- fi
-}
-
finalize() {
unset pass1 pass2
unset epass1 epass2
@@ -767,18 +767,12 @@ ufwsetup
# Set up samba
sambasetup
-# Set up bbswitch
-bbswitchsetup
-
# Set up bluez
bluezsetup
# Set up cronjob
cronsetup
-# Set up tlp
-tlpsetup
-
# Set up ssh
sshsetup
@@ -799,6 +793,10 @@ librewolfsetup || error "Failed to set up librewolf."
putgitrepo "$passwordrepo" "/home/$name/.local/share" "$repobranch"
putgitrepo "$obsidianrepo" "/home/$name" "$repobranch"
putgitrepo "$webrepo" "/home/$name" "$repobranch"
+ # Set up tlp
+ tlpsetup
+ # Set up bbswitch
+ bbswitchsetup
}
# Make grub fast