diff --git a/CHANGELOG.md b/CHANGELOG.md index f1820317..64b1ac07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,14 @@ ## Unreleased ### Added + +* Command line option `--class`, an alias for `--app-id`. Intended to + be used by scripts and similar that wants to launch terminal + instances in a terminal agnostic way ([#2368][2368]). + +[2368]: https://codeberg.org/dnkl/foot/issues/2368 + + ### Changed * Do not allow codepoints to be merged into grapheme clusters directly diff --git a/client.c b/client.c index befd3ab0..f35453b9 100644 --- a/client.c +++ b/client.c @@ -157,6 +157,7 @@ main(int argc, char *const *argv) {"term", required_argument, NULL, 't'}, {"title", required_argument, NULL, 'T'}, {"app-id", required_argument, NULL, 'a'}, + {"class", required_argument, NULL, 'a'}, {"toplevel-tag", required_argument, NULL, TOPLEVEL_TAG_OPTION}, {"window-size-pixels", required_argument, NULL, 'w'}, {"window-size-chars", required_argument, NULL, 'W'}, diff --git a/doc/foot.1.scd b/doc/foot.1.scd index a190db9b..24d81b5f 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -70,6 +70,9 @@ the foot command line Value to set the *app-id* property on the Wayland window to. Default: _foot_ (normal mode), or _footclient_ (server mode). +*--class*=_ID_ + Alias for *--app-id*. + *toplevel-tag*=_TAG_ Value to set the *toplevel-tag* property on the Wayland window to. The compositor can use this value for session management, diff --git a/doc/footclient.1.scd b/doc/footclient.1.scd index ad865913..92d84c34 100644 --- a/doc/footclient.1.scd +++ b/doc/footclient.1.scd @@ -33,6 +33,9 @@ terminal has terminated. Value to set the *app-id* property on the Wayland window to. Default: _foot_ (normal mode), or _footclient_ (server mode). +*--class*=_ID_ + Alias for *--app-id*. + *toplevel-tag*=_TAG_ Value to set the *toplevel-tag* property on the Wayland window to. The compositor can use this value for session management, diff --git a/main.c b/main.c index 9db77d0c..d9c5dc3c 100644 --- a/main.c +++ b/main.c @@ -216,6 +216,7 @@ main(int argc, char *const *argv) {"term", required_argument, NULL, 't'}, {"title", required_argument, NULL, 'T'}, {"app-id", required_argument, NULL, 'a'}, + {"class", required_argument, NULL, 'a'}, {"toplevel-tag", required_argument, NULL, TOPLEVEL_TAG_OPTION}, {"login-shell", no_argument, NULL, 'L'}, {"working-directory", required_argument, NULL, 'D'},