Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
Update guava.py
Browse files Browse the repository at this point in the history
  • Loading branch information
karimawi authored Jan 2, 2023
1 parent 1b272a3 commit 206863a
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions guava.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import ctypes
import os
import shutil
import threading
import time
import webbrowser
import easygui
import shutil
from sys import exit
from tkinter import *
import wget
import easygui
import pyperclip as ppc
import wget
from ahk import AHK
from AppOpener import give_appnames, run
from notifypy import Notify
from tinydb import Query, TinyDB
from tkextrafont import Font

Expand All @@ -18,15 +20,30 @@
applist = list(give_appnames())
accounts = Query()

if configdb.contains(Query().running == 'true') == True:
exit()
else:
configdb.upsert({'running':'true'}, Query().running.exists())

url1 = "https://drive.google.com/uc?export=download&id=1YLJMURfcO4yPTxCW2lmhr7Pkxba8jM1D"
url2 = "https://drive.google.com/uc?export=download&id=1SHejgNbp5LsFANrSffr4hCaaBtuPmzvJ"
url2 = "https://drive.google.com/uc?export=download&id=1SHejgNbp5LsFANrSffr4hCaaBtuPmzvJ"
url3 = "https://drive.google.com/uc?export=download&id=1CZgsRY3BPtGChEWCwINiULvQO2yQKa4A"
url4 = "https://drive.google.com/uc?export=download&id=1d66qqUIYdqWKCICTw8lABV2SoRPVb5sg"
url5 = "https://drive.google.com/uc?export=download&id=1n774SKKjA8VtGZkYflb98UUs21QTwlnx"
url6 = "https://drive.google.com/uc?export=download&id=1ktFA5obTGVxhRJ5vvIHfWUFB0WtmMAbi"
url7 = "https://drive.google.com/uc?export=download&id=1pHi8rjcw9gOVLZX_RGwqmbrpOa3BzmCV"
url8 = "https://drive.google.com/uc?export=download&id=1kC6IDFBEyZQ7URAvqGGEcN4s_gq8TEog"
url9 = "https://drive.google.com/uc?export=download&id=18uT0ygBO46rziwWsBA-3MGnoDjZcMMHj"
url10 = "https://drive.google.com/uc?export=download&id=1ihEH4AyRz-Xj2G1ZwZmEB-5NtKGBNC8W"

if os.path.isfile(r'guavaicon.ico') == False:
response = wget.download(url10, r"guavaicon.ico")
notification = Notify()
notification.title = "Installing Assets"
notification.message = "Installing Important Data For The First Time, Please Wait!"
notification.icon = "guavaicon.ico"
notification.application_name = "Guava"
notification.send()

if os.path.isfile(r'Nexa Bold.ttf') == False:
response = wget.download(url1, r"Nexa Bold.ttf")
Expand Down Expand Up @@ -74,6 +91,9 @@
pass


if configdb.contains(Query().copy_format_type == 'discord') == False and configdb.contains(Query().copy_format_type == 'plain') == False and configdb.contains(Query().copy_format_type == 'custom') == False:
configdb.insert({'copy_format_type':'discord'})
configdb.insert({'copy_format':'```\nUsername: %u%\nPassword: %p%\n```'})

def centerwind(win):
"""
Expand Down Expand Up @@ -130,6 +150,7 @@ def findapp(appname:str):
myappid = 'karimawi.guava.version.1.0' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
centerwind(root)
root.lift()

sidebar = Frame(root, width=73,height=501,bg="#1E1E1E")

Expand Down Expand Up @@ -1546,6 +1567,7 @@ def login(event):
if leaguewin.exist:
note('Logged in successfully!')
if configdb.contains(Query().exit_after_login == 'true') == True:
configdb.upsert({'running':'false'}, Query().running.exists())
exit()
else:
configdb.upsert({'exit_after_login':'false'}, Query().exit_after_login.exists())
Expand Down Expand Up @@ -1800,4 +1822,10 @@ def notelmao():
else:
pass

def on_closing():
configdb.upsert({'running':'false'}, Query().running.exists())
exit()

root.protocol("WM_DELETE_WINDOW", on_closing)

root.mainloop()

0 comments on commit 206863a

Please sign in to comment.