From d76aa539aa55820bc316063d04c074b413babbca Mon Sep 17 00:00:00 2001 From: jdevdevdev Date: Mon, 8 May 2023 23:59:34 +1000 Subject: [PATCH] *.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. --- foot.ini | 2 +- main.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/foot.ini b/foot.ini index 8266b01b..c4f6e153 100644 --- a/foot.ini +++ b/foot.ini @@ -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 diff --git a/main.c b/main.c index 4af200fd..d4d40d91 100644 --- a/main.c +++ b/main.c @@ -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;