From 8270f6770822bca104b84179080069424669075a Mon Sep 17 00:00:00 2001 From: hxAri Date: Fri, 28 Jun 2024 15:58:59 +0700 Subject: [PATCH 1/2] [FEATURE] Implement Void distro linux CLI and Desktop Environment mode --- penguin | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/penguin b/penguin index 68bd61a..3651abb 100755 --- a/penguin +++ b/penguin @@ -3051,7 +3051,117 @@ function distroConfig() { fi sleep 2.4 ;; - void) ;; + void) + + echo "$(stdio stdout $distro removing /:etc/resolv.conf)" + rm -rf $source/$folder/etc/resolv.conf + if [[ $? -ne 0 ]]; then + echo "$(stdio stderr remove $folder/etc/resolv.conf)" + inputRemove= + readline "skip" "remove" "Y" + if [[ ${inputSkip,,} == "n" ]]; then + echo -e "$(stdio stderr remove aborted)\n" + exit 1 + fi + fi + + echo "$(stdio stdout $distro creating /:etc/resolf.conf)" + echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4\nnameserver 192.168.1.1\nnameserver 127.0.0.1" > $source/$folder/etc/resolv.conf + if [[ $? -ne 0 ]]; then + echo "$(stdio stderr create $folder/etc/resolv.conf)" + inputRemove= + readline "skip" "create" "Y" + if [[ ${inputSkip,,} == "n" ]]; then + echo -e "$(stdio stderr create aborted)\n" + exit 1 + fi + fi + + case ${select,,} in + cli) + ;; + desktop) + case ${desktop^^} in + LXDE) + local rinku=( + "https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/LXDE" + "lxde_de.sh" + ) + ;; + LXQT) + local rinku=( + "https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/LXQT" + "lxqt_de.sh" + ) + ;; + XFCE) + local rinku=( + "https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/XFCE4" + "xfce4_de.sh" + ) + ;; + esac + + echo "$(stdio stdout $distro removing /:root/.bash_profile)" + rm -rf $source/$folder/root/.bash_profile + + echo "$(stdio stdout $distro creating /:root/.bash_profile)" + cat <<- EOF > $source/$folder/root/.bash_profile + #!/usr/bin/env bash + + # Installing required packages. + xbps-install -u xbps -y + xbps-install -Su -y > /dev/null + xbps-install -S ${desktop,,} tigervnc wget sudo -y + + clear + + if [[ ! -f ~/${desktop}.sh ]]; then + echo -e "$(stdio stdout $distro downloading ${desktop}.sh)" + wget --tries=20 ${rinku[0]}/${rinku[1]}.sh -O ~/${desktop}.sh + fi + bash ~/${desktop}.sh + clear + + if [[ ! -f /usr/local/bin/vncserver-start ]]; then + echo -e "$(stdio stdout $distro downloading /usr/bin/local/vncserver-start)" + wget --tries=20 ${rinku[2]}/vncserver-start -O /usr/local/bin/vncserver-start + + echo -e "$(stdio stdout $distro chmod+x /usr/local/bin/vncserver-start)" + chmod +x /usr/local/bin/vncserver-start + + echo -e "$(stdio stdout $distro downloading /usr/local/bin/vncserver-stop)" + wget --tries=20 ${rinku[2]}/vncserver-stop -O /usr/local/bin/vncserver-stop + + echo -e "$(stdio stdout $distro chmod+x /usr/local/bin/vncserver-stop)" + chmod +x /usr/local/bin/vncserver-stop + fi + clear + + if [[ ! -f /usr/bin/vncserver ]]; then + xbps-install -S lxde tigervnc wget -y > /dev/null + fi + clear + + echo -e "$(stdio stdout $distro removing ${desktop}.sh)" + rm -rf ~/${desktop}.sh + + echo -e "$(stdio stdout $distro removing .bash_profile)" + rm -rf ~/.bash_profile + + # Displaying screenfetch. + clear && screenfetch -A "Ubuntu" && echo + sleep 2.4 + EOF + + echo "$(stdio stdout $distro chmod+x /:root/.bash_profile)" + chmod +x $source/$folder/root/.bash_profile + ;; + window) + # .... + ;; + esac + ;; *) echo -e "$(stdio stderr unknown distro $distro)\n" exit 1 From 02f9fafc5b964cc43581d3c2ac61cc1df541637e Mon Sep 17 00:00:00 2001 From: hxAri Date: Fri, 28 Jun 2024 16:21:49 +0700 Subject: [PATCH 2/2] [FEATURE] Implement Void distro Window Manager mode and fix bugs --- penguin | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/penguin b/penguin index 3651abb..da57699 100755 --- a/penguin +++ b/penguin @@ -3112,7 +3112,7 @@ function distroConfig() { # Installing required packages. xbps-install -u xbps -y xbps-install -Su -y > /dev/null - xbps-install -S ${desktop,,} tigervnc wget sudo -y + xbps-install -S ${desktop,,} tigervnc wget screenfetch sudo -y clear @@ -3150,7 +3150,7 @@ function distroConfig() { rm -rf ~/.bash_profile # Displaying screenfetch. - clear && screenfetch -A "Ubuntu" && echo + clear && screenfetch -A "Void" && echo sleep 2.4 EOF @@ -3158,9 +3158,67 @@ function distroConfig() { chmod +x $source/$folder/root/.bash_profile ;; window) - # .... + + declare -A rinku=( + [1]="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS" + [2]="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/WM/XBPS" + ) + + echo "$(stdio stdout $distro downloading /:root/${window}.sh)" + wget -q --tries=20 ${rinku[2]}/${window}.sh --show-progress --progress=bar:force:noscroll -O $source/$folder/root/${window}.sh + if [[ $? -ne 0 ]]; then + echo "$(stdio stderr $distro download /:root/${window}.sh)" + inputSkip= + readline "download" "skip" "Y" + if [[ ${inputSkip,,} == "n" ]]; then + echo -e "$(stdio stderr $distro download aborted)\n" + exit 1 + fi + else + echo "$(stdio stdout $distro chmod+x /:root/${window}.sh)" + chmod +x $source/$folder/root/${window}.sh + fi + + echo "$(stdio stdout $distro removing /:root/.bash_profile)" + rm -rf $source/$folder/root/.bash_profile + + echo "$(stdio stdout $distro creating /:root/.bash_profile)" + cat <<- EOF > $source/$folder/root/.bash_profile + #!/usr/bin/env bash + + # Installing required packages. + xbps-install -u xbps -y + xbps-install -Su -y > /dev/null + xbps-install -S lxde tigervnc wget screenfetch sudo -y + + if [[ ! -f ~/${window}.sh ]]; then + echo -e "$(stdio stdout $distro downloading ${window}.sh)" + wget --tries=20 ${rinku[2]}/${window}.sh -O ~/${window}.sh + fi + bash ~/${window}.sh + clear + + if [[ ! -f /usr/bin/vncserver ]]; then + xbps-install -S ${window,,} tigervnc wget -y > /dev/null + fi + clear + + echo -e "$(stdio stout $distro removing ${window}.sh)" + rm -rf ~/${window}.sh + + echo -e "$(stdio stout $distro removing .bash_profile)" + rm -rf ~/.bash_profile + + # Displaying screenfetch. + clear && screenfetch -A "Void" && echo + sleep 2.4 + EOF + + echo "$(stdio stdout $distro chmod+x /:root/.bash_profile)" + chmod +x $source/$folder/root/.bash_profile ;; esac + sleep 2.4 ;; *) echo -e "$(stdio stderr unknown distro $distro)\n"