diff --git a/overlay/etc/skel/.config/autostart/conky.desktop b/overlay/etc/skel/.config/autostart/conky.desktop new file mode 100644 index 0000000..835c236 --- /dev/null +++ b/overlay/etc/skel/.config/autostart/conky.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Exec=conky +Hidden=false +NoDisplay=false +X-GNOME-Autostart-enabled=true +Name=Conky +Comment=Start Conky on login diff --git a/overlay/etc/skel/.conkyrc b/overlay/etc/skel/.conkyrc new file mode 100644 index 0000000..99fab7e --- /dev/null +++ b/overlay/etc/skel/.conkyrc @@ -0,0 +1,31 @@ +conky.config = { + alignment = 'top_right', + update_interval = 2.0, + double_buffer = true, + background = false, + use_xft = true, + font = 'DejaVu Sans Mono:size=10', + own_window = true, + own_window_type = 'desktop', + own_window_transparent = true, + own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', + draw_borders = false, + draw_outline = false, + draw_shades = false, + default_color = 'yellow', + minimum_width = 200, +}; + +conky.text = [[ +${font DejaVu Sans Mono:size=12}${alignc}${time %A, %B %d %Y} +Local: ${alignr}${time %H:%M:%S} +UTC: ${alignr}${tztime UTC %H:%M:%S} +Uptime: ${uptime} + +IP: ${execpi 3600 /opt/emcomm-tools/bin/et-system-info ip} + +${execp /opt/emcomm-tools/bin/et-system-info release} +CAT: ${execpi 15 /opt/emcomm-tools/bin/et-system-info et-cat} +GPS: ${execpi 15 /opt/emcomm-tools/bin/et-system-info et-gps} +]]; + diff --git a/overlay/opt/emcomm-tools/bin/et-system-info b/overlay/opt/emcomm-tools/bin/et-system-info new file mode 100755 index 0000000..3deac37 --- /dev/null +++ b/overlay/opt/emcomm-tools/bin/et-system-info @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 6 October 2024 +# Purpose : Utility script for dumping system information + +function usage() { + echo "Usage: $(basename $0) " + echo " et-cat - Is CAT control connected" + echo " et-gps - Is the GPS connected" + echo " ip - System IP address" + echo " release - EmComm Tools Release" +} + +if [ $# -ne 1 ]; then + usage + exit 1 +fi + +case $1 in + et-cat) + if [ -e /dev/et-cat ]; then echo "Yes"; else echo "No"; fi + ;; + et-gps) + if [ -e /dev/et-gps ]; then echo "Yes"; else echo "No"; fi + ;; + ip) + hostname -I + ;; + release) + grep DISTRIB_DESCRIPTION /etc/lsb-release | sed 's|"||g' | awk '{print $1}' | cut -d"=" -f2 + ;; + *) + echo "Command not supported." + usage + exit 1 + ;; +esac diff --git a/scripts/install-conky.sh b/scripts/install-conky.sh new file mode 100755 index 0000000..f4fd3f4 --- /dev/null +++ b/scripts/install-conky.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 5 October 2022 +# Purpose : Install Conky +set -e + +et-log "Installing Conky..." +apt install \ + conky\ + -y diff --git a/scripts/install.sh b/scripts/install.sh index 765aba2..707cd8c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 1 October 2024 +# Updated : 6 October 2024 # Purpose : Main installer for EmComm Tools OS Community . ./env.sh @@ -30,3 +30,5 @@ exitIfNotRoot ./install-udev.sh ./install-gps.sh ./install-navit.sh + +./install-conky.sh