def alert(msg,body="",icon=None):
    """
        alerts the user of something happening via `notify-send`. If it is not installed, the alert will be printed to the console.
    """
    if type(body) == str:
        body = body[:200]
    if call(["which","notify-send"]) == 0:
        if icon is not None:
            call(["notify-send",msg,"-i",icon,body])
        else:
            call(["notify-send",msg,body])
    else:
        print(("ALERT: ", msg))
def alert ( msg , body = "" , icon = None ) : if type ( body ) == str : body = body [ : 200 ] if call ( [ "which" , "notify-send" ] ) == 0 : if icon is not None : call ( [ "notify-send" , msg , "-i" , icon , body ] ) else : call ( [ "notify-send" , msg , body ] ) else : print ( ( "ALERT: " , msg ) )
alerts the user of something happening via `notify-send`. If it is not installed, the alert will be printed to the console.