ability to change title (but no string to change yet)
This commit is contained in:
parent
bda5a8d1d2
commit
447600497e
1 changed files with 12 additions and 0 deletions
12
st.c
12
st.c
|
|
@ -4034,6 +4034,17 @@ xresettitle(void)
|
||||||
xsettitle(opt_title ? opt_title : "st");
|
xsettitle(opt_title ? opt_title : "st");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xcolor2title(void){
|
||||||
|
char *cs;
|
||||||
|
size_t lencs;
|
||||||
|
|
||||||
|
lencs = (size_t)snprintf(NULL,0,"new color %d",whichcolortable);
|
||||||
|
cs = malloc(lencs);
|
||||||
|
snprintf(cs,lencs,"new color %d",whichcolortable);
|
||||||
|
xsettitle(cs);
|
||||||
|
free(cs);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
redraw(void)
|
redraw(void)
|
||||||
{
|
{
|
||||||
|
|
@ -4176,6 +4187,7 @@ swapcolors(const Arg *dummy)
|
||||||
if ( whichcolortable >= sizeof(colornames)/sizeof(colornames[0]) ) {
|
if ( whichcolortable >= sizeof(colornames)/sizeof(colornames[0]) ) {
|
||||||
whichcolortable = 0;
|
whichcolortable = 0;
|
||||||
}
|
}
|
||||||
|
xcolor2title();
|
||||||
xloadcols();
|
xloadcols();
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue