Conky - Added support for displaying callsign and grid

This commit is contained in:
Gaston Gonzalez
2024-10-25 15:58:35 -07:00
parent 85d1823740
commit c9af2f0593
3 changed files with 16 additions and 2 deletions
+4
View File
@@ -36,6 +36,10 @@ CAT : ${execpi 10 et-system-info et-cat}
GPS : ${execpi 10 et-system-info et-gps}
Audio: ${execpi 10 et-system-info et-audio}
${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}
${font DejaVu Sans:bold:size=9}${color #805f4f}${alignc}${execp /opt/emcomm-tools/bin/et-system-info release}
]];
+11 -1
View File
@@ -2,16 +2,18 @@
#
# Author : Gaston Gonzalez
# Date : 6 October 2024
# Updated : 23 October 2024
# Updated : 25 October 2024
# Purpose : Utility script for dumping system information
function usage() {
echo "Usage: $(basename $0) <command>"
echo " active-radio - Display model of active radio"
echo " callsign - Current callsign"
echo " et-audio - Show state of audio interface"
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 " grid - Current grid square defined by user"
echo " ip - System IP address"
echo " release - EmComm Tools release"
}
@@ -21,6 +23,8 @@ if [ $# -ne 1 ]; then
exit 1
fi
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
case $1 in
active-radio)
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
@@ -29,6 +33,12 @@ case $1 in
echo "No radio selected"
fi
;;
callsign)
cat ${ET_USER_CONFIG} | jq -r .callsign
;;
grid)
cat ${ET_USER_CONFIG} | jq -r .grid
;;
et-audio)
# 1. Check if the symlink was created by the udev rules
+1 -1
View File
@@ -4,7 +4,7 @@
# Date : 25 October 2024
# Purpose : Set user-specific settings for EmComm Tools.
ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
if [ ! -e ${ET_USER_CONFIG} ]; then
cp /etc/skel/.config/emcomm-tools/user.json ${ET_USER_CONFIG}