diff --git a/overlay/etc/skel/.conkyrc b/overlay/etc/skel/.conkyrc index 6a20cd7..ca48a38 100644 --- a/overlay/etc/skel/.conkyrc +++ b/overlay/etc/skel/.conkyrc @@ -36,6 +36,8 @@ CAT : ${execpi 10 et-system-info et-cat} GPS : ${execpi 10 et-system-info et-gps} Audio: ${execpi 10 et-system-info et-audio} +Mode : ${execpi 10 et-system-info et-mode} + ${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}OPERATOR ${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign} Grid : ${execpi 10 et-system-info grid} diff --git a/overlay/opt/emcomm-tools/bin/et-mode b/overlay/opt/emcomm-tools/bin/et-mode index 1c501b4..5d668d3 100755 --- a/overlay/opt/emcomm-tools/bin/et-mode +++ b/overlay/opt/emcomm-tools/bin/et-mode @@ -6,8 +6,6 @@ MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode" -# TODO check for call, radio, audio -# TODO show current mode (delegate to et-system-info to align with Conky) # TODO Add better detection between startup services / apps MODE_ID_NONE="none" @@ -65,7 +63,7 @@ if [ $exit_status -eq 0 ]; then systemctl --user start et-service-direwolf-simple sleep 3 systemctl --user start et-service-winlink-packet - sleep 3 + sleep 2 min http://localhost:8080 ;; *) diff --git a/overlay/opt/emcomm-tools/bin/et-system-info b/overlay/opt/emcomm-tools/bin/et-system-info index 8dc6702..476c2b5 100755 --- a/overlay/opt/emcomm-tools/bin/et-system-info +++ b/overlay/opt/emcomm-tools/bin/et-system-info @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 6 October 2024 -# Updated : 30 October 2024 +# Updated : 6 November 2024 # Purpose : Utility script for dumping system information function usage() { @@ -13,6 +13,7 @@ function usage() { echo " et-audio-card - Display audio card and device: ," echo " et-cat - Show state of CAT control interface" echo " et-gps - Show state of GPS interface" + echo " et-mode - Show current mode" echo " grid - Current grid square defined by user" echo " ip - System IP address" echo " release - EmComm Tools release" @@ -168,6 +169,37 @@ case $1 in fi ;; + et-mode) + SELECTED_MODE=$(cat "${HOME}/.config/emcomm-tools/et-mode") + + MODE_ID_NONE="none" + MODE_ID_APRS_DIGIPEATER="aprs-digipeater" + MODE_ID_APRS_CLIENT="aprs-client" + MODE_ID_WINLINK_ARDOP="winlink-ardop" + MODE_ID_WINLINK_PACKET="winlink-packet" + + case ${SELECTED_MODE} in + ${MODE_ID_NONE}) + echo "Not selected" + ;; + ${MODE_ID_APRS_DIGIPEATER}) + echo "Digipeater" + ;; + ${MODE_ID_APRS_CLIENT}) + echo "APRS" + ;; + ${MODE_ID_WINLINK_ARDOP}) + echo "Winlink ARDOP" + ;; + ${MODE_ID_WINLINK_PACKET}) + echo "Winlink Packet" + ;; + *) + echo "Unknown" + ;; + esac + + ;; ip) hostname -I | awk '{print $1}' ;;