python-eel/Eel

How to keep the application icon on the dock

Open

#680 opened on Mar 31, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Python (5,980 stars) (570 forks)batch import
help wanted

Description

Describe the problem When I run my app the script icon appears on the dock briefly then disappears. Then the same thing with the Chrome icon. Then my app opens and functions fine. But there is no dock icon indicating that it's still running. It also makes it difficult to switch to the app. How can I make my icon stay on the dock?

Code snippet(s)

import eel
eel.init('web')
eel.start('index.html', size=(500, 900), position=(0,0))
<html>
<head>
    <title>Test</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="favicon.ico">
    <script type="text/javascript" src="/eel.js"></script>
</head>
<body>
    <h1>Hello World</h1>
</body>
</html>
python3 -m eel main.py web  --onefile --noconsole --icon=web/favicon.ico

Desktop:

  • OS: MacOS Monterey
  • Browser: Chrome Version 111
  • python3

Contributor guide