-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmanage-forms
More file actions
executable file
·31 lines (27 loc) · 900 Bytes
/
Copy pathmanage-forms
File metadata and controls
executable file
·31 lines (27 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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