all repos — st @ fe2ba95b3d81127b98a5dc6fa0341a90beabd1a0

st (suckless terminal) config

Reset window title on terminal reset too.
Christoph Lohmann 20h@r-36.net
commit

fe2ba95b3d81127b98a5dc6fa0341a90beabd1a0

parent

977c5d908903c4c300b02811382a9ab53ec73803

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M st.cst.c

@@ -296,6 +296,7 @@ static void xcopy(void);

static void xdrawcursor(void); static void xinit(void); static void xloadcols(void); +static void xresettitle(void); static void xseturgency(int); static void xsetsel(char*); static void xresize(int, int);

@@ -1684,6 +1685,7 @@ break;

case 'c': /* RIS -- Reset to inital state */ treset(); term.esc = 0; + xresettitle(); break; case '=': /* DECPAM -- Application keypad */ term.mode |= MODE_APPKEYPAD;

@@ -2026,7 +2028,7 @@ &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000});

xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); - XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); + xresettitle(); XMapWindow(xw.dpy, xw.win); xhints(); XSync(xw.dpy, 0);

@@ -2120,6 +2122,11 @@ oldx = term.c.x, oldy = term.c.y;

} xcopy(); +} + +void +xresettitle(void) { + XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); } void