1
0
mirror of https://github.com/km4ack/patmenu2.git synced 2025-05-29 13:00:11 -07:00
This commit is contained in:
KM4ACK 2022-09-22 06:34:19 -05:00
parent 0ef83c19a4
commit 980d614f00

View File

@ -65,6 +65,7 @@ exit
LOGIN(){ LOGIN(){
CONFIG=$XDG_CONFIG_HOME/pat/config.json CONFIG=$XDG_CONFIG_HOME/pat/config.json
WHO=$(whoami) WHO=$(whoami)
CURRENT_USER=$(grep mycall $CONFIG | head -1 | sed 's/"mycall": "//;s/ //g;s/",//')
USER=$(yad --form --width=420 --text-align=center --center --title="Pat Log In/Out" --text-align=center \ USER=$(yad --form --width=420 --text-align=center --center --title="Pat Log In/Out" --text-align=center \
@ -73,16 +74,16 @@ USER=$(yad --form --width=420 --text-align=center --center --title="Pat Log In/O
--field="Call Sign" "" \ --field="Call Sign" "" \
--field="Winlink Password" "" \ --field="Winlink Password" "" \
--field="Six Character Grid Square" "EM65TV" \ --field="Six Character Grid Square" "EM65TV" \
--field="Current User Logged In ---- <b>$CURRENT_USER</b>":LBL \
--button="Log In":2 \ --button="Log In":2 \
--button="Log Out":3 \ --button="Log Out":3 \
--button="Cancel":1) --button="Cancel":1)
BUT=$? BUT=$?
if [ $BUT = 252 ]; then if [ $BUT = 252 ]; then
echo "true exit"
exit exit
elif [ $BUT = 1 ]; then elif [ $BUT = 1 ]; then
echo "cancel" $MAIN
elif [ $BUT = 2 ]; then elif [ $BUT = 2 ]; then
echo "Log IN" echo "Log IN"
CALLSIGN=$(echo $USER | awk -F "|" '{print $1}') CALLSIGN=$(echo $USER | awk -F "|" '{print $1}')