MENYOKI(1)

πŸ“¦
version 1.8.0 Β· 2 versions
, in arch rolling, nixpkgs unstable

✨ menyoki(1) β€” User Commands ✨

🌸 NAME 🌸

menyoki β€” screenshot/screencast and perform image operations on the command line πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

menyoki [FLAGS] [OPTIONS] <SUBCOMMAND>

πŸ’– DESCRIPTION πŸ’–

okay so menyoki is a screencast and screenshot utility that ALSO does a bunch of image-related operations β€” like making and splitting GIFs, and modifying/analyzing/viewing image files. it's lowkey aiming to be a lightweight command line tool for helping out with day-to-day life operations or complicated detail-centric issues, no cap. originally it was designed to record/screenshot terminal windows, but bestie you can tweak it easily for other purposes with command line arguments, environment variables, or a configuration file 🫢


πŸŽ€ USAGE πŸŽ€

Command line arguments of menyoki are designed to be as intuitive as possible. as a result of that, an action can be performed with a chain of subcommands along with the flags and options. the general prototype for the usage of command line arguments is the following:

menyoki (ACTION) (FORMAT) (OUTPUT)

the subcommand that will indicate the action is mandatory, whereas format and output subcommands might be optional (or they might not exist at all 😭). the format subcommand can be one of the supported formats, and output basically corresponds to the save subcommand.

the default format is the first listed subcommand if there isn't any subcommand given for specifying a format. on the other hand, the save subcommand uses the β€œmenyoki” directory in the home (or images if it exists) as the default output directory.


🌈 GENERAL ARGUMENTS 🌈

Flags and options that will generally affect the execution of menyoki can be set before specifying the main action to perform. then the main subcommand (action) must be specified.

menyoki [FLAGS] [OPTIONS] <SUBCOMMAND>

⭐ Arguments

FLAGS:

  • -h, --help β€” Print help information
  • -V, --version β€” Print version information
  • -v, --verbose β€” Increase logging verbosity
  • -q, --quiet β€” Do not show output

OPTIONS:

  • -c, --config <FILE> β€” Set the configuration file
  • --color <HEX> β€” Set the main color [default: 3AA431]

SUBCOMMANDS:

  • record β€” Record an animation
  • split β€” Split an animation into frames
  • make β€” Make an animation from frames
  • capture β€” Capture an image
  • edit β€” Edit an image
  • analyze β€” Analyze an image
  • view β€” View an image

πŸ’« Examples

  • menyoki -V β€” Print the version information
  • menyoki -vv --color FF00FF <action> β€” Set log verbosity level to 2 (trace) and use β€œFF00FF” as the main color
  • menyoki -q -c menyoki.conf <action> β€” Run in quiet mode and read the configuration from β€œmenyoki.conf”

πŸ”₯ RECORD SUBCOMMAND πŸ”₯

menyoki can record an area of a window or the whole screen and encode it as a supported format. area selection and resize is performed with the key bindings ✨

a few scenarios that the record action might be helpful for would be:

  • Record a specific area of a window
  • Record for a given duration
  • Record the output of a command (especially for TUI applications)

encoding options can be changed using the arguments of the provided format. (see the output of menyoki record gif --help)

menyoki record [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]

⭐ Arguments

FLAGS:

  • -r, --root β€” Record the root window
  • -f, --focus β€” Record the focused window
  • --select β€” Select the window to record
  • --parent β€” Record the parent of the window
  • --with-alpha β€” Record with the alpha channel
  • --no-keys β€” Disable the action keys while recording
  • -m, --mouse β€” Select the window with mouse click
  • -h, --help β€” Print help information

OPTIONS:

  • --action-keys <KEYS> β€” Set the action keys [default: LAlt-S,LAlt-Enter]
  • --cancel-keys <KEYS> β€” Set the cancel keys [default: LControl-D,Escape]
  • -b, --border <BORDER> β€” Set the border width [default: 1]
  • -p, --padding <T:R:B:L> β€” Set the record area padding
  • -s, --size <WxH> β€” Set the record area size
  • -d, --duration <S> β€” Set the duration for recording [default: ∞]
  • -c, --countdown <S> β€” Set the countdown before recording [default: 3]
  • -t, --timeout <S> β€” Set the timeout for window selection [default: 300]
  • -i, --interval <MS> β€” Set the refresh interval for window selection [default: 10]
  • --font <FONT> β€” Set the font to use for window selection
  • --monitor <NUM> β€” Set the monitor to record as root window

ARGS:

  • <COMMAND> β€” Set the command to run

SUBCOMMANDS:

  • gif β€” Use the GIF encoder
  • apng β€” Use the APNG encoder
  • save β€” Save the output file(s)

πŸ’« Examples

  • menyoki record β€” Select a window and start recording with default settings
  • menyoki record --root --countdown 5 β€” Record the root window after 5 seconds of countdown
  • menyoki record --focus --with-alpha β€” Record the focused window with the alpha channel (for transparency)
  • menyoki record --size 200x300 --duration 10 β€” Record an area of size 200x300 for 10 seconds
  • menyoki record --padding 20:10:0:10 --timeout 120 β€” Record an area with given padding and set window selection timeout to 120 seconds
  • menyoki record --parent β€” Record the parent window of the selected window
  • menyoki record --root --select --monitor 1 β€” Record the first monitor as root window
  • menyoki record --border 5 β€” Record the area selected by a border with 5 width
  • menyoki record --action-keys LControl-Q,LAlt-W β€” Record with the default settings using custom key bindings
  • menyoki record --cancel-keys LControl-X,E β€” Record with the default settings using custom key bindings
  • menyoki record gif --fps 15 --quality 90 β€” Record 15 frames per second with 90% quality
  • menyoki record gif --gifski β€” Record and encode using the gifski encoder
  • menyoki record gif save "test.gif" --timestamp β€” Record and save as β€œtest.gif” with timestamp in the file name
  • menyoki record apng --fps 30 β€” Record 30 frames per second and encode as APNG
  • menyoki -q record save "-" > test.gif β€” Record and redirect output to β€œtest.gif”
  • menyoki -q record "kmon -t 2000" β€” Execute the command and record its output in quiet mode
  • menyoki record --font "-*-dejavu sans-*-*-*-*-17-*-*-*-*-*-*-*" β€” Use custom font for showing the area size (see xfontsel)

🧚 SPLIT SUBCOMMAND 🧚

menyoki can split an animation into frames (extract images) if the split subcommand is provided, and it can save frames as one of the supported formats with the use of a trailing format subcommand πŸ’–

menyoki split [OPTIONS] <FILE> [SUBCOMMAND]

⭐ Arguments

FLAGS:

  • -h, --help β€” Print help information

OPTIONS:

  • -d, --dir <DIRECTORY> β€” Set the output directory

ARGS:

  • <FILE> β€” Set the animation file

SUBCOMMANDS:

  • png β€” Use the PNG encoder
  • jpg β€” Use the JPG encoder
  • webp β€” Use the WebP encoder
  • bmp β€” Use the BMP encoder
  • ico β€” Use the ICO encoder
  • tiff β€” Use the TIFF encoder
  • tga β€” Use the TGA encoder
  • pnm β€” Use the PNM encoder
  • ff β€” Use the farbfeld encoder
  • exr β€” Use the OpenEXR encoder

πŸ’« Examples

  • menyoki split rec.gif β€” Extract frames from the β€œrec.gif” file
  • menyoki split rec.gif jpg --quality 100 β€” Extract frames as JPEG in maximum quality
  • menyoki split rec.gif --dir frames/ β€” Extract frames and save them to the specified directory

✨ MAKE SUBCOMMAND ✨

Okay so the make subcommand is literally here to turn a set of images into an animation β€” that’s its whole main character job. Bestie, it can make GIFs from images you hand it on the command line, or from a directory you point it at. It’s giving β€œanimation studio but make it terminal.” πŸŽžοΈπŸ’–

menyoki make [FLAGS] [OPTIONS] <FRAMES>... [SUBCOMMAND]

πŸŽ€ Arguments πŸŽ€

🌸 FLAGS 🌸

  • --gifski β€” Use the gifski encoder. Yes, the encoder named gifski, no cap.
  • --fast β€” Encode 3 times faster (gifski). Speedy lil moment. ⚑
  • -n, --no-sort β€” Use frames in the order given. No sorting, just vibes.
  • -h, --help β€” Print help information. The classic β€œhelp me help you” flag.

πŸ’… OPTIONS πŸ’…

  • -f, --fps <FPS> β€” Set the FPS [default: 20].
  • -q, --quality <QUALITY> β€” Set the frame quality (1-100) [default: 75].
  • -r, --repeat <REPEAT> β€” Set the number of repetitions [default: ∞]. Infinite era, honestly.
  • -d, --dir <DIRECTORY> β€” Set the directory to read frames from.
  • --format <FORMAT> β€” Set the animation format [default: gif] [possible values: gif, apng].

πŸ¦‹ ARGS πŸ¦‹

  • <FRAMES>... β€” Set the animation frames.

πŸŽ€ SUBCOMMANDS πŸŽ€

  • save β€” Save the output file(s).

🌈 Examples 🌈

  • menyoki make 1.png 2.png β€” Make a GIF that consists of two frames as 1.png and 2.png.
  • menyoki make 1.png 2.png --fps 5 --quality 100 β€” Make a GIF with the specified properties from the given frames.
  • menyoki make 1.png 2.png save 3.gif --date β€” Make a GIF and save the file (3.gif) with the date information.
  • menyoki make 1.png 2.png --format apng β€” Make an APNG from the given frames.
  • menyoki make --dir frames/ β€” Make a GIF from the frames in the specified directory.

✨ CAPTURE SUBCOMMAND ✨

So menyoki can also capture β€” aka screenshot β€” an area of a window or the whole screen and encode it as a supported format. Formats like png, jpg, and pnm have their own flags and options that might be used for changing the default encoding settings. Similar to the record subcommand, area selection and resize is performed with the key bindings. The same flags and options might apply for both record and capture subcommands since the actions are abstractly alike. It’s giving screenshot queen behavior. πŸ“ΈπŸ‘‘

menyoki capture [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]

πŸŽ€ Arguments πŸŽ€

🌸 FLAGS 🌸

  • -r, --root β€” Capture the root window.
  • -f, --focus β€” Capture the focused window.
  • --select β€” Select the window to capture.
  • --parent β€” Record the parent of the window. (Yes, the original says β€œRecord” here β€” we’re keeping it exact, bestie.)
  • --with-alpha β€” Capture with the alpha channel.
  • -m, --mouse β€” Select the window with mouse click. Clicky clicky.
  • -h, --help β€” Print help information.

πŸ’… OPTIONS πŸ’…

  • --action-keys <KEYS> β€” Set the action keys [default: LAlt-S,LAlt-Enter].
  • --cancel-keys <KEYS> β€” Set the cancel keys [default: LControl-D,Escape].
  • -b, --border <BORDER> β€” Set the border width [default: 1].
  • -p, --padding <T:R:B:L> β€” Set the capture area padding.
  • -s, --size <WxH> β€” Set the capture area size.
  • -c, --countdown <S> β€” Set the countdown before capturing [default: 0].
  • -t, --timeout <S> β€” Set the timeout for window selection [default: 300].
  • -i, --interval <MS> β€” Set the refresh interval for window selection [default: 10].
  • --font <FONT> β€” Set the font to use for window selection.
  • --monitor <NUM> β€” Set the monitor to capture as root window.

πŸ¦‹ ARGS πŸ¦‹

  • <COMMAND> β€” Set the command to run.

πŸŽ€ SUBCOMMANDS πŸŽ€

  • png β€” Use the PNG encoder.
  • jpg β€” Use the JPG encoder.
  • webp β€” Use the WebP encoder.
  • bmp β€” Use the BMP encoder.
  • ico β€” Use the ICO encoder.
  • tiff β€” Use the TIFF encoder.
  • tga β€” Use the TGA encoder.
  • pnm β€” Use the PNM encoder.
  • ff β€” Use the farbfeld encoder.
  • exr β€” Use the OpenEXR encoder.
  • save β€” Save the output file(s).

🌈 Examples 🌈

  • menyoki capture β€” Select a window and screenshot with default settings.
  • menyoki capture --root --countdown 5 β€” Screenshot the root window after 5 seconds of countdown.
  • menyoki capture --focus --with-alpha β€” Screenshot the focused window with the alpha channel (for transparency).
  • menyoki capture --size 200x300 --duration 10 β€” Screenshot an area of size 200x300 for 10 seconds.
  • menyoki capture --padding 20:10:0:10 --timeout 120 β€” Screenshot an area with the given padding and set window selection timeout to 120 seconds.
  • menyoki capture png --filter avg --compression fast β€” Screenshot and encode with the specified PNG options.
  • menyoki capture jpg --quality 100 β€” Screenshot and encode with the specified JPEG options.
  • menyoki capture webp --lossless β€” Screenshot and encode with the specified WEBP options.
  • menyoki capture pnm --format pixmap --encoding ascii β€” Screenshot and encode with the specified PNM options.
  • menyoki capture ff save "test.ff" --timestamp β€” Screenshot and save as test.ff in farbfeld format with timestamp in the file name.
  • menyoki -q capture png save "-" > test.png β€” Screenshot and redirect output to test.png.
  • menyoki -q capture "kmon -t 2000" β€” Execute the command and screenshot its output in quiet mode (sets countdown to 3 implicitly).

πŸ’… EDIT SUBCOMMAND πŸ’…

okay bestie, edit is the glow-up subcommand ✨ it lets you edit (<https://github.com/image-rs/image#image-processing-functions>) β€” like, manipulate/filter/convert β€” files that are in one of the supported formats. and here's the tea: on top of all the flags and options that edit gives you, you can also pass extra encoding options through the format subcommands. two-for-one slay πŸŽ€

menyoki edit [FLAGS] [OPTIONS] <FILE> [SUBCOMMAND]

Arguments

FLAGS:

  • --convert β€” Convert image using the given encoder
  • --grayscale β€” Convert image to grayscale
  • --invert β€” Invert the colors of the image
  • -h, --help β€” Print help information

OPTIONS:

  • --crop <T:R:B:L> β€” Apply padding to crop the image
  • --resize <WxH> β€” Resize the image without keeping the aspect ratio
  • --ratio <RATIO> β€” Resize the image proportionally by aspect ratio [default: 1.0]
  • --rotate <ROTATE> β€” Rotate the image (clockwise) [possible values: 90, 180, 270]
  • --flip <FLIP> β€” Flip the image [possible values: horizontal, vertical]
  • --blur <SIGMA> β€” Blur the image [default: 0.0]
  • --hue <HUE> β€” Adjust the hue of the image [default: Β±0]
  • --contrast <CONTRAST> β€” Adjust the contrast of the image [default: Β±0.0]
  • --brightness <BRIGHTNESS> β€” Adjust the brightness of the image [default: Β±0]
  • --filter <FILTER> β€” Set the sampling filter for scaling [default: lanczos3] [possible values: nearest, triangle, catmull-rom, gaussian, lanczos3]

ARGS:

  • <FILE> β€” Set the input file πŸ“‚

SUBCOMMANDS:

  • gif β€” Use the GIF encoder
  • apng β€” Use the APNG encoder
  • png β€” Use the PNG encoder
  • jpg β€” Use the JPG encoder
  • webp β€” Use the WebP encoder
  • bmp β€” Use the BMP encoder
  • ico β€” Use the ICO encoder
  • tiff β€” Use the TIFF encoder
  • tga β€” Use the TGA encoder
  • pnm β€” Use the PNM encoder
  • ff β€” Use the farbfeld encoder
  • exr β€” Use the OpenEXR encoder
  • save β€” Save the output file(s)

Examples

here's the whole mood board of what edit can do, no cap πŸ¦‹

  • menyoki edit test.png β€” Re-encode the β€œtest.png” file without editing
  • menyoki edit test.png --grayscale β€” Convert image to grayscale
  • menyoki edit test.png --invert β€” Invert the colors of the image
  • menyoki edit test.png --crop 20:20:20:20 β€” Apply the given padding to image for cropping
  • menyoki edit test.png --resize 300x300 β€” Resize the image to 300x300 (without keeping the aspect ratio)
  • menyoki edit test.png --ratio 0.5 β€” Resize the image to half the size (using the aspect ratio)
  • menyoki edit test.png --ratio 2.0 --filter gaussian β€” Resize the image using the specified sampling filter
  • menyoki edit test.png --rotate 90 β€” Rotate the image 90 degrees (clockwise)
  • menyoki edit test.png --flip horizontal β€” Flip the image horizontally
  • menyoki edit test.png --blur 2.0 β€” Blur the image
  • menyoki edit test.png --hue 100 β€” Adjust the hue of the image
  • menyoki edit test.png --contrast -10.5 β€” Adjust the contrast of the image
  • menyoki edit test.png --brightness 50 β€” Adjust the brightness of the image
  • menyoki edit test.png --convert tga β€” Convert image to TGA format
  • menyoki edit test.png --convert jpg --quality 80 β€” Convert image to JPEG in 80% quality
  • menyoki edit test.gif --ratio 0.25 gif --quality 80 β€” Resize and re-encode β€œtest.gif”
  • menyoki edit test.gif gif --speed 0.5 β€” Slow down the GIF (half the speed)
  • menyoki edit test.gif gif --cut-beginning 1.0 --cut-end 0.5 β€” Cut the duration of GIF by seconds
  • menyoki edit test.apng --convert gif β€” Convert APNG to GIF
  • menyoki edit test.ff --grayscale --convert pnm --format arbitrary save "output" --with-extension --date "%H%M%S" β€” test.ff (farbfeld) -> grayscale -> output_020035.pam (PNM)

πŸ” ANALYZE SUBCOMMAND πŸ”

analyze is the nosy bestie subcommand β€” its whole job is inspecting an image file that's in a supported format and then creating a report based on the image details. periodt. the report has 2 to 3 sections, which are: file, image, and EXIF information πŸ‘‘

menyoki analyze [FLAGS] [OPTIONS] <FILE> [SUBCOMMAND]

Arguments

FLAGS:

  • --timestamp β€” Use Unix timestamp for report dates
  • -h, --help β€” Print help information

OPTIONS:

  • -t, --time-zone <TIMEZONE> β€” Set the time zone of the report [default: utc] [possible values: utc, local]

ARGS:

  • <FILE> β€” Set the image file

SUBCOMMANDS:

  • save β€” Save the output file(s)

Examples

  • menyoki analyze test.jpg β€” Inspect β€œtest.jpg” and print the report
  • menyoki analyze test.jpg save test_report.txt β€” Inspect β€œtest.jpg” and save the report as β€œtest_report.txt”
  • menyoki analyze test.jpg --timestamp β€” Inspect the file and create a report based on timestamps
  • menyoki analyze test.jpg --time-zone local β€” Inspect the file and create a report based on local time zone
  • menyoki analyze test.jpg --timestamp save --timestamp β€” Use timestamps for both analysis report and file name

πŸ‘€ VIEW SUBCOMMAND πŸ‘€

view is literally just "lemme look at this image from the terminal" β€” that's it, that's the vibe. it uses the core library of viu (<https://github.com/atanunq/viu>) 🧚

menyoki view [FLAGS] <FILE>

Arguments

FLAGS:

  • -t, --transparent β€” Display transparent image with transparent background
  • -h, --help β€” Print help information

ARGS:

  • <FILE> β€” Set the input file

Examples

  • menyoki view test.jpg β€” View β€œtest.jpg” from the terminal
  • menyoki view test.png --transparent β€” View β€œtest.png” from the terminal with transparency enabled

πŸŽ€ OTHER SUBCOMMANDS πŸŽ€

okay so here's the cute part: you can change the GIF, APNG, PNG, JPG, and PNM encoding options by specifying flags/options to the corresponding subcommands. also, the save subcommand is there for changing the default output settings 🫢

GIF/APNG Subcommand

FLAGS:

  • --gifski β€” Use the gifski encoder <only in GIF>
  • --fast β€” Encode 3 times faster (gifski) <only in GIF>
  • -h, --help β€” Print help information

OPTIONS:

  • -f, --fps <FPS> β€” Set the FPS [default: 20]
  • -q, --quality <QUALITY> β€” Set the frame quality (1-100) [default: 75] <only in GIF>
  • -r, --repeat <REPEAT> β€” Set the number of repetitions [default: ∞]
  • -s, --speed <SPEED> β€” Set the GIF speed [default: 1.0]
  • --cut-beginning <S> β€” Cut the beginning of the GIF [default: 0.0]
  • --cut-end <S> β€” Cut the end of the GIF [default: 0.0]

SUBCOMMANDS:

  • save β€” Save the output file(s)
heads up bestie: some options might be only usable with a particular action πŸ’€

PNG Subcommand

FLAGS:

  • -h, --help β€” Print help information

OPTIONS:

  • -c, --compression <COMPRESSION> β€” Set the compression level [default: fast] [possible values: default, fast, best]
  • -f, --filter <FILTER> β€” Set the filter algorithm [default: sub] [possible values: none, sub, up, avg, paeth]

SUBCOMMANDS:

  • save β€” Save the output file(s)

JPG Subcommand

FLAGS:

  • -h, --help β€” Print help information

OPTIONS:

  • -q, --quality <QUALITY> β€” Set the image quality (1-100) [default: 90]

SUBCOMMANDS:

  • save β€” Save the output file(s)

WEBP Subcommand

FLAGS:

  • -l, --lossless β€” Use lossless encoding
  • -h, --help β€” Print help information

OPTIONS:

  • -q, --quality <QUALITY> β€” Set the lossy encoding quality (1-100) [default: 80]

SUBCOMMANDS:

  • save β€” Save the output file(s)

PNM Subcommand

FLAGS:

  • -h, --help β€” Print help information

OPTIONS:

  • -f, --format <FORMAT> β€” Set the PNM format [default: pixmap] [possible values: bitmap, graymap, pixmap, arbitrary]
  • -e, --encoding <ENCODING> β€” Set the encoding for storing the samples [default: binary] [possible values: binary, ascii]

SUBCOMMANDS:

  • save β€” Save the output file(s)

Save Subcommand

FLAGS:

  • -e, --with-extension β€” Always save the file with an extension
  • -t, --timestamp β€” Add Unix timestamp to the file name
  • -h, --help β€” Print help information

OPTIONS:

  • -d, --date <FORMAT> β€” Add formatted date/time to the file name [default: %Y%m%dT%H%M%S]

ARGS:

  • <FILE> β€” Set the output file

✨ KEY BINDINGS ✨

okay so these key bindings are only used and present while you're doing a capture or record action. basically they're for selecting your capture/record areas and resizing them with zero mouse interaction β€” keyboard main character energy, fr fr πŸ’…

there are 3 types of key bindings in terms of what they do:

  1. Action keys β€” the main action keys such as LAlt-S, and yes they can be customized via the --action-keys and --cancel-keys options. the keymap enum link is right here: https://docs.rs/device_query/latest/device_query/keymap/enum.Keycode.html
  2. Cancel keys β€” the keys that cancel the operation, e.g. LControl-D
  3. Miscellaneous keys β€” the keys that resize the selected area, such as LAlt-[up]

here's the key β†’ action tea, bestie:

  • LAlt-[S/Enter] β€” start/stop recording or screenshot the selected area
  • LControl-D, Escape β€” cancel the current operation
  • LControl-C β€” cancel the current operation or stop recording
  • LAlt-[arrow keys/hjkl] β€” increase the area padding (decrease the size of the area)
  • LControl-LAlt-[arrow keys/hjkl] β€” decrease the area padding (increase the size of the area)
  • LShift-LAlt-[arrow keys/hjkl] β€” reposition the selected area (move around)
  • LAlt-[1-9] β€” set the speed factor of changing the area size (default: 3)
  • LAlt-R β€” reset the area padding to default

πŸ‘‘ AUTHOR

written by Orhun Parmaksız <orhunparmaksiz@gmail.com> 🫢

πŸ› REPORTING BUGS

contact the author via email, or use GitHub Issues for reporting bugs: https://github.com/orhun/menyoki/issues/ β€” no cap, they want the bug reports πŸ’€

Copyright Β© 2020-2024 Orhun ParmaksΔ±z Licensed under GPLv3: https://gnu.org/licenses/gpl.html

πŸ¦‹ SEE ALSO

see the project homepage at https://github.com/orhun/menyoki for full documentation ✨


that's the whole page, bestie β€” this iconic manual is menyoki 1.7.0, dated March 2023, and you just read MENYOKI(1) πŸ’–πŸŒˆ now go slay some captures πŸ’…

πŸ“¦ where this page comes from