python-eel/Eel

How to keep the application icon on the dock

Open

#680 创建于 2023年3月31日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Python (5,980 star) (570 fork)batch import
help wanted

描述

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

贡献者指南