change config
This commit is contained in:
parent
688a4e31a0
commit
9326a22906
1
config.h
1
config.h
|
@ -1,4 +1,5 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
static char *opt_title = "Not A Terminal";
|
||||
/* Spare fonts */
|
||||
static char *font2[] = {
|
||||
"FiraCode Nerd Font:style=Light:pixelsize=8:antialias=true:autohint=true",//english
|
||||
|
|
7
st.c
7
st.c
|
@ -1,5 +1,4 @@
|
|||
/* See LICENSE for license details. */
|
||||
static char *opt_title = "Not A Terminal";
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -1949,7 +1948,7 @@ strhandle(void)
|
|||
case 1:
|
||||
case 2:
|
||||
if (narg > 1)
|
||||
xsettitle(opt_title);
|
||||
title();
|
||||
return;
|
||||
case 52:
|
||||
if (narg > 2 && allowwindowops) {
|
||||
|
@ -1985,7 +1984,7 @@ strhandle(void)
|
|||
}
|
||||
break;
|
||||
case 'k': /* old title set compatibility */
|
||||
xsettitle(opt_title);
|
||||
title();
|
||||
return;
|
||||
case 'P': /* DCS -- Device Control String */
|
||||
case '_': /* APC -- Application Program Command */
|
||||
|
@ -2651,7 +2650,7 @@ tresize(int col, int row)
|
|||
void
|
||||
resettitle(void)
|
||||
{
|
||||
xsettitle(NULL);
|
||||
title();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -3,5 +3,5 @@ Type=Application
|
|||
Name=st
|
||||
Comment=simple-terminal emulator for X
|
||||
Icon=utilities-terminal
|
||||
Exec=st
|
||||
Exec=st -e fish
|
||||
Categories=System;TerminalEmulator
|
||||
|
|
1
st.h
1
st.h
|
@ -1,5 +1,4 @@
|
|||
/* See LICENSE for license details. */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
1
win.h
1
win.h
|
@ -32,6 +32,7 @@ void xfinishdraw(void);
|
|||
void xloadcols(void);
|
||||
int xsetcolorname(int, const char *);
|
||||
void xsettitle(char *);
|
||||
void title();
|
||||
int xsetcursor(int);
|
||||
void xsetmode(int, unsigned int);
|
||||
void xsetpointermotion(int);
|
||||
|
|
23
x.c
23
x.c
|
@ -1,5 +1,4 @@
|
|||
/* See LICENSE for license details. */
|
||||
static char *opt_title = "NULL";
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
@ -1773,18 +1772,22 @@ xsetenv(void)
|
|||
snprintf(buf, sizeof(buf), "%lu", xw.win);
|
||||
setenv("WINDOWID", buf, 1);
|
||||
}
|
||||
|
||||
void
|
||||
title()
|
||||
{
|
||||
xsettitle(opt_title);
|
||||
}
|
||||
void
|
||||
xsettitle(char *p)
|
||||
{
|
||||
XTextProperty prop;
|
||||
DEFAULT(opt_title, opt_title);
|
||||
|
||||
Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
&prop);
|
||||
XSetWMName(xw.dpy, xw.win, &prop);
|
||||
XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
|
||||
XFree(prop.value);
|
||||
XTextProperty prop;
|
||||
DEFAULT(p, opt_title);
|
||||
|
||||
Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
&prop);
|
||||
XSetWMName(xw.dpy, xw.win, &prop);
|
||||
XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
|
||||
XFree(prop.value);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue