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

git pushed a commit to branch tymux
in repository terminology.

View the commit online.

commit 9dec7015baf150ff389832c096e1feacaec6b1de
Author: [email protected] <[email protected]>
AuthorDate: Sun Mar 22 18:42:46 2026 -0600

    refactor: rename all session identifiers to tymux throughout subsystem
    
    Rename all internal identifiers, function names, type names, and
    user-facing strings from "session" to "tymux" to distinguish the
    tymux background terminal feature from the separate layout session
    save/restore feature.
    
    Changes include:
    - File renames: termsession.h/c → termtymux.h/c,
      tymux_session.h/c → termd_tymux.h/c
    - Type renames: TermDSession → TermDTymux, TermSession → TermTymux
    - Function renames: termd_session_* → termd_tymux_*,
      termsession_* → termtymux_*
    - All related identifiers, variables, constants, and includes
    - User-facing messages now use "tymux instance" and
      "background terminal" for clarity instead of "session"
    - meson.build and header guards updated accordingly
    
    This maintains API and behavioral compatibility while improving
    clarity of terminology across the codebase.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 data/test_offscale.edj                     | Bin 0 -> 6346 bytes
 src/bin/ipc.c                              |   2 +-
 src/bin/ipc.h                              |   2 +-
 src/bin/main.c                             |  10 +--
 src/bin/meson.build                        |   4 +-
 src/bin/{tymux_session.c => termd_tymux.c} |  56 ++++++++---------
 src/bin/termd_tymux.h                      |  23 +++++++
 src/bin/termio.c                           |  44 ++++++-------
 src/bin/termio.h                           |   2 +-
 src/bin/termiointernals.h                  |  10 +--
 src/bin/termpty.h                          |   2 +-
 src/bin/termsrv.c                          |  10 +--
 src/bin/termsrv.h                          |  20 +++---
 src/bin/{termsession.c => termtymux.c}     |  96 ++++++++++++++---------------
 src/bin/{termsession.h => termtymux.h}     |  22 +++----
 src/bin/tymux.c                            |  78 +++++++++++------------
 src/bin/tymux_session.h                    |  23 -------
 src/bin/tymuxd.c                           |  40 ++++++------
 src/bin/win.c                              |  14 ++---
 src/bin/win.h                              |   2 +-
 src/tests/test_termsrv.c                   |   8 +--
 21 files changed, 234 insertions(+), 234 deletions(-)

diff --git a/data/test_offscale.edj b/data/test_offscale.edj
new file mode 100644
index 00000000..bcb53a19
Binary files /dev/null and b/data/test_offscale.edj differ
diff --git a/src/bin/ipc.c b/src/bin/ipc.c
index 9384b944..f769d962 100644
--- a/src/bin/ipc.c
+++ b/src/bin/ipc.c
@@ -118,7 +118,7 @@ ipc_init(void)
                                  "startup_id", startup_id, EET_T_STRING);
 #ifdef HAVE_TYMUX
    EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
-                                 "session", session, EET_T_STRING);
+                                 "tymux", tymux, EET_T_STRING);
 #endif
    EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
                                  "x", x, EET_T_INT);
diff --git a/src/bin/ipc.h b/src/bin/ipc.h
index a5a9257c..c3ce6914 100644
--- a/src/bin/ipc.h
+++ b/src/bin/ipc.h
@@ -20,7 +20,7 @@ struct tag_Ipc_Instance
    char *startup_id;
    char *startup_split;
 #ifdef HAVE_TYMUX
-   char *session;    /* --session <name>: connect to tymux session */
+   char *tymux;    /* --tymux <name>: connect to a tymux background terminal */
 #endif
    int x, y, w, h;
    Eina_Bool pos;
diff --git a/src/bin/main.c b/src/bin/main.c
index b647be98..c93bf374 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -422,7 +422,7 @@ main_ipc_new(Ipc_Instance *inst)
                    inst->cd, inst->w, inst->h, inst->hold,
                    inst->title,
 #ifdef HAVE_TYMUX
-                   inst->session
+                   inst->tymux
 #else
                    NULL
 #endif
@@ -530,7 +530,7 @@ static Ecore_Getopt options = {
                               gettext_noop("Do not display wizard on start up")),
 #ifdef HAVE_TYMUX
       ECORE_GETOPT_STORE_STR('\0', "tymux",
-                             gettext_noop("Attach first terminal to a named persistent tymux session")),
+                             gettext_noop("Attach first terminal to a named tymux background terminal")),
 #endif
 
       ECORE_GETOPT_VERSION   ('V', "version"),
@@ -620,7 +620,7 @@ _start(Ipc_Instance *instance, Eina_Bool need_scale_wizard)
                    instance->cd,
                    instance->w, instance->h, instance->hold, instance->title,
 #ifdef HAVE_TYMUX
-                   instance->session
+                   instance->tymux
 #else
                    NULL
 #endif
@@ -872,7 +872,7 @@ elm_main(int argc, char **argv)
      ECORE_GETOPT_VALUE_BOOL(instance.active_links),    /* --active-links */
      ECORE_GETOPT_VALUE_BOOL(no_wizard),                /* --no-wizard */
 #ifdef HAVE_TYMUX
-     ECORE_GETOPT_VALUE_STR(instance.session),          /* --tymux */
+     ECORE_GETOPT_VALUE_STR(instance.tymux),          /* --tymux */
 #endif
 
      ECORE_GETOPT_VALUE_BOOL(quit_option),              /* -v, --version */
@@ -890,7 +890,7 @@ elm_main(int argc, char **argv)
 
 #ifdef HAVE_TYMUX
    /* Prevent SIGPIPE from killing terminology when writing to a socket
-    * whose remote end (tymuxd) has already exited.  termsession_free()
+    * whose remote end (tymuxd) has already exited.  termtymux_free()
     * sends DETACH on teardown; if the daemon is gone the write raises
     * SIGPIPE which — without this — terminates the process immediately. */
    signal(SIGPIPE, SIG_IGN);
diff --git a/src/bin/meson.build b/src/bin/meson.build
index fdf8d53c..641088d8 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -89,7 +89,7 @@ tytest_sources = ['termptyesc.c', 'termptyesc.h',
 if host_os == 'linux'
   terminology_sources += [
       'termsrv.c', 'termsrv.h',
-      'termsession.c', 'termsession.h',
+      'termtymux.c', 'termtymux.h',
   ]
 endif
 
@@ -138,7 +138,7 @@ executable('tysend',
 if host_os == 'linux'
   tymuxd_sources = [
       'tymuxd.c',
-      'tymux_session.c', 'tymux_session.h',
+      'termd_tymux.c', 'termd_tymux.h',
       'termsrv.c', 'termsrv.h',
       'termpty.c', 'termpty.h',
       'termptyesc.c', 'termptyesc.h',
diff --git a/src/bin/tymux_session.c b/src/bin/termd_tymux.c
similarity index 88%
rename from src/bin/tymux_session.c
rename to src/bin/termd_tymux.c
index 28935210..1d46f6db 100644
--- a/src/bin/tymux_session.c
+++ b/src/bin/termd_tymux.c
@@ -14,22 +14,22 @@
 #include <Eina.h>
 #include <Ecore.h>
 
-#include "tymux_session.h"
+#include "termd_tymux.h"
 #include "termpty.h"
 #include "termsrv.h"
 
 /* ── log domain ─────────────────────────────────────────────────── */
 
-static int _log_dom_session = -1;
+static int _log_dom_tymux = -1;
 
 #undef  ERR
 #undef  WRN
 #undef  INF
 #undef  DBG
-#define ERR(...)  EINA_LOG_DOM_ERR(_log_dom_session, __VA_ARGS__)
-#define WRN(...)  EINA_LOG_DOM_WARN(_log_dom_session, __VA_ARGS__)
-#define INF(...)  EINA_LOG_DOM_INFO(_log_dom_session, __VA_ARGS__)
-#define DBG(...)  EINA_LOG_DOM_DBG(_log_dom_session, __VA_ARGS__)
+#define ERR(...)  EINA_LOG_DOM_ERR(_log_dom_tymux, __VA_ARGS__)
+#define WRN(...)  EINA_LOG_DOM_WARN(_log_dom_tymux, __VA_ARGS__)
+#define INF(...)  EINA_LOG_DOM_INFO(_log_dom_tymux, __VA_ARGS__)
+#define DBG(...)  EINA_LOG_DOM_DBG(_log_dom_tymux, __VA_ARGS__)
 
 /* ── memfd_create wrapper ────────────────────────────────────────── */
 
@@ -49,12 +49,12 @@ typedef struct _TermDClient
 {
    int                fd;
    Ecore_Fd_Handler  *handler;
-   TermDSession      *sess;
+   TermDTymux      *sess;
 } TermDClient;
 
-/* ── session state ───────────────────────────────────────────────── */
+/* ── tymux state ───────────────────────────────────────────────── */
 
-struct _TermDSession
+struct _TermDTymux
 {
    char          *name;
    Termpty       *pty;
@@ -82,7 +82,7 @@ _default_config_new(void)
 /* ── shm flush ───────────────────────────────────────────────────── */
 
 static void
-_flush_screen_to_shm(TermDSession *sess)
+_flush_screen_to_shm(TermDTymux *sess)
 {
    Termpty       *ty       = sess->pty;
    TermShmHeader *hdr      = sess->shm;
@@ -99,7 +99,7 @@ _flush_screen_to_shm(TermDSession *sess)
     * whether the alternate screen is in use (ty->altbuf).  Reading
     * ty->screen2 when altbuf==1 would return the stale primary
     * buffer, causing fullscreen apps (htop, vim, less …) to appear
-    * blank in session mode. */
+    * blank in tymux mode. */
    scr      = ty->screen;
    circ_off = ty->circular_offset;
 
@@ -127,14 +127,14 @@ _flush_screen_to_shm(TermDSession *sess)
 
 /* ── forward declarations ────────────────────────────────────────── */
 
-static void _client_remove(TermDSession *sess, TermDClient *client);
+static void _client_remove(TermDTymux *sess, TermDClient *client);
 
 /* ── Termpty callbacks ───────────────────────────────────────────── */
 
 static void
 _pty_change_cb(void *data)
 {
-   TermDSession     *sess = data;
+   TermDTymux     *sess = data;
    TermSrvMsgNotify  pay;
    Eina_List        *l;
    TermDClient      *c;
@@ -150,7 +150,7 @@ _pty_change_cb(void *data)
 static void
 _pty_title_cb(void *data)
 {
-   TermDSession *sess  = data;
+   TermDTymux *sess  = data;
    const char   *title = sess->pty->prop.title;
    Eina_List    *l;
    TermDClient  *c;
@@ -164,7 +164,7 @@ _pty_title_cb(void *data)
 static void
 _pty_bell_cb(void *data)
 {
-   TermDSession *sess = data;
+   TermDTymux *sess = data;
    Eina_List    *l;
    TermDClient  *c;
 
@@ -175,7 +175,7 @@ _pty_bell_cb(void *data)
 static void
 _pty_exit_cb(void *data)
 {
-   TermDSession    *sess = data;
+   TermDTymux    *sess = data;
    TermSrvMsgExit   pay;
    Eina_List       *l;
    TermDClient     *c;
@@ -193,7 +193,7 @@ static Eina_Bool
 _cb_client_data(void *data, Ecore_Fd_Handler *fd_handler EINA_UNUSED)
 {
    TermDClient  *client = data;
-   TermDSession *sess   = client->sess;
+   TermDTymux *sess   = client->sess;
    void         *payload;
    uint32_t      size;
    int           type;
@@ -246,7 +246,7 @@ _cb_client_data(void *data, Ecore_Fd_Handler *fd_handler EINA_UNUSED)
 /* ── client lifecycle ────────────────────────────────────────────── */
 
 static void
-_client_remove(TermDSession *sess, TermDClient *client)
+_client_remove(TermDTymux *sess, TermDClient *client)
 {
    sess->clients = eina_list_remove(sess->clients, client);
    if (client->handler)
@@ -260,19 +260,19 @@ _client_remove(TermDSession *sess, TermDClient *client)
 
 /* ── public API ──────────────────────────────────────────────────── */
 
-TermDSession *
-termd_session_new(const char *name, const char *cmd)
+TermDTymux *
+termd_tymux_new(const char *name, const char *cmd)
 {
-   TermDSession *sess;
+   TermDTymux *sess;
    char          memfd_name[128];
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
 
-   if (_log_dom_session < 0)
+   if (_log_dom_tymux < 0)
      {
-        _log_dom_session = eina_log_domain_register("tymux_session", NULL);
-        if (_log_dom_session < 0)
-          EINA_LOG_ERR("Could not create log domain 'tymux_session'");
+        _log_dom_tymux = eina_log_domain_register("termd_tymux", NULL);
+        if (_log_dom_tymux < 0)
+          EINA_LOG_ERR("Could not create log domain 'termd_tymux'");
      }
 
    sess = calloc(1, sizeof(*sess));
@@ -289,7 +289,7 @@ termd_session_new(const char *name, const char *cmd)
      goto err_config;
 
    /* memfd name is advisory; truncate safely */
-   snprintf(memfd_name, sizeof(memfd_name), "ty-session-%s", name);
+   snprintf(memfd_name, sizeof(memfd_name), "ty-tymux-%s", name);
    sess->shm_fd = _memfd_create(memfd_name, MFD_CLOEXEC);
    if (sess->shm_fd < 0)
      {
@@ -359,7 +359,7 @@ err_name:
 }
 
 void
-termd_session_free(TermDSession *sess)
+termd_tymux_free(TermDTymux *sess)
 {
    TermDClient *c;
 
@@ -398,7 +398,7 @@ termd_session_free(TermDSession *sess)
 }
 
 void
-termd_session_client_add(TermDSession *sess, int cfd)
+termd_tymux_client_add(TermDTymux *sess, int cfd)
 {
    TermDClient *client;
 
diff --git a/src/bin/termd_tymux.h b/src/bin/termd_tymux.h
new file mode 100644
index 00000000..b44de5a6
--- /dev/null
+++ b/src/bin/termd_tymux.h
@@ -0,0 +1,23 @@
+#ifndef TERMINOLOGY_TERMD_TYMUX_H_
+#define TERMINOLOGY_TERMD_TYMUX_H_
+
+#include <stdint.h>
+#include <Eina.h>
+#include "termpty.h"
+#include "termsrv.h"
+
+typedef struct _TermDTymux TermDTymux;
+
+/* Create the tymux instance: fork shell, set up memfd.
+ * cmd may be NULL (uses user's default shell).
+ * Returns NULL on failure. */
+TermDTymux *termd_tymux_new(const char *name, const char *cmd);
+
+/* Free the tymux instance (kills shell, munmaps, closes memfd). */
+void          termd_tymux_free(TermDTymux *sess);
+
+/* Add a connected client fd; takes ownership, sets up Ecore fd handler.
+ * Sends ATTACHED immediately. */
+void          termd_tymux_client_add(TermDTymux *sess, int cfd);
+
+#endif /* TERMINOLOGY_TERMD_TYMUX_H_ */
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 41a0fe13..f91fd4b8 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5,7 +5,7 @@
 #include <Ecore_Input.h>
 
 #include "termio.h"
-#include "termsession.h"
+#include "termtymux.h"
 #include "termiolink.h"
 #include "termpty.h"
 #include "backlog.h"
@@ -546,7 +546,7 @@ termio_config_update(Evas_Object *obj)
 #ifdef HAVE_TYMUX
    /* Shadow pty has no real PTY and no scrollback; only update the config
     * pointer so rendering picks up colour/font state changes. */
-   if (sd->session)
+   if (sd->tymux)
      sd->pty->config = sd->config;
    else
 #endif
@@ -3328,8 +3328,8 @@ _smart_size(Evas_Object *obj, int w, int h, Eina_Bool force)
                                        sd->font.chh * sd->grid.h);
    termio_sel_set(sd, EINA_FALSE);
 #ifdef HAVE_TYMUX
-   if (sd->session)
-       termsession_resize(sd->session, w, h);
+   if (sd->tymux)
+       termtymux_resize(sd->tymux, w, h);
    else
 #endif
        termpty_resize(sd->pty, w, h);
@@ -3526,16 +3526,16 @@ _smart_del(Evas_Object *obj)
    if (sd->mouseover_delay) ecore_timer_del(sd->mouseover_delay);
    eina_stringshare_del(sd->font.name);
 #ifdef HAVE_TYMUX
-   if (sd->session)
+   if (sd->tymux)
      {
-        termsession_free(sd->session);
-        sd->pty = NULL;   /* freed inside termsession_free */
+        termtymux_free(sd->tymux);
+        sd->pty = NULL;   /* freed inside termtymux_free */
      }
    else
 #endif
    if (sd->pty) termpty_free(sd->pty);
 #ifdef HAVE_TYMUX
-   eina_stringshare_del(sd->session_name);
+   eina_stringshare_del(sd->tymux_name);
 #endif
    eina_stringshare_del(sd->link.string);
    if (sd->glayer) evas_object_del(sd->glayer);
@@ -4275,7 +4275,7 @@ Evas_Object *
 termio_add(Evas_Object *win, Config *config,
            const char *cmd, Eina_Bool login_shell, const char *cd,
            int w, int h, Term *term, const char *title,
-           const char *session_name)
+           const char *tymux_name)
 {
    Evas *e;
    Evas_Object *obj, *g;
@@ -4327,27 +4327,27 @@ termio_add(Evas_Object *win, Config *config,
 
    window_id = elm_win_window_id_get(win);
 #ifdef HAVE_TYMUX
-   if (session_name && *session_name)
+   if (tymux_name && *tymux_name)
      {
-        sd->session_name = eina_stringshare_add(session_name);
+        sd->tymux_name = eina_stringshare_add(tymux_name);
         Termpty *spty = NULL;
-        sd->session = termsession_attach(session_name, w, h, config, &spty);
-        if (!sd->session)
+        sd->tymux = termtymux_attach(tymux_name, w, h, config, &spty);
+        if (!sd->tymux)
           {
-             ERR("Could not attach to tymux session '%s'", session_name);
+             ERR("Could not attach to tymux '%s'", tymux_name);
              evas_object_del(obj);
              return NULL;
           }
         sd->pty = spty;
         sd->pty->obj = obj;
-        sd->session->cb_change.func = _smart_pty_change;
-        sd->session->cb_change.data = ""
-        sd->session->cb_title.func  = _smart_pty_title;
-        sd->session->cb_title.data  = ""
-        sd->session->cb_bell.func   = _smart_pty_bell;
-        sd->session->cb_bell.data   = ""
-        sd->session->cb_exit.func   = _smart_pty_exited;
-        sd->session->cb_exit.data   = ""
+        sd->tymux->cb_change.func = _smart_pty_change;
+        sd->tymux->cb_change.data = ""
+        sd->tymux->cb_title.func  = _smart_pty_title;
+        sd->tymux->cb_title.data  = ""
+        sd->tymux->cb_bell.func   = _smart_pty_bell;
+        sd->tymux->cb_bell.data   = ""
+        sd->tymux->cb_exit.func   = _smart_pty_exited;
+        sd->tymux->cb_exit.data   = ""
      }
    else
 #endif
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 4d3cc780..83bbfbbd 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -13,7 +13,7 @@
 Evas_Object *termio_add(Evas_Object *parent, Config *config, const char *cmd,
                         Eina_Bool login_shell, const char *cd, int w, int h,
                         Term *term, const char *title,
-                        const char *session_name);
+                        const char *tymux_name);
 Termio *termio_get_from_obj(Evas_Object *obj);
 void         termio_win_set(Evas_Object *obj, Evas_Object *win);
 void         termio_theme_set(Evas_Object *obj, Evas_Object *theme);
diff --git a/src/bin/termiointernals.h b/src/bin/termiointernals.h
index 143b6f69..61417573 100644
--- a/src/bin/termiointernals.h
+++ b/src/bin/termiointernals.h
@@ -5,7 +5,7 @@
 typedef void Term;
 #endif
 
-#include "termsession.h"
+#include "termtymux.h"
 
 typedef struct tag_Termio Termio;
 
@@ -77,10 +77,10 @@ struct tag_Termio
 
    Termpty *pty;
 #ifdef HAVE_TYMUX
-   TermSession *session;        /* non-NULL in session mode */
-   /* session_name: tymux session name (eina_stringshare).  Kept for display
-    * purposes (e.g. window title) even after the session fd is open. */
-   const char  *session_name;   /* eina_stringshare */
+   TermTymux *tymux;        /* non-NULL in tymux mode */
+   /* tymux_name: tymux name (eina_stringshare).  Kept for display
+    * purposes (e.g. window title) even after the tymux fd is open. */
+   const char  *tymux_name;   /* eina_stringshare */
 #endif
    Ecore_Animator *anim;
    Ecore_Timer *delayed_size_timer;
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index dd573296..94c2947d 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -156,7 +156,7 @@ struct tag_Termpty
       } change, set_title, set_icon, cancel_sel, exited, bell, command;
    } cb;
    /* Write hook: if set, termpty_write() calls this instead of buffering.
-    * Used by session mode to forward input to the socket.
+    * Used by tymux mode to forward input to the socket.
     * func must not free buf. */
    struct {
       void (*func)(const char *buf, int len, void *data);
diff --git a/src/bin/termsrv.c b/src/bin/termsrv.c
index 47df5a10..6ebc1d80 100644
--- a/src/bin/termsrv.c
+++ b/src/bin/termsrv.c
@@ -29,23 +29,23 @@ _xdg(void)
 }
 
 int
-termsrv_socket_path(const char *session_name, char *buf, size_t bufsz)
+termsrv_socket_path(const char *tymux_name, char *buf, size_t bufsz)
 {
-    if (!session_name || session_name[0] == '\0' || strchr(session_name, '/')) return -1;
+    if (!tymux_name || tymux_name[0] == '\0' || strchr(tymux_name, '/')) return -1;
     int n = snprintf(buf, bufsz, "%s/terminology/tymux/%s.sock",
-                     _xdg(), session_name);
+                     _xdg(), tymux_name);
     return (n > 0 && (size_t)n < bufsz) ? 0 : -1;
 }
 
 int
-termsrv_sessions_dir(char *buf, size_t bufsz)
+termsrv_tymux_dir(char *buf, size_t bufsz)
 {
     int n = snprintf(buf, bufsz, "%s/terminology/tymux", _xdg());
     return (n > 0 && (size_t)n < bufsz) ? 0 : -1;
 }
 
 int
-termsrv_ensure_sessions_dir(void)
+termsrv_ensure_tymux_dir(void)
 {
     char buf[512];
     /* $XDG/terminology */
diff --git a/src/bin/termsrv.h b/src/bin/termsrv.h
index c6b7de16..f8da7214 100644
--- a/src/bin/termsrv.h
+++ b/src/bin/termsrv.h
@@ -46,7 +46,7 @@ typedef struct {
 /* ── IPC messages ───────────────────────────────────────────────── */
 
 typedef enum {
-    TSRV_MSG_ATTACH   = 1, /* client → server: attach to this session        */
+    TSRV_MSG_ATTACH   = 1, /* client → server: attach to this tymux instance */
     TSRV_MSG_ATTACHED = 2, /* server → client: cols/rows + memfd via SCM_RIGHTS */
     TSRV_MSG_DETACH   = 3, /* client → server: clean disconnect               */
     TSRV_MSG_INPUT    = 4, /* client → server: raw PTY bytes                  */
@@ -54,7 +54,7 @@ typedef enum {
     TSRV_MSG_NOTIFY   = 6, /* server → client: write_seq updated              */
     TSRV_MSG_TITLE    = 7, /* server → client: new window title               */
     TSRV_MSG_BELL     = 8, /* server → client: BEL                           */
-    TSRV_MSG_EXIT     = 9, /* server → client: session ended, exit code       */
+    TSRV_MSG_EXIT     = 9, /* server → client: tymux ended, exit code         */
 } TermSrvMsgType;
 
 /* Every message starts with this 8-byte header */
@@ -91,34 +91,34 @@ typedef struct {
  * ever approach this; it guards against a malformed hdr.size of ~4 GB. */
 #define TERMSRV_MAX_MSG_PAYLOAD (1u << 20)  /* 1 MiB */
 
-/* ── session name ───────────────────────────────────────────────── */
+/* ── tymux name ───────────────────────────────────────────────── */
 
-/* Maximum length of a session name (excluding null terminator).
+/* Maximum length of a tymux name (excluding null terminator).
  * Must be safe as a filename component. */
-#define TSRV_MAX_SESSION_NAME 64
+#define TSRV_MAX_TYMUX_NAME 64
 
 /* ── socket paths ───────────────────────────────────────────────── */
 
 /*
- * Fill buf with the socket path for a named session:
+ * Fill buf with the socket path for a named tymux instance:
  *   $XDG_RUNTIME_DIR/terminology/tymux/<name>.sock
  * Falls back to /tmp if XDG_RUNTIME_DIR is unset.
  * Returns 0 on success, -1 if buf too small or name contains '/'.
  */
-int termsrv_socket_path(const char *session_name, char *buf, size_t bufsz);
+int termsrv_socket_path(const char *tymux_name, char *buf, size_t bufsz);
 
 /*
- * Fill buf with the sessions directory path:
+ * Fill buf with the tymux directory path:
  *   $XDG_RUNTIME_DIR/terminology/tymux
  * Returns 0 on success, -1 if buf too small.
  */
-int termsrv_sessions_dir(char *buf, size_t bufsz);
+int termsrv_tymux_dir(char *buf, size_t bufsz);
 
 /*
  * Create $XDG_RUNTIME_DIR/terminology/tymux/ (and parents) if absent.
  * Returns 0 on success, -1 on error (errno set).
  */
-int termsrv_ensure_sessions_dir(void);
+int termsrv_ensure_tymux_dir(void);
 
 /* ── message I/O ────────────────────────────────────────────────── */
 
diff --git a/src/bin/termsession.c b/src/bin/termtymux.c
similarity index 85%
rename from src/bin/termsession.c
rename to src/bin/termtymux.c
index e2ebb692..037e84ab 100644
--- a/src/bin/termsession.c
+++ b/src/bin/termtymux.c
@@ -1,5 +1,5 @@
 #include "private.h"
-#include "termsession.h"
+#include "termtymux.h"
 #include "termsrv.h"
 
 #ifdef HAVE_TYMUX
@@ -22,16 +22,16 @@
 /* ── write_cb: forward input bytes to daemon via TSRV_MSG_INPUT ─────── */
 
 static void
-_session_write_cb(const char *buf, int len, void *data)
+_tymux_write_cb(const char *buf, int len, void *data)
 {
-   TermSession *ts = data;
+   TermTymux *ts = data;
 
    if (!ts || ts->sock_fd < 0 || len <= 0)
      return;
 
    if (termsrv_msg_send(ts->sock_fd, TSRV_MSG_INPUT,
                         buf, (uint32_t)len) < 0)
-     ERR("termsession: failed to send INPUT: %s", strerror(errno));
+     ERR("termtymux: failed to send INPUT: %s", strerror(errno));
 }
 
 /* ── shadow Termpty ─────────────────────────────────────────────────── */
@@ -97,8 +97,8 @@ _shadow_pty_new(int cols, int rows, Config *config)
      }
    ty->hl.size = HL_LINKS_MAX;
 
-   /* write_cb is intentionally left unset here; the caller (termsession_attach)
-    * wires it once the TermSession is fully constructed. */
+   /* write_cb is intentionally left unset here; the caller (termtymux_attach)
+    * wires it once the TermTymux is fully constructed. */
 
    return ty;
 }
@@ -136,7 +136,7 @@ _shadow_pty_free(Termpty *ty)
 /* ── sync: copy shm cells into shadow pty ───────────────────────────── */
 
 static void
-_sync_shadow(TermSession *ts)
+_sync_shadow(TermTymux *ts)
 {
    TermShmHeader *shm = ts->shm;
    Termpty       *ty  = ts->shadow_pty;
@@ -163,7 +163,7 @@ _sync_shadow(TermSession *ts)
         s1 = realloc(ty->screen, new_sz);
         if (!s1)
           {
-             ERR("termsession: realloc screen failed");
+             ERR("termtymux: realloc screen failed");
              return;
           }
         ty->screen = s1;
@@ -171,7 +171,7 @@ _sync_shadow(TermSession *ts)
         s2 = realloc(ty->screen2, new_sz);
         if (!s2)
           {
-             ERR("termsession: realloc screen2 failed");
+             ERR("termtymux: realloc screen2 failed");
              /* screen was already reallocated (possibly shrunk); update
               * dimensions so w*h matches what screen can hold. screen2
               * may be over-allocated (old size) which is harmless. */
@@ -200,9 +200,9 @@ _sync_shadow(TermSession *ts)
 /* ── fd handler: receive messages from daemon ───────────────────────── */
 
 static Eina_Bool
-_cb_session_data(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
+_cb_tymux_data(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
 {
-   TermSession *ts = data;
+   TermTymux *ts = data;
    void        *payload = NULL;
    uint32_t     size    = 0;
    int          type;
@@ -215,7 +215,7 @@ _cb_session_data(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
      }
    if (type < 0)
      {
-        ERR("termsession: recv error, assuming daemon exit");
+        ERR("termtymux: recv error, assuming daemon exit");
         if (ts->cb_exit.func)
           ts->cb_exit.func(ts->cb_exit.data);
         free(payload);
@@ -265,7 +265,7 @@ _cb_session_data(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
         return ECORE_CALLBACK_CANCEL;
 
       default:
-        WRN("termsession: unexpected message type %d", type);
+        WRN("termtymux: unexpected message type %d", type);
         break;
      }
 
@@ -277,11 +277,11 @@ _cb_session_data(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
 
 /*
  * Fork, setsid, redirect stdio to /dev/null, and exec tymuxd with the
- * session name.  Then poll for the socket to appear (up to 3 s).
+ * tymux name.  Then poll for the socket to appear (up to 3 s).
  * Returns 0 once the socket is reachable, -1 on timeout.
  */
 static int
-_ensure_daemon(const char *session_name, const char *sock_path)
+_ensure_daemon(const char *tymux_name, const char *sock_path)
 {
    struct timespec  ts_sleep;
    int              i;
@@ -312,7 +312,7 @@ _ensure_daemon(const char *session_name, const char *sock_path)
    child = fork();
    if (child < 0)
      {
-        ERR("termsession: fork failed: %s", strerror(errno));
+        ERR("termtymux: fork failed: %s", strerror(errno));
         return -1;
      }
 
@@ -344,9 +344,9 @@ _ensure_daemon(const char *session_name, const char *sock_path)
          * and other restricted environments (where PACKAGE_BIN_DIR may not
          * be in PATH) can still spawn the daemon. */
         execl(PACKAGE_BIN_DIR "/tymuxd",
-              "tymuxd", session_name, (char *)NULL);
+              "tymuxd", tymux_name, (char *)NULL);
         /* Fallback: search PATH in case the binary is in a custom location */
-        execlp("tymuxd", "tymuxd", session_name, (char *)NULL);
+        execlp("tymuxd", "tymuxd", tymux_name, (char *)NULL);
         /* If both exec calls fail, exit without running atexit handlers */
         _exit(127);
      }
@@ -381,14 +381,14 @@ _ensure_daemon(const char *session_name, const char *sock_path)
         close(probe);
      }
 
-   ERR("termsession: daemon did not create socket within 3 s: %s", sock_path);
+   ERR("termtymux: daemon did not create socket within 3 s: %s", sock_path);
    return -1;
 }
 
 /* ── public API ─────────────────────────────────────────────────────── */
 
-TermSession *
-termsession_attach(const char *session_name,
+TermTymux *
+termtymux_attach(const char *tymux_name,
                    int cols, int rows,
                    Config *config,
                    Termpty **shadow_pty_out)
@@ -399,15 +399,15 @@ termsession_attach(const char *session_name,
    int               shm_fd  = -1;
    uint32_t          srv_cols, srv_rows;
    TermShmHeader    *shm  = MAP_FAILED;
-   TermSession      *ts   = NULL;
+   TermTymux      *ts   = NULL;
    Termpty          *ty   = NULL;
 
-   if (!session_name || !shadow_pty_out)
+   if (!tymux_name || !shadow_pty_out)
      return NULL;
 
-   if (termsrv_socket_path(session_name, sock_path, sizeof(sock_path)) < 0)
+   if (termsrv_socket_path(tymux_name, sock_path, sizeof(sock_path)) < 0)
      {
-        ERR("termsession: session name too long or invalid: %s", session_name);
+        ERR("termtymux: tymux name too long or invalid: %s", tymux_name);
         return NULL;
      }
 
@@ -415,7 +415,7 @@ termsession_attach(const char *session_name,
    sock_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
    if (sock_fd < 0)
      {
-        ERR("termsession: socket(): %s", strerror(errno));
+        ERR("termtymux: socket(): %s", strerror(errno));
         return NULL;
      }
 
@@ -428,30 +428,30 @@ termsession_attach(const char *session_name,
      {
         if (errno == ENOENT || errno == ECONNREFUSED)
           {
-             if (_ensure_daemon(session_name, sock_path) < 0)
+             if (_ensure_daemon(tymux_name, sock_path) < 0)
                goto fail;
 
              if (connect(sock_fd, (struct sockaddr *)&addr,
                          sizeof(addr)) < 0)
                {
-                  ERR("termsession: connect after daemon start: %s",
+                  ERR("termtymux: connect after daemon start: %s",
                       strerror(errno));
                   goto fail;
                }
           }
         else
           {
-             ERR("termsession: connect(%s): %s", sock_path, strerror(errno));
+             ERR("termtymux: connect(%s): %s", sock_path, strerror(errno));
              goto fail;
           }
      }
 
-   /* Send ATTACH with session name as payload */
+   /* Send ATTACH with tymux name as payload */
    if (termsrv_msg_send(sock_fd, TSRV_MSG_ATTACH,
-                        session_name,
-                        (uint32_t)strlen(session_name)) < 0)
+                        tymux_name,
+                        (uint32_t)strlen(tymux_name)) < 0)
      {
-        ERR("termsession: send ATTACH: %s", strerror(errno));
+        ERR("termtymux: send ATTACH: %s", strerror(errno));
         goto fail;
      }
 
@@ -459,7 +459,7 @@ termsession_attach(const char *session_name,
    if (termsrv_recv_attached(sock_fd, &shm_fd,
                              &srv_cols, &srv_rows) < 0)
      {
-        ERR("termsession: recv ATTACHED failed");
+        ERR("termtymux: recv ATTACHED failed");
         goto fail;
      }
 
@@ -470,7 +470,7 @@ termsession_attach(const char *session_name,
    shm_fd = -1;
    if (shm == MAP_FAILED)
      {
-        ERR("termsession: mmap shm: %s", strerror(errno));
+        ERR("termtymux: mmap shm: %s", strerror(errno));
         goto fail;
      }
 
@@ -478,7 +478,7 @@ termsession_attach(const char *session_name,
    if (shm->magic != TERMSRV_SHM_MAGIC ||
        shm->version != TERMSRV_SHM_VERSION)
      {
-        ERR("termsession: shm magic/version mismatch");
+        ERR("termtymux: shm magic/version mismatch");
         goto fail;
      }
 
@@ -487,14 +487,14 @@ termsession_attach(const char *session_name,
    ty = _shadow_pty_new(cols, rows, config);
    if (!ty)
      {
-        ERR("termsession: failed to allocate shadow pty");
+        ERR("termtymux: failed to allocate shadow pty");
         goto fail;
      }
 
-   ts = calloc(1, sizeof(TermSession));
+   ts = calloc(1, sizeof(TermTymux));
    if (!ts)
      {
-        ERR("termsession: calloc TermSession");
+        ERR("termtymux: calloc TermTymux");
         goto fail;
      }
 
@@ -505,7 +505,7 @@ termsession_attach(const char *session_name,
    ts->last_seq   = 0;
 
    /* Now that ts is ready, wire the write_cb */
-   ty->write_cb.func = _session_write_cb;
+   ty->write_cb.func = _tymux_write_cb;
    ty->write_cb.data = ""
 
    /* Initial sync from shm */
@@ -514,22 +514,22 @@ termsession_attach(const char *session_name,
 
    /* Switch to non-blocking mode before handing fd to Ecore.  The
     * synchronous handshake (connect/ATTACH/ATTACHED) is already done;
-    * from here on _cb_session_data must never block the main loop. */
+    * from here on _cb_tymux_data must never block the main loop. */
    {
       int flags = fcntl(sock_fd, F_GETFL, 0);
       if (flags < 0 || fcntl(sock_fd, F_SETFL, flags | O_NONBLOCK) < 0)
-        WRN("termsession: could not set O_NONBLOCK on socket: %s",
+        WRN("termtymux: could not set O_NONBLOCK on socket: %s",
             strerror(errno));
    }
 
    /* Register Ecore fd handler for incoming messages */
    ts->handler = ecore_main_fd_handler_add(sock_fd,
                                            ECORE_FD_READ | ECORE_FD_ERROR,
-                                           _cb_session_data, ts,
+                                           _cb_tymux_data, ts,
                                            NULL, NULL);
    if (!ts->handler)
      {
-        ERR("termsession: ecore_main_fd_handler_add failed");
+        ERR("termtymux: ecore_main_fd_handler_add failed");
         goto fail;
      }
 
@@ -556,7 +556,7 @@ fail:
 }
 
 void
-termsession_free(TermSession *ts)
+termtymux_free(TermTymux *ts)
 {
    if (!ts)
      return;
@@ -573,7 +573,7 @@ termsession_free(TermSession *ts)
     * socket whose remote end has already closed raises SIGPIPE (caught by
     * the SIG_IGN set in elm_main) and returns an error; if we deleted the
     * handler after the send, any pending data in the kernel buffer could
-    * still fire _cb_session_data on the next main-loop iteration. */
+    * still fire _cb_tymux_data on the next main-loop iteration. */
    if (ts->handler)
      {
         ecore_main_fd_handler_del(ts->handler);
@@ -603,7 +603,7 @@ termsession_free(TermSession *ts)
 }
 
 void
-termsession_resize(TermSession *ts, int cols, int rows)
+termtymux_resize(TermTymux *ts, int cols, int rows)
 {
    TermSrvMsgResize payload;
 
@@ -615,7 +615,7 @@ termsession_resize(TermSession *ts, int cols, int rows)
 
    if (termsrv_msg_send(ts->sock_fd, TSRV_MSG_RESIZE,
                         &payload, sizeof(payload)) < 0)
-     ERR("termsession: send RESIZE: %s", strerror(errno));
+     ERR("termtymux: send RESIZE: %s", strerror(errno));
 }
 
 #endif /* HAVE_TYMUX */
diff --git a/src/bin/termsession.h b/src/bin/termtymux.h
similarity index 64%
rename from src/bin/termsession.h
rename to src/bin/termtymux.h
index a6af826d..51a04313 100644
--- a/src/bin/termsession.h
+++ b/src/bin/termtymux.h
@@ -1,5 +1,5 @@
-#ifndef TERMINOLOGY_TERMSESSION_H_
-#define TERMINOLOGY_TERMSESSION_H_
+#ifndef TERMINOLOGY_TERMTYMUX_H_
+#define TERMINOLOGY_TERMTYMUX_H_
 
 #include "config.h"
 
@@ -12,9 +12,9 @@
 #include "termpty.h"
 #include "termsrv.h"
 
-typedef struct _TermSession TermSession;
+typedef struct _TermTymux TermTymux;
 
-struct _TermSession {
+struct _TermTymux {
    int            sock_fd;
    TermShmHeader *shm;
    size_t         shm_size;
@@ -23,7 +23,7 @@ struct _TermSession {
 
    Ecore_Fd_Handler *handler;
 
-   /* Callbacks — set these after termsession_attach() returns,
+   /* Callbacks — set these after termtymux_attach() returns,
     * before the Ecore main loop fires. */
    struct {
       void (*func)(void *data);
@@ -32,22 +32,22 @@ struct _TermSession {
 };
 
 /*
- * Connect to tymuxd for the named session.
+ * Connect to tymuxd for the named tymux instance.
  * If the daemon is not running, spawns it and waits up to 3 s.
  * On success *shadow_pty_out is ready for rendering.
- * Do NOT call termpty_free() on it — use termsession_free().
+ * Do NOT call termpty_free() on it — use termtymux_free().
  * Returns NULL on failure.
  */
-TermSession *termsession_attach(const char *session_name,
+TermTymux *termtymux_attach(const char *tymux_name,
                                 int cols, int rows,
                                 Config *config,
                                 Termpty **shadow_pty_out);
 
 /* Send DETACH, munmap, close socket, free shadow Termpty. */
-void termsession_free(TermSession *ts);
+void termtymux_free(TermTymux *ts);
 
 /* Send a resize event to the daemon. */
-void termsession_resize(TermSession *ts, int cols, int rows);
+void termtymux_resize(TermTymux *ts, int cols, int rows);
 
 #endif /* HAVE_TYMUX */
-#endif /* TERMINOLOGY_TERMSESSION_H_ */
+#endif /* TERMINOLOGY_TERMTYMUX_H_ */
diff --git a/src/bin/tymux.c b/src/bin/tymux.c
index b9ba8235..caa87655 100644
--- a/src/bin/tymux.c
+++ b/src/bin/tymux.c
@@ -1,5 +1,5 @@
 /*
- * tymux — lightweight CLI front-end for tymuxd session management.
+ * tymux — lightweight CLI front-end for managing persistent tymux terminals.
  *
  * Pure POSIX, no EFL dependency.  Path helpers are duplicated inline to
  * keep the binary self-contained (termsrv.h pulls in EFL types via
@@ -31,7 +31,7 @@
 
 /* ── path helpers (mirrors termsrv.c, no EFL) ───────────────────────── */
 
-#define TYMUX_MAX_SESSION_NAME 64  /* must match TSRV_MAX_SESSION_NAME in termsrv.h */
+#define TYMUX_MAX_NAME 64  /* must match TSRV_MAX_TYMUX_NAME in termsrv.h */
 
 static const char *
 _xdg(void)
@@ -49,7 +49,7 @@ _socket_path(const char *name, char *buf, size_t bufsz)
 }
 
 static int
-_sessions_dir(char *buf, size_t bufsz)
+_tymux_dir(char *buf, size_t bufsz)
 {
    int n = snprintf(buf, bufsz, "%s/terminology/tymux", _xdg());
    return (n > 0 && (size_t)n < bufsz) ? 0 : -1;
@@ -62,7 +62,7 @@ _sessions_dir(char *buf, size_t bufsz)
  * On ECONNREFUSED the socket file is stale — unlink it and return 0.
  */
 static int
-_session_is_live(const char *sock_path)
+_tymux_is_live(const char *sock_path)
 {
    int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
    if (fd < 0) return 0;
@@ -833,17 +833,17 @@ static int
 cmd_list(void)
 {
    char dir[512];
-   if (_sessions_dir(dir, sizeof(dir)) != 0)
+   if (_tymux_dir(dir, sizeof(dir)) != 0)
      {
-        fprintf(stderr, "tymux: failed to build sessions dir path\n");
+        fprintf(stderr, "tymux: failed to build tymux directory path\n");
         return 1;
      }
 
    DIR *d = opendir(dir);
    if (!d)
      {
-        /* Directory not existing just means no sessions yet. */
-        printf("No active sessions.\n");
+        /* Directory not existing just means no tymux instances yet. */
+        printf("No active tymux instances.\n");
         return 0;
      }
 
@@ -861,21 +861,21 @@ cmd_list(void)
         int n = snprintf(sock_path, sizeof(sock_path), "%s/%s", dir, name);
         if (n <= 0 || (size_t)n >= sizeof(sock_path)) continue;
 
-        if (!_session_is_live(sock_path)) continue;
+        if (!_tymux_is_live(sock_path)) continue;
 
         if (!found)
           {
-             printf("Active sessions:\n");
+             printf("Active tymux instances:\n");
              found = 1;
           }
 
-        /* Print session name (strip the ".sock" suffix). */
+        /* Print tymux name (strip the ".sock" suffix). */
         printf("  %.*s\n", (int)(len - 5), name);
      }
    closedir(d);
 
    if (!found)
-     printf("No active sessions.\n");
+     printf("No active tymux instances.\n");
 
    return 0;
 }
@@ -889,22 +889,22 @@ cmd_new(int argc, char **argv)
    if (argc >= 3)
      name = argv[2];
 
-   /* Warn if we are already inside a tymux session (same check as cmd_attach). */
+   /* Warn if we are already inside a tymux instance (same check as cmd_attach). */
    {
       const char *current = getenv("TYMUX_SESSION");
       if (current)
-        fprintf(stderr, "tymux: warning: already inside session '%s'\n", current);
+        fprintf(stderr, "tymux: warning: already inside tymux '%s'\n", current);
    }
 
-   if (strlen(name) > TYMUX_MAX_SESSION_NAME)
+   if (strlen(name) > TYMUX_MAX_NAME)
      {
-        fprintf(stderr, "tymux: session name too long (max %d chars)\n",
-                TYMUX_MAX_SESSION_NAME);
+        fprintf(stderr, "tymux: name too long (max %d chars)\n",
+                TYMUX_MAX_NAME);
         return 1;
      }
    if (strchr(name, '/'))
      {
-        fprintf(stderr, "tymux: session name must not contain '/'\n");
+        fprintf(stderr, "tymux: name must not contain '/'\n");
         return 1;
      }
 
@@ -915,9 +915,9 @@ cmd_new(int argc, char **argv)
         return 1;
      }
 
-   if (_session_is_live(sock_path))
+   if (_tymux_is_live(sock_path))
      {
-        fprintf(stderr, "tymux: session '%s' is already active.\n"
+        fprintf(stderr, "tymux: '%s' is already running.\n"
                         "Use: tymux attach %s\n", name, name);
         return 1;
      }
@@ -970,17 +970,17 @@ cmd_new(int argc, char **argv)
    while (attempts-- > 0)
      {
         nanosleep(&ts, NULL);
-        if (_session_is_live(sock_path)) { ready = 1; break; }
+        if (_tymux_is_live(sock_path)) { ready = 1; break; }
      }
 
    if (!ready)
      {
-        fprintf(stderr, "tymux: tymuxd did not start in time for session '%s'\n",
+        fprintf(stderr, "tymux: tymuxd did not start in time for '%s'\n",
                 name);
         return 1;
      }
 
-   printf("Session '%s' created.\n", name);
+   printf("Tymux '%s' created.\n", name);
 
    /* Attach inline — reuse cmd_attach which acts as a terminal proxy. */
    /* Build a synthetic argv for cmd_attach: "attach <name>" */
@@ -1001,24 +1001,24 @@ cmd_attach(int argc, char **argv)
 {
    if (argc < 3)
      {
-        fprintf(stderr, "tymux attach: session name required\n");
-        fprintf(stderr, "Usage: tymux attach <session-name>\n");
+        fprintf(stderr, "tymux attach: name required\n");
+        fprintf(stderr, "Usage: tymux attach <name>\n");
         return 1;
      }
 
    const char *name = argv[2];
 
-   if (strlen(name) > TYMUX_MAX_SESSION_NAME)
+   if (strlen(name) > TYMUX_MAX_NAME)
      {
-        fprintf(stderr, "tymux: session name too long (max %d chars)\n",
-                TYMUX_MAX_SESSION_NAME);
+        fprintf(stderr, "tymux: name too long (max %d chars)\n",
+                TYMUX_MAX_NAME);
         return 1;
      }
 
-   /* Warn if we are already inside a tymux session. */
+   /* Warn if we are already inside a tymux instance. */
    if (getenv("TYMUX_SESSION"))
      fprintf(stderr,
-             "tymux: warning: already inside tymux session '%s'; "
+             "tymux: warning: already inside tymux '%s'; "
              "nesting may cause issues\n",
              getenv("TYMUX_SESSION"));
 
@@ -1029,9 +1029,9 @@ cmd_attach(int argc, char **argv)
         return 1;
      }
 
-   if (!_session_is_live(sock_path))
+   if (!_tymux_is_live(sock_path))
      {
-        fprintf(stderr, "tymux: no active session named '%s'\n", name);
+        fprintf(stderr, "tymux: no running tymux named '%s'\n", name);
         return 1;
      }
 
@@ -1269,7 +1269,7 @@ cmd_attach(int argc, char **argv)
                    {
                       char exitmsg[64];
                       int len = snprintf(exitmsg, sizeof(exitmsg),
-                                         "\r\n[tymux: session ended]\r\n");
+                                         "\r\n[tymux: background terminal exited]\r\n");
                       if (len > 0)
                         write(STDOUT_FILENO, exitmsg, (size_t)len);
                    }
@@ -1313,18 +1313,18 @@ usage(const char *prog)
    printf("Usage: %s <command> [args]\n"
           "\n"
           "Commands:\n"
-          "  list                  List all active tymux sessions\n"
-          "  new  [name]           Start a new session (default name: \"default\")\n"
+          "  list                  List running tymux background terminals\n"
+          "  new  [name]           Start a new background terminal (default name: \"default\")\n"
           "                        then launch terminology attached to it\n"
-          "  attach <name>         Attach to an existing session inline\n"
+          "  attach <name>         Attach to a running background terminal\n"
           "                        (takes over the current terminal, like tmux attach)\n"
           "                        Detach with Ctrl+\\ (Ctrl-backslash)\n"
           "\n"
           "Environment:\n"
-          "  XDG_RUNTIME_DIR       Base directory for session sockets\n"
+          "  XDG_RUNTIME_DIR       Base directory for tymux sockets\n"
           "                        (default: /tmp)\n"
-          "  TYMUX_SESSION         Set by tymux to the active session name;\n"
-          "                        used to warn about nested sessions\n",
+          "  TYMUX_SESSION         Set by tymux to the current tymux name;\n"
+          "                        used to detect nesting\n",
           prog);
 }
 
diff --git a/src/bin/tymux_session.h b/src/bin/tymux_session.h
deleted file mode 100644
index 682a4d7b..00000000
--- a/src/bin/tymux_session.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef TERMINOLOGY_TYMUX_SESSION_H_
-#define TERMINOLOGY_TYMUX_SESSION_H_
-
-#include <stdint.h>
-#include <Eina.h>
-#include "termpty.h"
-#include "termsrv.h"
-
-typedef struct _TermDSession TermDSession;
-
-/* Create the session: fork shell, set up memfd.
- * cmd may be NULL (uses user's default shell).
- * Returns NULL on failure. */
-TermDSession *termd_session_new(const char *name, const char *cmd);
-
-/* Free the session (kills shell, munmaps, closes memfd). */
-void          termd_session_free(TermDSession *sess);
-
-/* Add a connected client fd; takes ownership, sets up Ecore fd handler.
- * Sends ATTACHED immediately. */
-void          termd_session_client_add(TermDSession *sess, int cfd);
-
-#endif /* TERMINOLOGY_TYMUX_SESSION_H_ */
diff --git a/src/bin/tymuxd.c b/src/bin/tymuxd.c
index a6c3acc8..2f90b231 100644
--- a/src/bin/tymuxd.c
+++ b/src/bin/tymuxd.c
@@ -1,5 +1,5 @@
 #include "private.h"
-#include "tymux_session.h"
+#include "termd_tymux.h"
 #include "termpty.h"
 #include "termsrv.h"
 
@@ -21,7 +21,7 @@ int _log_domain = -1;
 
 /* ── global state ────────────────────────────────────────────────── */
 
-static TermDSession      *_session        = NULL;
+static TermDTymux      *_tymux        = NULL;
 static int                _listen_fd      = -1;
 static char               _sock_path[512];
 static Ecore_Fd_Handler  *_listen_handler = NULL;
@@ -58,7 +58,7 @@ _cb_client_connect(void *data EINA_UNUSED,
         return ECORE_CALLBACK_RENEW;
      }
 
-   /* Drain any payload the client sent with the ATTACH (session name). */
+   /* Drain any payload the client sent with the ATTACH (tymux name). */
    if (hdr.size > 0 && hdr.size <= TERMSRV_MAX_MSG_PAYLOAD)
      {
         void *tmp = malloc(hdr.size);
@@ -69,7 +69,7 @@ _cb_client_connect(void *data EINA_UNUSED,
           }
      }
 
-   termd_session_client_add(_session, cfd);
+   termd_tymux_client_add( _tymux, cfd);
    return ECORE_CALLBACK_RENEW;
 }
 
@@ -86,17 +86,17 @@ main(int argc, char **argv)
 
    if (argc != 2 || argv[1][0] == '-')
      {
-        fprintf(stderr, "Usage: tymuxd <session-name>\n");
+        fprintf(stderr, "Usage: tymuxd <name>\n");
         return 1;
      }
 
    name = argv[1];
 
-   if (name[0] == '\0' || strlen(name) > TSRV_MAX_SESSION_NAME ||
+   if (name[0] == '\0' || strlen(name) > TSRV_MAX_TYMUX_NAME ||
        strchr(name, '/'))
      {
         fprintf(stderr,
-                "tymuxd: invalid session name '%s' "
+                "tymuxd: invalid name '%s' "
                 "(empty, too long, or contains '/')\n", name);
         return 1;
      }
@@ -116,9 +116,9 @@ main(int argc, char **argv)
 
    /* ── socket directory ───────────────────────────────────────── */
 
-   if (termsrv_ensure_sessions_dir() < 0)
+   if (termsrv_ensure_tymux_dir() < 0)
      {
-        ERR("could not create sessions directory: %s", strerror(errno));
+        ERR("could not create tymux directory: %s", strerror(errno));
         termpty_shutdown();
         ecore_shutdown();
         eina_shutdown();
@@ -127,7 +127,7 @@ main(int argc, char **argv)
 
    if (termsrv_socket_path(name, _sock_path, sizeof(_sock_path)) < 0)
      {
-        ERR("socket path too long for session '%s'", name);
+        ERR("socket path too long for '%s'", name);
         termpty_shutdown();
         ecore_shutdown();
         eina_shutdown();
@@ -154,7 +154,7 @@ main(int argc, char **argv)
      {
         /* A live daemon is already accepting on this socket */
         close(probe_fd);
-        fprintf(stderr, "tymuxd: session '%s' already running\n", name);
+        fprintf(stderr, "tymuxd: '%s' is already running\n", name);
         termpty_shutdown();
         ecore_shutdown();
         eina_shutdown();
@@ -205,12 +205,12 @@ main(int argc, char **argv)
         return 1;
      }
 
-   /* ── create session ─────────────────────────────────────────── */
+   /* ── create tymux instance ──────────────────────────────────── */
 
-   _session = termd_session_new(name, NULL);
-   if (!_session)
+    _tymux = termd_tymux_new(name, NULL);
+   if (!_tymux)
      {
-        ERR("termd_session_new failed");
+        ERR("termd_tymux_new failed");
         unlink(_sock_path);
         close(_listen_fd);
         _listen_fd = -1;
@@ -228,8 +228,8 @@ main(int argc, char **argv)
    if (!_listen_handler)
      {
         ERR("ecore_main_fd_handler_add failed");
-        termd_session_free(_session);
-        _session = NULL;
+        termd_tymux_free( _tymux);
+        _tymux = NULL;
         unlink(_sock_path);
         close(_listen_fd);
         _listen_fd = -1;
@@ -239,7 +239,7 @@ main(int argc, char **argv)
         return 1;
      }
 
-   INF("tymuxd: session '%s' ready at %s", name, _sock_path);
+   INF("tymuxd: '%s' ready at %s", name, _sock_path);
 
    /* ── main loop ──────────────────────────────────────────────── */
 
@@ -261,8 +261,8 @@ main(int argc, char **argv)
 
    unlink(_sock_path);
 
-   termd_session_free(_session);
-   _session = NULL;
+   termd_tymux_free( _tymux);
+   _tymux = NULL;
 
    termpty_shutdown();
    ecore_shutdown();
diff --git a/src/bin/win.c b/src/bin/win.c
index e2691e18..73271887 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -149,7 +149,7 @@ struct tag_Term
    unsigned char has_bg_cursor : 1;
    unsigned char core_cursor_set: 1;
 #ifdef HAVE_TYMUX
-   unsigned char tymux_session : 1;
+   unsigned char is_tymux : 1;
 #endif
 
    Eina_Bool sendfile_request_enabled : 1;
@@ -455,7 +455,7 @@ win_scale_wizard(Evas_Object *win, Term *term)
 static void
 _tymux_indicator_update(Term *term)
 {
-   if (term->tymux_session)
+   if (term->is_tymux)
      {
         elm_layout_signal_emit(term->bg, "tymux,on", "terminology");
         edje_object_message_signal_process(term->bg_edj);
@@ -4503,7 +4503,7 @@ _cb_tab_selector_show(Tabs *tabs, Tab_Item *to_item)
                                                  is_selected,
                                                  missed_bell,
 #ifdef HAVE_TYMUX
-                                                 term->tymux_session,
+                                                 term->is_tymux,
 #else
                                                  EINA_FALSE,
 #endif
@@ -7426,7 +7426,7 @@ Term *
 term_new(Win *wn, Config *config, const char *cmd,
          Eina_Bool login_shell, const char *cd,
          int size_w, int size_h, Eina_Bool hold,
-         const char *title, const char *session_name)
+         const char *title, const char *tymux_name)
 {
    Term *term;
    Evas_Object *o;
@@ -7481,7 +7481,7 @@ term_new(Win *wn, Config *config, const char *cmd,
    _term_trans(term);
 
    term->termio = o = termio_add(wn->win, config, cmd, login_shell, cd,
-                                 size_w, size_h, term, title, session_name);
+                                 size_w, size_h, term, title, tymux_name);
    evas_object_data_set(o, "term", term);
    colors_term_init(termio_textgrid_get(term->termio),
                     term->config->color_scheme);
@@ -7502,9 +7502,9 @@ term_new(Win *wn, Config *config, const char *cmd,
    elm_layout_content_set(term->bg, "terminology.content", term->core);
    elm_layout_content_set(term->bg, "terminology.miniview", term->miniview);
 #ifdef HAVE_TYMUX
-   if (session_name && *session_name)
+   if (tymux_name && *tymux_name)
      {
-        term->tymux_session = 1;
+        term->is_tymux = 1;
         _tymux_indicator_update(term);
      }
 #endif
diff --git a/src/bin/win.h b/src/bin/win.h
index a90ec9ee..58926be1 100644
--- a/src/bin/win.h
+++ b/src/bin/win.h
@@ -35,7 +35,7 @@ void windows_update(void);
 Term *term_new(Win *wn, Config *config, const char *cmd,
                Eina_Bool login_shell, const char *cd, int size_w, int size_h,
                Eina_Bool hold, const char *title,
-               const char *session_name);
+               const char *tymux_name);
 int win_term_set(Win *wn, Term *term);
 
 Eina_List *
diff --git a/src/tests/test_termsrv.c b/src/tests/test_termsrv.c
index a6008289..18978980 100644
--- a/src/tests/test_termsrv.c
+++ b/src/tests/test_termsrv.c
@@ -33,15 +33,15 @@ test_socket_path(void)
 }
 
 static void
-test_sessions_dir(void)
+test_tymux_dir(void)
 {
     char buf[512];
     setenv("XDG_RUNTIME_DIR", "/tmp/test_xdg_ty", 1);
 
-    assert(termsrv_sessions_dir(buf, sizeof(buf)) == 0);
+    assert(termsrv_tymux_dir(buf, sizeof(buf)) == 0);
     assert(strcmp(buf, "/tmp/test_xdg_ty/terminology/tymux") == 0);
 
-    printf("PASS: test_sessions_dir\n");
+    printf("PASS: test_tymux_dir\n");
 }
 
 static void
@@ -106,7 +106,7 @@ int
 main(void)
 {
     test_socket_path();
-    test_sessions_dir();
+    test_tymux_dir();
     test_msg_round_trip();
     test_fd_passing();
     printf("All tests passed.\n");

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

Reply via email to