diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/curses b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/curses new file mode 100644 index 0000000..2289fc1 --- /dev/null +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/curses @@ -0,0 +1,5 @@ +#!/bin/bash +export NCURSES_NO_UTF8_ACS=1 +export TERM=xterm-256color +export LANG=C.UTF-8 +python /opt/curses-client-for-meshtastic/main.py --host diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index 25dc19b..ec4c8fc 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -165,16 +165,17 @@ utilities() { local title="Utilities" while true; do local option="" - option=$(dialog --cancel-label "Back" --menu "$title" 16 40 4 \ + option=$(dialog --cancel-label "Back" --menu "$title" 17 40 4 \ 1 "Set system timezone" \ 2 "Kernel modules" \ 3 "Re-run first-boot script" \ 4 "Run USB configuration tool" \ 5 "Run OEM luckfox-config" \ - 6 "Reboot" \ - 7 "Shutdown" \ + 6 "Process viewer/manager" \ + 7 "Reboot" \ + 8 "Shutdown" \ "" "" \ - 8 "Back to Main Menu" 3>&1 1>&2 2>&3) + 9 "Back to Main Menu" 3>&1 1>&2 2>&3) exit_status=$? # This line checks the exit status of the dialog command if [ $exit_status -ne 0 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog @@ -196,14 +197,15 @@ utilities() { fi ;; 5) luckfox-config ;; - 6) + 6) htop ;; + 7) dialog --title "$title" --yesno "Reboot now?\n\nTip: Reboot can also be triggered by long-pressing the BOOT button on the luckfox." 10 45 if [ $? -eq 0 ]; then #unless cancel/no dialog --infobox "Rebooting..." 5 45 reboot fi ;; - 7) + 8) dialog --title "$title" --yesno "Shut down now?\n\nTo power system back on, disconnect/reconnect power.\n\nThe system shutdown command prevents damage to the filesystem from power interrupts, but does not stop power consumption.\n\nTip: You can also shut down the Femtofox by pressing the BOOT button for 5 seconds or by running \`sudo halt\`." 14 60 if [ $? -eq 0 ]; then #unless cancel/no dialog --infobox "Shutting down...\n\nPower consumption will not stop." 5 45 @@ -211,7 +213,7 @@ utilities() { halt fi ;; - 8) return ;; + 9) return ;; esac done } diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh index 9a8b5c9..4891e8e 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh @@ -61,6 +61,8 @@ fi lines="export NCURSES_NO_UTF8_ACS=1 export TERM=xterm-256color export LANG=C.UTF-8" + +# Check if the lines are already in .bashrc if ! grep -Fxq "$lines" /home/femto/.bashrc; then echo "$lines" >> /home/femto/.bashrc echo "Added TERM, LANG and NCURSES_NO_UTF8_ACS to .bashrc" diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh index adab8d4..3d208bb 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh @@ -120,12 +120,13 @@ while true; do title="$title" option="" option=$(dialog --cancel-label "Back" --menu "$title" 0 0 6 \ - 1 "Meshing Around by Spud" \ - 2 "The Comms Channel BBS, TC²BBS" \ - 3 "Curses Client for Meshtastic" \ + 1 "The Comms Channel BBS, TC²BBS" \ + 2 "Curses Client for Meshtastic" \ + 3 "Meshing Around by Spud" \ 4 "Mosquitto MQTT Broker" \ + 5 "Mosquitto MQTT Client" \ "" ""\ - 5 "Back to Main Menu" 3>&1 1>&2 2>&3) + 6 "Back to Main Menu" 3>&1 1>&2 2>&3) exit_status=$? # This line checks the exit status of the dialog command if [ $exit_status -ne 0 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog @@ -133,11 +134,12 @@ title="$title" fi case $option in - 1) package_intro "meshing_around" ;; - 2) package_intro "tc2_bbs" ;; - 3) package_intro "curses_client" ;; + 1) package_intro "tc2_bbs" ;; + 2) package_intro "curses_client" ;; + 3) package_intro "meshing_around" ;; 4) package_intro "mosquitto_mqtt_broker" ;; - 5) break ;; + 5) package_intro "mosquitto_mqtt_client" ;; + 6) break ;; esac done