add -p flag to st
This commit is contained in:
parent
3b0804dde2
commit
71551993ee
7
st.1
7
st.1
|
@ -3,7 +3,7 @@
|
||||||
st \- simple terminal
|
st \- simple terminal
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B st
|
.B st
|
||||||
.RB [ \-aiv ]
|
.RB [ \-aivp ]
|
||||||
.RB [ \-c
|
.RB [ \-c
|
||||||
.IR class ]
|
.IR class ]
|
||||||
.RB [ \-f
|
.RB [ \-f
|
||||||
|
@ -27,7 +27,7 @@ st \- simple terminal
|
||||||
.RI [ arguments ...]]
|
.RI [ arguments ...]]
|
||||||
.PP
|
.PP
|
||||||
.B st
|
.B st
|
||||||
.RB [ \-aiv ]
|
.RB [ \-aivp ]
|
||||||
.RB [ \-c
|
.RB [ \-c
|
||||||
.IR class ]
|
.IR class ]
|
||||||
.RB [ \-f
|
.RB [ \-f
|
||||||
|
@ -81,6 +81,9 @@ writes all the I/O to
|
||||||
This feature is useful when recording st sessions. A value of "-" means
|
This feature is useful when recording st sessions. A value of "-" means
|
||||||
standard output.
|
standard output.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-p
|
||||||
|
enters pixel-perfect mode, where -g requests specific pixels instead of characters
|
||||||
|
.TP
|
||||||
.BI \-T " title"
|
.BI \-T " title"
|
||||||
defines the window title (default 'st').
|
defines the window title (default 'st').
|
||||||
.TP
|
.TP
|
||||||
|
|
9
x.c
9
x.c
|
@ -256,6 +256,7 @@ static char *opt_io = NULL;
|
||||||
static char *opt_line = NULL;
|
static char *opt_line = NULL;
|
||||||
static char *opt_name = NULL;
|
static char *opt_name = NULL;
|
||||||
static char *opt_title = NULL;
|
static char *opt_title = NULL;
|
||||||
|
static int opt_pixel = 0;
|
||||||
|
|
||||||
static uint buttons; /* bit field of pressed buttons */
|
static uint buttons; /* bit field of pressed buttons */
|
||||||
|
|
||||||
|
@ -1157,8 +1158,13 @@ xinit(int cols, int rows)
|
||||||
xloadcols();
|
xloadcols();
|
||||||
|
|
||||||
/* adjust fixed window geometry */
|
/* adjust fixed window geometry */
|
||||||
|
if(!opt_pixel) {
|
||||||
win.w = 2 * borderpx + cols * win.cw;
|
win.w = 2 * borderpx + cols * win.cw;
|
||||||
win.h = 2 * borderpx + rows * win.ch;
|
win.h = 2 * borderpx + rows * win.ch;
|
||||||
|
} else {
|
||||||
|
win.w = cols;
|
||||||
|
win.h = rows;
|
||||||
|
}
|
||||||
if (xw.gm & XNegative)
|
if (xw.gm & XNegative)
|
||||||
xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2;
|
xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2;
|
||||||
if (xw.gm & YNegative)
|
if (xw.gm & YNegative)
|
||||||
|
@ -2092,6 +2098,9 @@ main(int argc, char *argv[])
|
||||||
case 'o':
|
case 'o':
|
||||||
opt_io = EARGF(usage());
|
opt_io = EARGF(usage());
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
opt_pixel = 1;
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
opt_line = EARGF(usage());
|
opt_line = EARGF(usage());
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue