mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
et-mode Added mode to Conky
This commit is contained in:
@@ -36,6 +36,8 @@ CAT : ${execpi 10 et-system-info et-cat}
|
|||||||
GPS : ${execpi 10 et-system-info et-gps}
|
GPS : ${execpi 10 et-system-info et-gps}
|
||||||
Audio: ${execpi 10 et-system-info et-audio}
|
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:bold:size=10}${color #8d5133}${alignc}OPERATOR
|
||||||
${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign}
|
${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign}
|
||||||
Grid : ${execpi 10 et-system-info grid}
|
Grid : ${execpi 10 et-system-info grid}
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode"
|
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
|
# TODO Add better detection between startup services / apps
|
||||||
|
|
||||||
MODE_ID_NONE="none"
|
MODE_ID_NONE="none"
|
||||||
@@ -65,7 +63,7 @@ if [ $exit_status -eq 0 ]; then
|
|||||||
systemctl --user start et-service-direwolf-simple
|
systemctl --user start et-service-direwolf-simple
|
||||||
sleep 3
|
sleep 3
|
||||||
systemctl --user start et-service-winlink-packet
|
systemctl --user start et-service-winlink-packet
|
||||||
sleep 3
|
sleep 2
|
||||||
min http://localhost:8080
|
min http://localhost:8080
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 6 October 2024
|
# Date : 6 October 2024
|
||||||
# Updated : 30 October 2024
|
# Updated : 6 November 2024
|
||||||
# Purpose : Utility script for dumping system information
|
# Purpose : Utility script for dumping system information
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
@@ -13,6 +13,7 @@ function usage() {
|
|||||||
echo " et-audio-card - Display audio card and device: <card>,<device>"
|
echo " et-audio-card - Display audio card and device: <card>,<device>"
|
||||||
echo " et-cat - Show state of CAT control interface"
|
echo " et-cat - Show state of CAT control interface"
|
||||||
echo " et-gps - Show state of GPS interface"
|
echo " et-gps - Show state of GPS interface"
|
||||||
|
echo " et-mode - Show current mode"
|
||||||
echo " grid - Current grid square defined by user"
|
echo " grid - Current grid square defined by user"
|
||||||
echo " ip - System IP address"
|
echo " ip - System IP address"
|
||||||
echo " release - EmComm Tools release"
|
echo " release - EmComm Tools release"
|
||||||
@@ -168,6 +169,37 @@ case $1 in
|
|||||||
fi
|
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)
|
ip)
|
||||||
hostname -I | awk '{print $1}'
|
hostname -I | awk '{print $1}'
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user