diff --git a/setup_utility.sh b/setup_utility.sh index 5e6bd3c..8979e1e 100755 --- a/setup_utility.sh +++ b/setup_utility.sh @@ -89,9 +89,9 @@ folder_path="" first_run=true if [ -z "$1" ]; then folder_path="$DIR/subscripts" - sudo chmod -R +x "$DIR/subscripts" - sudo chmod -R -x "$DIR/subscripts/5Udev_rules/DISREGARD_udev_rules" - sudo chmod +x "$DIR/subscripts/5Udev_rules/DISREGARD_udev_rules" + + # Make all .sh files in the subscripts folder executable + find "$folder_path" -type f -name "*.sh" -exec chmod +x {} \; else folder_path="$1" first_run=false diff --git a/subscripts/6Branding/1Set_wallpaper.sh b/subscripts/6Branding/1Set_wallpaper.sh new file mode 100755 index 0000000..f950565 --- /dev/null +++ b/subscripts/6Branding/1Set_wallpaper.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +script_dir="$(dirname "$(realpath "$0")")" +folder_path="$script_dir/DISREGARD/wallpapers" + +# Build options array +options=() +for file in "$folder_path"/*; do + [ -f "$file" ] || continue + filename=$(basename "$file") + options+=("$filename" "") +done + +wallpaper=$(whiptail \ + --title "Set Wallpaper" \ + --menu "Select wallpaper:" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + +# If user cancelled +if [ $? -ne 0 ]; then + echo "Cancelled." + exit 1 +fi + +local_wallpaper_path="$folder_path/$wallpaper" # The wallpaper path in the local subscripts folder +sudo mkdir -p "/usr/share/backgrounds" # Ensure the system backgrounds folder exists +system_wallpaper_path="/usr/share/backgrounds/$wallpaper" # The wallpaper path in the system folder. Technically RPi uses a different directory for their defaults, but this one seem to be the most universal one. + +# Copy the selected wallpaper to the system folder, so that it persists even after we delete the install script directory +sudo cp "$local_wallpaper_path" "$system_wallpaper_path" + +gsettings set org.gnome.desktop.background picture-uri "file://$system_wallpaper_path" # Light mode +gsettings set org.gnome.desktop.background picture-uri-dark "file://$system_wallpaper_path" # Dark mode + +# Exit 1 will not show the "Press enter to continue" menu but rather go straight back to the main menu +exit 1 diff --git a/subscripts/6Branding/2Set_terminal_MOTD.sh b/subscripts/6Branding/2Set_terminal_MOTD.sh new file mode 100755 index 0000000..dd8cd9a --- /dev/null +++ b/subscripts/6Branding/2Set_terminal_MOTD.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +sudo chmod -x /etc/update-motd.d/10-help-text +sudo chmod -x /etc/update-motd.d/60-unminimize +sudo chmod -x /etc/update-motd.d/90-updates-available + +sudo cp subscripts/6Branding/DISREGARD/10-fly4future /etc/update-motd.d/10-fly4future +sudo chmod +x /etc/update-motd.d/10-fly4future + +echo "Terminal MOTD has been set use Fly4Future branding." + +exit 0 diff --git a/subscripts/6Branding/DISREGARD/10-fly4future b/subscripts/6Branding/DISREGARD/10-fly4future new file mode 100644 index 0000000..8a45197 --- /dev/null +++ b/subscripts/6Branding/DISREGARD/10-fly4future @@ -0,0 +1,16 @@ +#!/bin/sh + +NO_FORMAT="\033[0m" +BOLD="\033[1m" +DARKORANGE="\033[38;5;208m" + +echo "${NO_FORMAT}" +echo "▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ " +echo "█████████▀ ▂████ █████████▀ ▗▄▄▄▖▗▖ ▗▄▖ ▗▄▄▄▖ ▄ " +echo "███ ▆█████ ███ ▐▌ ▐▌▗▖ ▄ ▗▛▐▌ ▐▌ ▗▖ ▄ ▄█▄ ▄ ▗▖▗▖▄▄ ▄▄▄ ®" +echo "███▄▄▄▖ ▗██▛ ███ ███▄▄▄▖ ▐▛▀▀▘▐▌ ▜▖ ▟▘▗█▄▟▙▖▐▛▀▀▘▐▌ █ █ █ ▐▌▐▛ ▐▙▄▄▌ " +echo "█████▀ ▟██▘ ███ █████▀ ▐▌ ▐▙▖ ▜▟▘ ▐▌ ▐▌ ▝▙▄▄▜ █▄ ▜▄▄▞▌▐▌ ▝▙▄▄ " +echo "███ ▝▜███████ ███ ▗▟▘ " +echo " ███ " +echo " ${BOLD}${DARKORANGE}Gateway to Advanced Robotic Autonomy${NO_FORMAT}" +echo "" diff --git a/subscripts/6Branding/DISREGARD/wallpapers/Custom_Drone.png b/subscripts/6Branding/DISREGARD/wallpapers/Custom_Drone.png new file mode 100644 index 0000000..216d113 Binary files /dev/null and b/subscripts/6Branding/DISREGARD/wallpapers/Custom_Drone.png differ diff --git a/subscripts/6Branding/DISREGARD/wallpapers/RoboAid.png b/subscripts/6Branding/DISREGARD/wallpapers/RoboAid.png new file mode 100644 index 0000000..2b2a2ef Binary files /dev/null and b/subscripts/6Branding/DISREGARD/wallpapers/RoboAid.png differ diff --git a/subscripts/6Branding/DISREGARD/wallpapers/RoboCore.png b/subscripts/6Branding/DISREGARD/wallpapers/RoboCore.png new file mode 100644 index 0000000..593e700 Binary files /dev/null and b/subscripts/6Branding/DISREGARD/wallpapers/RoboCore.png differ diff --git a/subscripts/6Branding/DISREGARD/wallpapers/RoboFly_temp.png b/subscripts/6Branding/DISREGARD/wallpapers/RoboFly_temp.png new file mode 100644 index 0000000..96c0756 Binary files /dev/null and b/subscripts/6Branding/DISREGARD/wallpapers/RoboFly_temp.png differ