et-mode Added mode to Conky

This commit is contained in:
Gaston Gonzalez
2024-11-06 13:06:16 -07:00
parent 908a0c8d70
commit 1b5b08a4c2
3 changed files with 36 additions and 4 deletions
+2
View File
@@ -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}
+1 -3
View File
@@ -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
;;
*)
+33 -1
View File
@@ -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: <card>,<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}'
;;