mirror of
https://codeberg.org/frosty/st.git
synced 2024-09-19 03:37:00 -04:00
patch: defaultfontsize
This commit is contained in:
parent
af9766d76b
commit
55b3a5eb32
8
st.1
8
st.1
|
@ -22,6 +22,8 @@ st \- simple terminal
|
|||
.IR line ]
|
||||
.RB [ \-w
|
||||
.IR windowid ]
|
||||
.RB [ \-z
|
||||
.IR fontsize ]
|
||||
.RB [[ \-e ]
|
||||
.IR command
|
||||
.RI [ arguments ...]]
|
||||
|
@ -44,6 +46,8 @@ st \- simple terminal
|
|||
.IR title ]
|
||||
.RB [ \-w
|
||||
.IR windowid ]
|
||||
.RB [ \-z
|
||||
.IR fontsize ]
|
||||
.RB \-l
|
||||
.IR line
|
||||
.RI [ stty_args ...]
|
||||
|
@ -91,6 +95,10 @@ defines the window title (default 'st').
|
|||
embeds st within the window identified by
|
||||
.I windowid
|
||||
.TP
|
||||
.BI \-z " fontsize"
|
||||
sets the default fontsize to
|
||||
.I fontsize
|
||||
.TP
|
||||
.BI \-l " line"
|
||||
use a tty
|
||||
.I line
|
||||
|
|
8
x.c
8
x.c
|
@ -4,6 +4,7 @@
|
|||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/select.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
@ -1168,7 +1169,7 @@ xinit(int cols, int rows)
|
|||
die("could not init fontconfig.\n");
|
||||
|
||||
usedfont = (opt_font == NULL)? font : opt_font;
|
||||
xloadfonts(usedfont, 0);
|
||||
xloadfonts(usedfont, defaultfontsize);
|
||||
|
||||
/* colors */
|
||||
xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None);
|
||||
|
@ -2116,6 +2117,11 @@ main(int argc, char *argv[])
|
|||
case 'v':
|
||||
die("%s " VERSION "\n", argv0);
|
||||
break;
|
||||
case 'z':
|
||||
defaultfontsize = strtod(EARGF(usage()), NULL);
|
||||
if (!(defaultfontsize > 0))
|
||||
usage();
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
} ARGEND;
|
||||
|
|
Loading…
Reference in a new issue