Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 13 additions & 25 deletions autopat
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,20 @@ MAIN=$MYPATH/patmenu

source $MYPATH/config

if [ $RIGCONTROL == 'no' ]
then

yad --title="NO RIG CONTROL" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
--center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \
--button=gtk-ok

exit
fi

#Check if FLRIG is running if user has it set in config file
if [ "$RIGCONTROL" = 'yes' ]; then
echo "rig control is on"
FLRIG=$(echo $RIG | grep "\-m 4")
if [ -z "$FLRIG" ]; then
echo
else
if [ $RIGCONTROL == 'no' ]; then
yad --title="NO RIG CONTROL" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\
--center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \
--button=gtk-ok
exit
else
#Check if FLRIG is running if user has it set in config file
echo "rig control is on"
FLRIG=$(pidof flrig)
if [ -z "$FLRIG" ]; then
yad --title="FAILED" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
--center --form --text="Please start FLRIG and try again" \
--button=gtk-ok
exit
fi
if [ -z $FLRIG ]; then
#needs to be open
echo launching flrig for you
flrig
fi
fi

Expand Down
26 changes: 16 additions & 10 deletions pat-functions
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ PATCONFIG=$XDG_CONFIG_HOME/pat/config.json

AUTOPAT(){
source $MYPATH/config
if [ $RIGCONTROL == 'no' ]
then

yad --title="NO RIG CONTROL" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
--center --form --text="\r\r\r\rRig Control is needed for auto pat.\rPlease configure rig control and try again. \
\rRig control can be configured using\r<b>Manage Pat Menu</b>"
--button=gtk-ok
$MAIN &
exit

if [ $RIGCONTROL == 'no' ]; then
yad --title="NO RIG CONTROL" --width=400 --height=100 \
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center\
--center --form --text="\rRig Control is needed for auto pat.\rPlease configure rig control and try again." \
--button=gtk-ok
exit
else
#Check if FLRIG is running if user has it set in config file
echo "rig control is on"
FLRIG=$(pidof flrig)
if [ -z $FLRIG ]; then
#needs to be open
echo launching flrig for you
flrig
fi
fi


Expand Down