Skip to content

Commit

Permalink
Generated new manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
eribertomota committed Jun 10, 2024
1 parent bca805d commit 63597bb
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 18 deletions.
4 changes: 2 additions & 2 deletions man/create-man.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ txt2man -d "$T2M_DATE" -t $T2M_NAME -r $T2M_NAME-$T2M_VERSION -s $T2M_LEVEL -v "
#--------------------------------------------------------

# Put here all data for your first manpage (in T2M lines)
T2M_DATE="10 Jun 2023"
T2M_DATE="09 Jun 2024"
T2M_NAME=scrot
T2M_VERSION=1.10
T2M_VERSION=1.11
T2M_LEVEL=1
T2M_DESC="command line screen capture utility"
create-man
78 changes: 62 additions & 16 deletions man/scrot.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH scrot 1 "10 Jun 2023" "scrot-1.10" "command line screen capture utility"
.TH scrot 1 "09 Jun 2024" "scrot-1.11" "command line screen capture utility"
.SH NAME
\fBscrot \fP- command line screen capture utility
\fB
Expand Down Expand Up @@ -90,8 +90,9 @@ Don't exit for keyboard input. ESC still exits.
.B
\fB-k\fP, \fB--stack\fP[=\fIOPT\fP]
Capture stack/overlapped windows and join them. A
running Composite Manager is needed. \fIOPT\fP it's optional
join letter: v/h (vertical/horizontal). Default: h
running Composite Manager is needed for it to work
correctly. \fIOPT\fP is optional join letter: v/h
(vertical/horizontal). Default: h
.TP
.B
\fB-l\fP, \fB--line\fP \fISTYLE\fP
Expand Down Expand Up @@ -140,10 +141,7 @@ If one of the resolution's dimensions is 0, it is
replaced by a number that maintains the full size
screenshot's aspect ratio. Examples: 10, 25, 320x240,
500x200, 100x0, 0x480.
.TP
.B
\fB-u\fP, \fB--focused\fP
Use the currently focused window.
\fB-u\fP, \fB--focused\fP, \fB--focussed\fP Use the currently focused window.
.TP
.B
\fB-v\fP, \fB--version\fP
Expand Down Expand Up @@ -173,17 +171,25 @@ If no format is specified, \fBscrot\fP will use the file
extension to determine the format. If filename
does not have an extension either, then PNG will
be used as fallback.
.TP
.B
\fB--list-options\fP[=\fIOPT\fP]
List all program options. If argument is "tsv" it
outputs a TAB separated list intended for scripts.
Default is "human". Note that the tsv format is not
stable and may change in the future.
.SH SPECIAL STRINGS
\fB-e\fP, \fB-F\fP and \fIFILE\fP parameters can take format specifiers that are expanded
by \fBscrot\fP when encountered. There are two types of format specifier:
Characters preceded by a '%' are interpreted by \fBstrftime\fP(2). The second kind
Characters preceded by a '%' are interpreted by \fBstrftime\fP(3). The second kind
are internal to \fBscrot\fP and are prefixed by '$'. The following specifiers are
recognised by \fBscrot\fP:
.PP
.nf
.fam C
$$ A literal '$'.
$a The system's hostname.
$F The output file format.
$f The image's full path (ignored when used in the filename).
$h The image's height.
$m The thumbnail's full path (ignored when used in the filename).
Expand All @@ -201,12 +207,12 @@ Example:
.PP
.nf
.fam C
$ scrot '%Y-%m-%d_$wx$h.png' -e 'optipng $f'
$ scrot '%Y-%m-%d_$wx$h.png' -e 'du -h $f'

.fam T
.fi
This would create a PNG file with a name similar to 2000-10-30_2560x1024.png
and optimize it with \fBoptipng\fP(1).
and show the disk-usage with \fBdu\fP(1).
.SH SELECTION MODE
When using \fB-s\fP, optionally you can indicate the action to perform with the selection area.
Some actions allow optional parameters too.
Expand Down Expand Up @@ -267,9 +273,10 @@ When using \fB-s\fP, you can indicate the style of the line with \fB-l\fP.
100% transparent. For the opacity of the line, this is only
effective if the compositor supports _NET_WM_WINDOW_OPACITY.

mode=MODE MODE is either "edge" or "classic" without quotes.
mode=MODE MODE can be "auto", "edge" or "classic" without quotes.
edge is the new selection, classic uses the old one.
"edge" ignores the style specifier and the -f flag,
"auto" uses "edge" if no compositor is running, "classic"
otherwise. "edge" ignores the style specifier and the -f flag,
"classic" ignores the opacity specifier.

.fam T
Expand All @@ -278,7 +285,7 @@ Without the \fB-l\fP option, a default style is used:
.PP
.nf
.fam C
mode=classic,style=solid,width=1,opacity=100
mode=auto,style=solid,width=1,opacity=100

.fam T
.fi
Expand All @@ -296,11 +303,50 @@ For lossless formats (e.g PNG), the quality options is ignored. For lossy
formats where the quality and compression are tied together (e.g JPEG),
compression will be ignored. And for image formats where quality and
compression can be independently set (e.g WebP, JXL), both flags are respected.
.SH SEE ALSO
\fBoptipng\fP(1)
\fBxwininfo\fP(1)
.SH EXAMPLES

Following are a couple examples of using \fBscrot\fP with other utilities.
.PP
Copying screenshot to clipboard using \fBxclip\fP(1):
.PP
.nf
.fam C
$ scrot - | xclip -selection clipboard -target image/png

.fam T
.fi
Taking a screenshot and optimizing its size with \fBoptipng\fP(1):
.PP
.nf
.fam C
$ scrot -e 'optipng -o4 $f'

.fam T
.fi
Selecting a window by PID with \fBxdo\fP(1):
.PP
.nf
.fam C
$ scrot -w $(xdo id -p PID)

.fam T
.fi
Taking a screenshot and annotating it with \fBImageMagick\fP(1):
.PP
.nf
.fam C
$ scrot - | convert -pointsize 64 -gravity North -annotate '+16+16' 'hello, world!' - out.png

.fam T
.fi
.SH AUTHOR
\fBscrot\fP was originally developed by Tom Gilbert.
.PP
Currently, source code is maintained by volunteers. Newer versions
are available at https://github.com/resurrecting-open-source-projects/\fBscrot\fP
.SH SEE ALSO
\fBImageMagick\fP(1)
\fBoptipng\fP(1)
\fBxclip\fP(1)
\fBxdo\fP(1)
\fBxwininfo\fP(1)

0 comments on commit 63597bb

Please sign in to comment.