Last active
June 28, 2021 20:02
-
-
Save AndeAndreas31415/bae90dfbc301c2fd4e197cb4c78fdfbe to your computer and use it in GitHub Desktop.
This script is for my the first after install termux on my Smartphone.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/data/data/com.termux/files/usr/bin/bash | |
help_fuc(){ | |
echo -e "This script is my Autoscript to automatic install this things I needed.\n | |
-c --config :Default config for my work\n | |
-ob --openbox :half_automatic Install Openbox_WM and default tools\n | |
-x4 --xfce :half_automatic Install Xfce4_DM and small default tools" | |
} | |
default_config(){ | |
# update and upgrade | |
pkg upgrade -y | |
#install programms | |
apt install openssh wget vim rsync zsh tmux termux-api -y | |
#termux settings editing | |
sed -i 's/# shortcut.create-session = ctrl + t/shortcut.create-session = ctrl + t/g' .termux/termux.properties | |
sed -i 's/# shortcut.next-session = ctrl + 2/shortcut.next-session = ctrl + 2/g' .termux/termux.properties | |
sed -i 's/# shortcut.previous-session = ctrl + 1/shortcut.previous-session = ctrl + 1/g' .termux/termux.properties | |
sed -i 's/# shortcut.rename-session = ctrl + n/shortcut.rename-session = ctrl + n/g' .termux/termux.properties | |
termux-reload-settings | |
} | |
gui(){ | |
apt install x11-repo -y | |
apt install tigervnc -y | |
vncserver -localhost | |
} | |
openbox(){ | |
gui() | |
apt install openbox pypanel xorg-xsetroot aterm -y | |
echo -e "#!/data/data/com.termux/files/usr/bin/sh\n# Start Openbox.\nopenbox-session &" > ~/.vnc/xstartup | |
echo -e "# Make background gray.\nxsetroot -solid gray\n# Launch PyPanel.\npypanel &" > ~/.config/openbox/autostart | |
} | |
xfce(){ | |
gui() | |
apt install xfce4 xfce4-terminal -y | |
echo -e "#!/data/data/com.termux/files/usr/bin/sh\nxfce4-session &" | |
} | |
if [ $1 == "--help" || $1 == "-h" ]then; | |
help_fuc() | |
elif [ $1 == "--config" || $1 == "-c" ] then; | |
default_config() | |
elif [ $1 == "--openbox" || $1 == "-ob" ] then; | |
default_config() | |
openbox() | |
elif [ $1 == "--xfce" || $1 == "-x4" ] then; | |
default_config() | |
xfce() | |
else | |
echo -e $1 "not found\nUse \"--help or -h\"" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment