Dateien nach "wlin003_GamingPC/script" hochladen
This commit is contained in:
parent
2e48dd04a4
commit
6e53eed602
|
@ -0,0 +1,64 @@
|
|||
#!/run/current-system/sw/bin/sh
|
||||
# Tolga Erok
|
||||
|
||||
# Reload the sysctl Configuration
|
||||
# doas sysctl --system
|
||||
|
||||
# Set PATH to include the necessary command directories
|
||||
export PATH="/run/current-system/sw/bin:$PATH"
|
||||
|
||||
# Fetch RAM information
|
||||
RAM_INSTALLED=$(free -h | awk '/^Mem/ {print $2}')
|
||||
RAM_USED=$(free -h | awk '/^Mem/ {print $3}')
|
||||
|
||||
# Fetch and filter tmpfs information from df, including device information
|
||||
# TMPFS_USED=$(df -h | awk '/tmpfs/ {print $1 "\t" $3 "\t" $5}' | column -t)
|
||||
TMPFS_USED=$(df -h)
|
||||
|
||||
# Fetch zramswap information
|
||||
ZRAMSWAP_USED=$(zramctl | grep /dev/zram0 | awk '{print $4}')
|
||||
|
||||
# Fetch earlyoom information
|
||||
EARLYOOM_USED=$(pgrep earlyoom &>/dev/null && echo -e "\e[32mRunning\e[34m" || echo -e "\e[31mNot Running\e[34m")
|
||||
|
||||
# Check if the service is active
|
||||
if systemctl --quiet is-active configure-flathub-repo.service; then
|
||||
FLATHUB_ACTIVE="\e[32mActive\e[0m"
|
||||
else
|
||||
FLATHUB_ACTIVE="\e[33mInactive\e[0m"
|
||||
fi
|
||||
|
||||
# Check if the service is enabled (loaded)
|
||||
if systemctl is-enabled configure-flathub-repo.service; then
|
||||
FLATHUB_LOADED="\e[32mLoaded\e[0m"
|
||||
else
|
||||
FLATHUB_LOADED="\e[33mNot Loaded\e[0m"
|
||||
fi
|
||||
|
||||
#if flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo; then
|
||||
# echo -e "\e[34m[\e[32m✔\e[34m] Flathub repo added and configured successfully \e[32m¯\_(ツ)_/¯\e[0m\n "
|
||||
#else
|
||||
# echo -e "\e[34m[\e[31m✘\e[34m] \e[31mError:\e[34m Failed to configure Flathub repo \e[31m¯\_(ツ)_/¯\e[0m\n"
|
||||
#fi
|
||||
|
||||
stdbuf -o0 printf ""
|
||||
echo -e "\e[1;32m[✔]\e[0m Restarting kernel tweaks...\n"
|
||||
sleep 1
|
||||
sudo sysctl --system
|
||||
sleep 1
|
||||
|
||||
# Print descriptions in yellow and results in blue
|
||||
printf "\n\e[33mRAM Installed:\e[0m %s\n" "$RAM_INSTALLED"
|
||||
printf "\e[33mRAM Used:\e[0m %s\n" " $RAM_USED"
|
||||
printf "\n\e[33mDisk space and TMPS Used:\e[0m\n%s\n" "$TMPFS_USED"
|
||||
printf "\n\e[33mZRAMSWAP Used:\e[0m %s\n" " $ZRAMSWAP_USED"
|
||||
printf "\e[33mEarlyoom Status:\e[0m %s\n" "$EARLYOOM_USED"
|
||||
echo -e "\nFlathub Service Status: $FLATHUB_ACTIVE / $FLATHUB_LOADED"
|
||||
|
||||
lfs
|
||||
duf
|
||||
figlet system updated
|
||||
# espeak -v en+m7 -s 165 "system! up! dated! kernel! tweaks! applied!" --punct="," 2>/dev/null
|
||||
|
||||
sleep 30
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
################################################################################
|
||||
#
|
||||
#
|
||||
# post-installation script for Linux
|
||||
#
|
||||
#
|
||||
#
|
||||
################################################################################
|
||||
|
||||
while :
|
||||
do
|
||||
clear
|
||||
echo ""
|
||||
echo "\033[1m I N S T A L L Flatpack on NixOS "
|
||||
echo " ----------------------------------------"
|
||||
echo "\033[0m"
|
||||
echo "01.Setup Flatpack Themes"
|
||||
echo "02.Install Flatseal"
|
||||
echo "03.Install Flatsweep"
|
||||
echo "04.Install Lutris"
|
||||
echo "05.Instal Heroic Games Launcher"
|
||||
echo ""
|
||||
echo " x. Exit"
|
||||
echo ""
|
||||
echo -n " Please enter option [01 - 05]"
|
||||
read opt
|
||||
case $opt in
|
||||
##################################################################################
|
||||
01) echo "************ Setup Flatpack Themes **********************";
|
||||
##################################################################################
|
||||
mkdir ~/.themes
|
||||
cp -R /run/current-system/sw/share/themes/Arc-Dark ~/.themes/
|
||||
cp -R /run/current-system/sw/share/icons/Papirus-Dark ~/.icons
|
||||
sudo flatpak override --filesystem=$HOME/.themes
|
||||
sudo flatpak override --env=GTK_THEME=Arc-Dark
|
||||
;;
|
||||
|
||||
##################################################################################
|
||||
02) echo "************ Install Flatseal ****************";
|
||||
##################################################################################
|
||||
flatpak install -y flathub com.github.tchx84.Flatseal
|
||||
;;
|
||||
|
||||
##################################################################################
|
||||
03) echo "************ Install Flatsweep *****************";
|
||||
##################################################################################
|
||||
flatpak install -y flathub io.github.giantpinkrobots.flatsweep
|
||||
;;
|
||||
|
||||
##################################################################################
|
||||
04) echo "************ Install Lutris ******************";
|
||||
##################################################################################
|
||||
flatpak install -y flathub net.lutris.Lutris
|
||||
;;
|
||||
|
||||
##################################################################################
|
||||
05) echo "************ Install Heroic Games Launcher **************************";
|
||||
##################################################################################
|
||||
flatpak install -y flathub com.heroicgameslauncher.hgl
|
||||
;;
|
||||
|
||||
x) echo "";
|
||||
exit 1;;
|
||||
*) echo " Press [enter] key to continue. . .";
|
||||
read enterKey;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue