*.desktop: Update to allow footclient and foot to track running instances as separate icons in gnome.

Make windows spawned from Server mode have the app-id of footclient.
Change StartupWMClass to footclient from foot to track app-id change.
This commit is contained in:
jdevdevdev 2023-05-08 23:59:34 +10:00
parent 1ced3ef6dd
commit d76aa539aa
No known key found for this signature in database
GPG key ID: CFA7C1B81166E2CC
2 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no

4
main.c
View file

@ -521,6 +521,9 @@ main(int argc, char *const *argv)
if (conf_app_id != NULL) {
free(conf.app_id);
conf.app_id = xstrdup(conf_app_id);
} else if (as_server) {
free(conf.app_id);
conf.app_id = xstrdup("footclient");
}
if (login_shell)
conf.login_shell = true;
@ -672,6 +675,7 @@ main(int argc, char *const *argv)
if (as_server)
LOG_INFO("running as server; launch terminals by running footclient");
LOG_INFO("app-id %s", conf.app_id);
if (as_server && pid_file != NULL) {
if (!print_pid(pid_file, &unlink_pid_file))
goto out;