mirror of
https://github.com/km4ack/patmenu2.git
synced 2025-05-15 22:30:11 -07:00
initial commit
This commit is contained in:
parent
cc475eadde
commit
7a3390a3cf
31
manage-forms
Executable file
31
manage-forms
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
source $MYPATH/manage-pat-functions
|
||||||
|
MAIN=$MYPATH/patmenu
|
||||||
|
FILE=/run/user/$UID/tempcron.txt
|
||||||
|
crontab -l > $FILE
|
||||||
|
STATUS=$(grep updateforms $FILE | awk '{print $1}')
|
||||||
|
rm $FILE
|
||||||
|
|
||||||
|
if [ $STATUS = 0 ]; then
|
||||||
|
STATUS=Weekly
|
||||||
|
elif [ $STATUS = '@reboot' ]; then
|
||||||
|
STATUS="At boot"
|
||||||
|
else
|
||||||
|
STATUS="Not Set"
|
||||||
|
fi
|
||||||
|
|
||||||
|
yad --form --width=420 --text-align=center --center --title="Manage Pat" --text-align=center \
|
||||||
|
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||||
|
--text="<b>Manage Pat</b> by KM4ACK" \
|
||||||
|
--field="Download Latest Forms":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/manage-form-functions; DOWNLOAD"' \
|
||||||
|
--field="Auto Download Forms <b>$STATUS</b>":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/manage-form-functions; AUTO-DOWNLOAD"' \
|
||||||
|
--button="Main Menu":1
|
||||||
|
BUT=$?
|
||||||
|
|
||||||
|
if [ $BUT = 1 ]; then
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user