Per-program window app IDs so the dock matches desktop entries

This commit is contained in:
sarah committed 2026-10-08 22:35:07 +02:00
1 parent f17e29705f
commit 19bbad33a4
8 files changed
+17 -1

No files matched your search

+4 -1
View File
@@ -39,7 +39,7 @@ def _SetMenuEntry(Enabled: bool) -> None:
"[Desktop Entry]\nType=Application\nName=SaraSuite\n" "[Desktop Entry]\nType=Application\nName=SaraSuite\n"
"Comment=Install, update and remove Sara programs\n" "Comment=Install, update and remove Sara programs\n"
f"Exec={_AppImage}\nIcon={_MenuIcon}\nTerminal=false\n" f"Exec={_AppImage}\nIcon={_MenuIcon}\nTerminal=false\n"
"Categories=System;\nStartupNotify=true\n" f"Categories=System;\nStartupNotify=true\nStartupWMClass={AppName}\n"
) )
@@ -234,4 +234,7 @@ if __name__ == "__main__":
from Cli import Run from Cli import Run
sys.exit(Run(sys.argv[1:])) sys.exit(Run(sys.argv[1:]))
# The window's app ID, so the desktop matches it to SaraSuite.desktop
# (icon, name) instead of showing it as Flet's generic "com.appveyor.flet".
os.environ.setdefault("FLET_APP_ID", AppName)
ft.run(Main, assets_dir=str(AssetsDir)) ft.run(Main, assets_dir=str(AssetsDir))
+1
View File
@@ -30,6 +30,7 @@ Exec=SaraSuite
Icon=SaraSuite Icon=SaraSuite
Terminal=false Terminal=false
Categories=System; Categories=System;
StartupWMClass=SaraSuite
DESKTOP DESKTOP
mkdir -p dist mkdir -p dist
+3
View File
@@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
# Written by SaraSuite. Runs from the app folder so Flet finds assets/. # Written by SaraSuite. Runs from the app folder so Flet finds assets/.
# The window's app ID, so the desktop matches it to {Name}.desktop (icon, name)
# instead of showing every Flet program as "com.appveyor.flet".
export FLET_APP_ID="{Name}"
cd "{AppDir}" || exit 1 cd "{AppDir}" || exit 1
exec "{Python}" Main.py "$@" exec "{Python}" Main.py "$@"
@@ -8,3 +8,4 @@ Terminal=false
Categories=System;FileManager; Categories=System;FileManager;
MimeType=inode/directory; MimeType=inode/directory;
StartupNotify=true StartupNotify=true
StartupWMClass={Name}
+3
View File
@@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
# Written by SaraSuite. Runs from the app folder so Flet finds assets/. # Written by SaraSuite. Runs from the app folder so Flet finds assets/.
# The window's app ID, so the desktop matches it to {Name}.desktop (icon, name)
# instead of showing every Flet program as "com.appveyor.flet".
export FLET_APP_ID="{Name}"
cd "{AppDir}" || exit 1 cd "{AppDir}" || exit 1
exec "{Python}" Main.py "$@" exec "{Python}" Main.py "$@"
@@ -7,3 +7,4 @@ Icon={AppDir}/assets/Icon.png
Terminal=false Terminal=false
Categories=Utility; Categories=Utility;
StartupNotify=true StartupNotify=true
StartupWMClass={Name}
+3
View File
@@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
# Written by SaraSuite. Runs from the app folder so Flet finds assets/. # Written by SaraSuite. Runs from the app folder so Flet finds assets/.
# The window's app ID, so the desktop matches it to {Name}.desktop (icon, name)
# instead of showing every Flet program as "com.appveyor.flet".
export FLET_APP_ID="{Name}"
cd "{AppDir}" || exit 1 cd "{AppDir}" || exit 1
exec "{Python}" Main.py "$@" exec "{Python}" Main.py "$@"
@@ -7,3 +7,4 @@ Icon={AppDir}/assets/Icon.png
Terminal=false Terminal=false
Categories=Utility;Graphics; Categories=Utility;Graphics;
StartupNotify=true StartupNotify=true
StartupWMClass={Name}