Skip to content

Commit 90b20c3

Browse files
committed
Add commands
1 parent f915f2c commit 90b20c3

84 files changed

Lines changed: 6935 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/commands/Xorg.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# TLDR
2+
3+
**Start X server** on default display
4+
5+
```Xorg```
6+
7+
**Start on specific display**
8+
9+
```Xorg :1```
10+
11+
**Configure and test** without starting
12+
13+
```Xorg -configure```
14+
15+
**Start with specific config file**
16+
17+
```Xorg -config [/path/to/xorg.conf]```
18+
19+
**Start on specific virtual terminal**
20+
21+
```Xorg vt7```
22+
23+
**Query supported modes** for display
24+
25+
```Xorg -query [hostname]```
26+
27+
**Retro probe only** (no server start)
28+
29+
```Xorg -retro -probeonly```
30+
31+
# SYNOPSIS
32+
33+
**Xorg** [**:**_DISPLAY_] [_OPTIONS_]
34+
35+
# PARAMETERS
36+
37+
**:**_DISPLAY_
38+
> Display number to use (default: 0).
39+
40+
**-config** _FILE_
41+
> Use specified configuration file instead of default.
42+
43+
**-configure**
44+
> Probe hardware and generate xorg.conf.
45+
46+
**-logfile** _FILE_
47+
> Write log to specified file.
48+
49+
**-modulepath** _PATH_
50+
> Search path for loadable modules.
51+
52+
**-retro**
53+
> Start with classic X stipple background.
54+
55+
**-probeonly**
56+
> Probe hardware without starting server.
57+
58+
**-query** _HOST_
59+
> Connect to XDMCP host.
60+
61+
**-verbose** [_N_]
62+
> Verbosity level (0-7).
63+
64+
**vt**_N_
65+
> Use virtual terminal N.
66+
67+
**-nolisten** _PROTO_
68+
> Disable listening on protocol (e.g., tcp).
69+
70+
**-novtswitch**
71+
> Don't automatically switch VT at startup.
72+
73+
# DESCRIPTION
74+
75+
**Xorg** is the X Window System server implementation from X.Org Foundation. It provides the foundation for graphical user interfaces on Unix-like systems, managing displays, input devices, and graphics hardware.
76+
77+
The server reads configuration from /etc/X11/xorg.conf or files in /etc/X11/xorg.conf.d/. Modern systems often run without explicit configuration, relying on automatic hardware detection.
78+
79+
Xorg is typically started by a display manager (GDM, SDDM, LightDM) or the **startx** script rather than directly. It runs on a virtual terminal and provides the display connection for X clients.
80+
81+
# CAVEATS
82+
83+
Running Xorg requires appropriate permissions (typically root or membership in video group). Many systems now use Wayland compositors instead of Xorg. Configuration errors can leave the system without a graphical interface; keep a backup configuration or use fallback options.
84+
85+
# HISTORY
86+
87+
X.Org Server is the successor to XFree86 and the reference implementation of the X Window System. The X.Org Foundation was formed in **2004** after a licensing dispute with XFree86. Xorg has been the standard X server on Linux and BSD systems, though Wayland is increasingly replacing it for desktop use.
88+
89+
# SEE ALSO
90+
91+
[startx](/man/startx)(1), [xinit](/man/xinit)(1), [xrandr](/man/xrandr)(1), [xorg.conf](/man/xorg.conf)(5)

assets/commands/pnmcolormap.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# TLDR
2+
3+
**Generate color map with N colors**
4+
5+
```pnmcolormap [256] [image.ppm] > [colormap.ppm]```
6+
7+
**Use median cut algorithm**
8+
9+
```pnmcolormap -center [16] [image.ppm] > [colormap.ppm]```
10+
11+
**Spread colors evenly**
12+
13+
```pnmcolormap -spreadluminosity [256] [image.ppm] > [colormap.ppm]```
14+
15+
**From multiple images**
16+
17+
```pnmcolormap [256] [image1.ppm] [image2.ppm] > [colormap.ppm]```
18+
19+
# SYNOPSIS
20+
21+
**pnmcolormap** [_options_] _ncolors_ [_pnmfile_...]
22+
23+
# PARAMETERS
24+
25+
**ncolors**
26+
> Maximum colors in map.
27+
28+
**-center**
29+
> Use center of cluster.
30+
31+
**-meancolor**
32+
> Use mean color of cluster.
33+
34+
**-meanpixel**
35+
> Use mean weighted by pixel count.
36+
37+
**-spreadbrightness**
38+
> Spread by brightness.
39+
40+
**-spreadluminosity**
41+
> Spread by luminosity.
42+
43+
# DESCRIPTION
44+
45+
**pnmcolormap** creates a color map (palette) from an image using median cut quantization. The output is a small image where each pixel is a color from the palette.
46+
47+
Used with pnmremap for color reduction.
48+
49+
# EXAMPLES
50+
51+
```bash
52+
# Create 256-color palette
53+
pnmcolormap 256 photo.ppm > palette.ppm
54+
55+
# Reduce colors using map
56+
pnmcolormap 16 image.ppm > map.ppm
57+
pnmremap -mapfile=map.ppm image.ppm > reduced.ppm
58+
59+
# Combined color reduction
60+
pnmcolormap 256 image.ppm | pnmremap -mapfile=- image.ppm > reduced.ppm
61+
```
62+
63+
# CAVEATS
64+
65+
Output is the colormap, not the remapped image. Use pnmremap to apply. Part of Netpbm.
66+
67+
# HISTORY
68+
69+
pnmcolormap is part of **Netpbm**, implementing median-cut color quantization algorithm.
70+
71+
# SEE ALSO
72+
73+
[pnmremap](/man/pnmremap)(1), [ppmquant](/man/ppmquant)(1), [ppmquantall](/man/ppmquantall)(1), [netpbm](/man/netpbm)(1)

assets/commands/pnmcut.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# TLDR
2+
3+
**Cut rectangular region**
4+
5+
```pnmcut [x] [y] [width] [height] [input.pnm] > [output.pnm]```
6+
7+
**Cut from top-left corner**
8+
9+
```pnmcut -left [0] -top [0] -width [100] -height [100] [input.pnm] > [output.pnm]```
10+
11+
**Cut using bottom-right**
12+
13+
```pnmcut -left [10] -top [10] -right [200] -bottom [150] [input.pnm] > [output.pnm]```
14+
15+
**Pad if outside bounds**
16+
17+
```pnmcut -pad [x] [y] [width] [height] [input.pnm] > [output.pnm]```
18+
19+
# SYNOPSIS
20+
21+
**pnmcut** [_options_] _x_ _y_ _width_ _height_ [_pnmfile_]
22+
23+
# PARAMETERS
24+
25+
**-left** _n_
26+
> Left column.
27+
28+
**-right** _n_
29+
> Right column.
30+
31+
**-top** _n_
32+
> Top row.
33+
34+
**-bottom** _n_
35+
> Bottom row.
36+
37+
**-width** _n_
38+
> Width in pixels.
39+
40+
**-height** _n_
41+
> Height in pixels.
42+
43+
**-pad**
44+
> Pad with black if out of bounds.
45+
46+
# DESCRIPTION
47+
48+
**pnmcut** extracts a rectangular region from a PNM image. Coordinates are zero-indexed from top-left corner.
49+
50+
Part of Netpbm toolkit for image manipulation.
51+
52+
# EXAMPLES
53+
54+
```bash
55+
# Cut 100x100 from position 50,50
56+
pnmcut 50 50 100 100 image.ppm > crop.ppm
57+
58+
# Using named parameters
59+
pnmcut -left 100 -top 100 -width 200 -height 150 image.ppm > crop.ppm
60+
61+
# Cut with padding
62+
pnmcut -pad -10 -10 120 120 image.ppm > padded.ppm
63+
64+
# Chain with conversion
65+
jpegtopnm photo.jpg | pnmcut 0 0 640 480 | pnmtojpeg > thumb.jpg
66+
```
67+
68+
# CAVEATS
69+
70+
Superseded by pamcut with more features. Negative coordinates cut from opposite edge.
71+
72+
# HISTORY
73+
74+
pnmcut is part of **Netpbm** by **Jef Poskanzer**, providing basic cropping functionality.
75+
76+
# SEE ALSO
77+
78+
[pamcut](/man/pamcut)(1), [pnmpaste](/man/pnmpaste)(1), [pnmcrop](/man/pnmcrop)(1), [netpbm](/man/netpbm)(1)

assets/commands/pnmhisteq.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# TLDR
2+
3+
**Equalize histogram**
4+
5+
```pnmhisteq [input.pnm] > [output.pnm]```
6+
7+
**Verbose output**
8+
9+
```pnmhisteq -verbose [input.pnm] > [output.pnm]```
10+
11+
**Equalize grayscale**
12+
13+
```ppmtopgm [input.ppm] | pnmhisteq > [output.pgm]```
14+
15+
# SYNOPSIS
16+
17+
**pnmhisteq** [_options_] [_pnmfile_]
18+
19+
# PARAMETERS
20+
21+
**-gray**
22+
> Equalize on gray value.
23+
24+
**-verbose**
25+
> Print information.
26+
27+
# DESCRIPTION
28+
29+
**pnmhisteq** performs histogram equalization on a PNM image. This process spreads out the most frequent intensity values, improving contrast in images with clustered brightness levels.
30+
31+
Part of Netpbm toolkit for image enhancement.
32+
33+
# EXAMPLES
34+
35+
```bash
36+
# Basic histogram equalization
37+
pnmhisteq photo.pgm > enhanced.pgm
38+
39+
# Color image via grayscale
40+
jpegtopnm photo.jpg | pnmhisteq > enhanced.ppm
41+
42+
# Chain with conversion
43+
pnmhisteq dark.pgm | pnmtopng > enhanced.png
44+
```
45+
46+
# ALGORITHM
47+
48+
Histogram equalization maps input intensities to output intensities so that the output histogram is approximately uniform. This maximizes image contrast.
49+
50+
# CAVEATS
51+
52+
May increase noise in uniform areas. Results depend on image content. Better for grayscale than color images.
53+
54+
# HISTORY
55+
56+
pnmhisteq is part of **Netpbm** by **Jef Poskanzer** and contributors, implementing classic histogram equalization.
57+
58+
# SEE ALSO
59+
60+
[pgmhist](/man/pgmhist)(1), [pnmnorm](/man/pnmnorm)(1), [pgmenhance](/man/pgmenhance)(1), [netpbm](/man/netpbm)(1)

assets/commands/pnmindex.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# TLDR
2+
3+
**Create image index**
4+
5+
```pnmindex [image1.pnm] [image2.pnm] [image3.pnm] > [index.pnm]```
6+
7+
**Specify size**
8+
9+
```pnmindex -size [100] [*.pnm] > [index.pnm]```
10+
11+
**With labels**
12+
13+
```pnmindex -title [*.pnm] > [index.pnm]```
14+
15+
**Multiple columns**
16+
17+
```pnmindex -across [4] [*.pnm] > [index.pnm]```
18+
19+
# SYNOPSIS
20+
21+
**pnmindex** [_options_] _pnmfiles_...
22+
23+
# PARAMETERS
24+
25+
**-size** _n_
26+
> Size of each thumbnail.
27+
28+
**-across** _n_
29+
> Number of images per row.
30+
31+
**-colors** _n_
32+
> Number of colors.
33+
34+
**-title**
35+
> Add filenames as titles.
36+
37+
**-black**
38+
> Black background.
39+
40+
**-quant**
41+
> Quantize colors.
42+
43+
# DESCRIPTION
44+
45+
**pnmindex** creates a visual index (contact sheet) from multiple PNM images. Each image is scaled to a thumbnail and arranged in a grid.
46+
47+
Useful for creating image previews and galleries.
48+
49+
# EXAMPLES
50+
51+
```bash
52+
# Create index of all PPM files
53+
pnmindex *.ppm > index.ppm
54+
55+
# Thumbnails 150 pixels, 5 across
56+
pnmindex -size 150 -across 5 photos/*.ppm > gallery.ppm
57+
58+
# With labels on black
59+
pnmindex -title -black images/*.pnm > contact.ppm
60+
61+
# Convert to JPEG
62+
pnmindex *.pnm | pnmtojpeg > index.jpg
63+
```
64+
65+
# CAVEATS
66+
67+
Large numbers of images can produce huge output. Consider pamundice for splitting back.
68+
69+
# HISTORY
70+
71+
pnmindex is part of **Netpbm**, providing contact sheet generation since early Pbmplus versions.
72+
73+
# SEE ALSO
74+
75+
[pnmcat](/man/pnmcat)(1), [pnmscale](/man/pnmscale)(1), [pnmtile](/man/pnmtile)(1), [netpbm](/man/netpbm)(1)

0 commit comments

Comments
 (0)