This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch tytab
in repository terminology.

View the commit online.

commit 3ca64932363a6562cf961ea5ed3d506f476da6ba
Author: [email protected] <[email protected]>
AuthorDate: Sun Mar 29 21:24:19 2026 -0600

    feat: add per-terminal tytab freeze latch
    
    Security layer 2: new escape sequence \033}tf\0 permanently disables
    tytab in the current terminal. Programs rendering untrusted content
    can call 'tytab freeze' to immunize themselves. Bypasses config check
    so it works even when tytab is disabled.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 src/bin/tytab.c | 11 ++++++++++-
 src/bin/win.c   |  9 +++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/bin/tytab.c b/src/bin/tytab.c
index a9365c3e..0155e91f 100644
--- a/src/bin/tytab.c
+++ b/src/bin/tytab.c
@@ -9,12 +9,14 @@ print_usage(const char *argv0)
 {
    printf("Usage: %s " HELP_ARGUMENT_SHORT " name [NAME]\n"
           "       %s " HELP_ARGUMENT_SHORT " new [NAME DIR] [-- CMD...]\n"
+          "       %s " HELP_ARGUMENT_SHORT " freeze\n"
           "\n"
           "  Manage tabs and splits in Terminology.\n"
           "\n"
           "  Commands:\n"
           "    name [NAME]              Set panel name (omit NAME to clear)\n"
           "    new [NAME DIR] [-- CMD]  Create a new tab\n"
+          "    freeze                   Permanently disable tytab in this terminal\n"
           "\n"
           "  NAME       Target panel name\n"
           "  DIR        Split direction: left, right, top, bottom (or l, r, t, b)\n"
@@ -22,7 +24,7 @@ print_usage(const char *argv0)
           "\n"
           HELP_ARGUMENT_DOC "\n"
           "\n",
-          argv0, argv0);
+          argv0, argv0, argv0);
 }
 
 static char
@@ -98,6 +100,13 @@ main(int argc, char **argv)
         if (ty_write(1, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1))
           perror("write");
      }
+   else if (!strcmp(argv[1], "freeze"))
+     {
+        /* tytab freeze */
+        snprintf(tbuf, sizeof(tbuf), "%c}tf", 0x1b);
+        if (ty_write(1, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1))
+          perror("write");
+     }
    else if (!strcmp(argv[1], "new"))
      {
         /* tytab new [NAME DIR] [-- CMD...] */
diff --git a/src/bin/win.c b/src/bin/win.c
index 97004dad..9b7d50ab 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -141,6 +141,7 @@ struct tag_Term
       int       x, y;
    } down;
    double last_keypress_time; /* for anti-bombing, updated on key-down */
+   Eina_Bool tytab_frozen; /* one-way latch: once set, tytab disabled forever */
    int refcnt;
    unsigned char hold : 1;
    unsigned char unswallowed : 1;
@@ -6660,9 +6661,17 @@ _cb_command(void *data,
      }
    else if (cmd[0] == 't') // tab/split escape commands
      {
+        if (cmd[1] == 'f') // freeze: always accepted, bypasses config
+          {
+             term->tytab_frozen = EINA_TRUE;
+             return;
+          }
+
         Config *config_tc = termio_config_get(term->termio);
         if (!config_tc || !config_tc->tytab)
           return;
+        if (term->tytab_frozen)
+          return;
 
         if (cmd[1] == 'n') // name panel: tn;NAME
           {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to