# Find the screen size. Will default to 800x480 if it can not be detected.
function set_screen_size(){
screen_size=$(xdpyinfo | grep dimensions |\
sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'| sed s/x/" "/ ||echo800 480)
width=$(echo$screen_size| awk '{print $1}')
height=$(echo$screen_size| awk '{print $2}')
#xdpyinfo | grep 'dimensions:'
# Divide by two so the dialogs take up half of the screen, which looks nice.
rows=$(( height /2))
columns=$(( width /2))
# Unless the screen is tiny
rows=$(( rows < 400 ? 400 : rows ))
columns=$(( columns < 700 ? 700 : columns ))
c="--width=${columns}"
r="--height=${rows}"
}
function change_call(){
CHANGECS=$(yad --center --wrap --title="Change Station Callsign" --text="Please answer the following selections:"\
--form --separator="," --item-separator=","\
--field="Current Callsign""N0CALL"\
--field="Desired Callsign"""\
--field="Tip::TXT""This process will change your callsign as directed from gARIM, JS8Call, WSJT-X, FLAMP, FLMSG, FLDigi, FLDigi CK-IN Macro, and PAT."${c}${r})||exit1
FROMCALL=$(echo$CHANGECS| awk -F ","'{print $1}')
TOCALL=$(echo$CHANGECS| awk -F ","'{print $2}')
if[ -z "$TOCALL"];then
echo"You must provide a TO Callsign"| yad --center --text-info --wrap --title=ChangeCall --button="Start Over:1"${c}${r}||