python-eel/Eel

How to keep the application icon on the dock

開放

#680 建立於 2023年3月31日

 (1 則留言) (0 個反應) (0 位負責人)Python (570 個分叉)batch import
help wanted

倉庫指標

星標
 (5,980 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南