mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-22 16:06:32 -05:00
Add htop to utilities menu
Also, forgot femto-software.sh in the last commit 👀
This commit is contained in:
parent
3f4273b906
commit
eecd143eff
4 changed files with 26 additions and 15 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue