A simple PyQt5 Tutanota webclient
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pyqtutaweb.py 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # PyQTutaWeb: A simple PyQt5 Tutanota webclient
  2. # Copyright(C) 2019 grumpytetra <grumpytetra AT teknik.io>
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software Foundation,
  16. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. import sys
  18. from PyQt5.QtCore import QUrl
  19. from PyQt5.QtWebEngineWidgets import QWebEngineView
  20. from PyQt5.QtWidgets import QApplication, QSystemTrayIcon
  21. from PyQt5.QtGui import QIcon
  22. app = QApplication(sys.argv)
  23. app.setApplicationName("PyQTutaWeb")
  24. web = QWebEngineView()
  25. web.load(QUrl("https://mail.tutanota.com"))
  26. web.show()
  27. if QSystemTrayIcon.isSystemTrayAvailable():
  28. tray = QSystemTrayIcon()
  29. tray.setIcon(QIcon(sys.path[0] + "/tuta.png"))
  30. tray.activated.connect(lambda: web.hide() if web.isVisible() else web.show())
  31. tray.show()
  32. sys.exit(app.exec_())