Per-program Flet client app IDs so the dock shows the right icons

This commit is contained in:
sarah committed 2026-10-08 22:43:34 +02:00
1 parent 19bbad33a4
commit 56f10885de
12 files changed
+114 -18

No files matched your search

+5
View File
@@ -25,3 +25,8 @@ Target = "{ApplicationsDir}/SaraSort.desktop"
Path = "{ConfigDir}"
Kind = "Config"
Note = "SaraSort's settings, flowchart layout and your templates"
# Shared with the other Flet programs; see Programs/FletIdentity.py.
[[Templates]]
Source = "../../FletIdentity.py"
Target = "{ProgramDir}/FletIdentity.py"
+4 -3
View File
@@ -1,7 +1,8 @@
#!/bin/sh
# 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}"
# A Flet client copy with the window app ID srhtnin.{Name}, so the desktop
# matches the window to {Name}.desktop (StartupWMClass) instead of showing it
# as "com.appveyor.flet". Empty if that fails: Flet then uses its own client.
export FLET_VIEW_PATH="$("{Python}" "{ProgramDir}/FletIdentity.py" "srhtnin.{Name}")"
cd "{AppDir}" || exit 1
exec "{Python}" Main.py "$@"
+1 -1
View File
@@ -7,4 +7,4 @@ Icon={AppDir}/assets/Icon.png
Terminal=false
Categories=Utility;
StartupNotify=true
StartupWMClass={Name}
StartupWMClass=srhtnin.{Name}