Giter VIP home page Giter VIP logo

flet-as-system-tray-icon's Introduction

Flet as System Tray Icon

A simple program using PyStray to expose the possibility of a Flet app being made a System Tray icon without any issues. This program has been tested only on Windows. I hope it works on your device too. Let me know in the issue tracker if not.

Requirements

Three main requirements:

  • Flet (for the GUI)
  • PyStray (for the System tray icon)
  • Pillow (required by PyStray for the Tray icon's image)

All these are in the requirements.txt file. For simplicity:

pip install -r requirements.txt

Capture

tray gif

flet-as-system-tray-icon's People

Contributors

ndonkohenri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alitrack

flet-as-system-tray-icon's Issues

Is macos M1 supported?

Hello, TheEthicalBoy,
Is macos M1 supported? As I receive the Exception: NotImplementedError

Traceback (most recent call last):
  File "/Users/chep/dev/python/jitsi_ring_bot/tmp/Flet-as-System-Tray-Icon/main.py", line 173, in <module>
    tray_icon.run_detached(setup=my_setup)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pystray/_base.py", line 231, in run_detached
    self._run_detached()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pystray/_darwin.py", line 124, in _run_detached
    raise NotImplementedError()
NotImplementedError

from this part of code

 def _run_detached(self):
        if self._detachable:
            self._mark_ready()
        else:
            raise NotImplementedError()

Not found images in assets when use flet pack

Not found icon in my case if i run executed file

from PIL import Image

self.tray_image = Image.open("assets/icons/logo.png")
...
flet.app(target=root, assets_dir="assets")

for build i use command

flet pack .\main.py --icon .\assets\icons\favicon.png --add-data "assets;assets"  

[Errno 2] No such file or directory: 'assets/icons/logo.png'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.