From 0344d52c91bc1bc8950ef5fa7728b84cafc50d9c Mon Sep 17 00:00:00 2001 From: Fernando Ortiz Date: Fri, 4 Dec 2020 19:37:42 -0600 Subject: [PATCH] conky improvements --- conky/conky-7inch | 2 +- conky/conky-large | 3 +-- conky/conky-medium | 2 +- conky/conky-small | 2 +- conky/get-vfo | 0 conky/update | 39 ++++++++++++++++++++++++++++++ functions/additional.function | 45 +++-------------------------------- 7 files changed, 46 insertions(+), 47 deletions(-) mode change 100755 => 100644 conky/get-vfo create mode 100644 conky/update diff --git a/conky/conky-7inch b/conky/conky-7inch index 7f71880..312ee91 100644 --- a/conky/conky-7inch +++ b/conky/conky-7inch @@ -33,9 +33,9 @@ ${font Arial:size=12}${color Yellow}${alignc}N0CALL ${voffset -30} ${font Arial:bold:size=08}${color White}Gridsquare ${alignr}${color Yellow}${execi 25 $HOME/bin/conky/grid | cut -c1-8} #${font Arial:bold:size=12}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} -${color Yellow}LOCAL${alignr}ZULU ${voffset -20} ${color DarkSlateGray}${hr 2} +${color Yellow}LOCAL${alignr}ZULU ${font Arial:bold:size=08}${color White}${time %H:%M:%S}\ ${alignr}${tztime Zulu %H:%M:%S} ${font Arial:bold:size=08}${color White}${time %d%b%y}\ diff --git a/conky/conky-large b/conky/conky-large index 2ab645d..68dc28f 100644 --- a/conky/conky-large +++ b/conky/conky-large @@ -41,11 +41,10 @@ ${font Arial:bold:size=18}${color White}Gridsquare ${alignr}${color Yellow}${exe #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} #${font Arial:bold:size=18}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} - -${color Yellow}LOCAL${alignr}ZULU ${voffset -45} ${color DarkSlateGray}${hr 2} ${voffset -35} +${color Yellow}LOCAL${alignr}ZULU ${font Arial:bold:size=25}${color White}${time %H:%M:%S}\ ${alignr}${tztime Zulu %H:%M:%S} ${font Arial:bold:size=25}${color White}${time %d%b%y}\ diff --git a/conky/conky-medium b/conky/conky-medium index 7b2327e..156e57d 100644 --- a/conky/conky-medium +++ b/conky/conky-medium @@ -40,8 +40,8 @@ ${font Arial:bold:size=12}${color White}Gridsquare ${alignr}${color Yellow}${exe #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} #${font Arial:bold:size=12}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} -${color Yellow}LOCAL${alignr}ZULU ${color DarkSlateGray}${hr 2} +${color Yellow}LOCAL${alignr}ZULU ${font Arial:bold:size=15}${color White}${time %H:%M:%S}\ ${alignr}${tztime Zulu %H:%M:%S} ${font Arial:bold:size=15}${color White}${time %d%b%y}\ diff --git a/conky/conky-small b/conky/conky-small index b6ce8dc..e940d90 100644 --- a/conky/conky-small +++ b/conky/conky-small @@ -40,9 +40,9 @@ ${font Arial:bold:size=08}${color White}Gridsquare ${alignr}${color Yellow}${exe #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} #${font Arial:bold:size=12}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} -${color Yellow}LOCAL${alignr}ZULU ${voffset -20} ${color DarkSlateGray}${hr 2} +${color Yellow}LOCAL${alignr}ZULU ${font Arial:bold:size=08}${color White}${time %H:%M:%S}\ ${alignr}${tztime Zulu %H:%M:%S} ${font Arial:bold:size=08}${color White}${time %d%b%y}\ diff --git a/conky/get-vfo b/conky/get-vfo old mode 100755 new mode 100644 diff --git a/conky/update b/conky/update new file mode 100644 index 0000000..db3ebba --- /dev/null +++ b/conky/update @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +mkdir -p $HOME/bin/conky +cp -p $HOME/pi-build/conky/* $HOME/bin/conky/ +chmod +x $HOME/bin/conky/get-grid $HOME/bin/conky/get-freq $HOME/bin/conky/grid $HOME/bin/conky/setconky + +#Create files needed for autostart at login +#Fix issue https://github.com/km4ack/pi-build/issues/83 + +cat < $HOME/.local/share/applications/conky.desktop +[Desktop Entry] +Name=Conky +Comment=Conky +GenericName=Conky Screen Background Monitor +Exec=conky +Icon=/home/pi/bin/conky/conky-logo.png +Type=Application +Encoding=UTF-8 +Terminal=false +Categories=HamRadio +Keywords=Radio +EOF + +ln -sf $HOME/.local/share/applications/conky.desktop $HOME/.config/autostart/conky.desktop + +#####Add setconky to main menu +cat < $HOME/.local/share/applications/setconky.desktop +[Desktop Entry] +Name=Conky-Prefs +Comment=Conky-Prefs +GenericName=Change Conky Preferences +Exec=/home/pi/bin/conky/setconky +Icon=/home/pi/bin/conky/conky-logo.png +Type=Application +Encoding=UTF-8 +Terminal=false +Categories=Settings;DesktopSettings;GTK;X-LXDE-Settings; +Keywords=Radio,Conky +EOF diff --git a/functions/additional.function b/functions/additional.function index c2041e0..c62a1c1 100644 --- a/functions/additional.function +++ b/functions/additional.function @@ -126,49 +126,10 @@ sudo apt-get install -y ruby2.5 sudo gem install gpsd_client sudo gem install maidenhead cp $MYPATH/conky/.conkyrc $HOME/.conkyrc -mkdir -p $HOME/bin/conky -cp $MYPATH/conky/* $HOME/bin/conky/ -chmod +x $HOME/bin/conky/get-grid $HOME/bin/conky/temp-conv $HOME/bin/conky/get-freq $HOME/bin/conky/grid sed -i "s/N0CALL/$CALL/" $HOME/.conkyrc -#Line below is for https://github.com/km4ack/pi-build/issues/198 -#echo "*/5 * * * * home/pi/bin/conky/grid > /home/pi/bin/conky/gridsquare.txt" >> $TEMPCRON - -#Create files needed for autostart at login -#Fix issue https://github.com/km4ack/pi-build/issues/83 - -cat < $HOME/.local/share/applications/conky.desktop -[Desktop Entry] -Name=Conky -Comment=Conky -GenericName=Conky Screen Background Monitor -Exec=conky -Icon=/home/pi/pi-build/conky/conky-logo.png -Type=Application -Encoding=UTF-8 -Terminal=false -Categories=HamRadio -Keywords=Radio -EOF - -ln -sf $HOME/.local/share/applications/conky.desktop $HOME/.config/autostart/conky.desktop - -#####Add setconky to main menu -chmod +x $HOME/pi-build/conky/setconky - -cat < $HOME/.local/share/applications/setconky.desktop -[Desktop Entry] -Name=Conky-Prefs -Comment=Conky-Prefs -GenericName=Change Conky Preferences -Exec=/home/pi/pi-build/conky/setconky -Icon=/home/pi/pi-build/conky/conky-logo.png -Type=Application -Encoding=UTF-8 -Terminal=false -Categories=Settings;DesktopSettings;GTK;X-LXDE-Settings; -Keywords=Radio,Conky -EOF - +# Add the rest of the code here so that it can be use for installation and locally +bash $MYPATH/conky/update +#echo "@reboot sleep 20 && export DISPLAY=:0 && /usr/bin/conky" >> $TEMPCRON } ##################################