diff --git a/.mlvwm/.mlvwmrc b/.mlvwm/.mlvwmrc index 788b475..0f9a556 100644 --- a/.mlvwm/.mlvwmrc +++ b/.mlvwm/.mlvwmrc @@ -53,6 +53,8 @@ Left M PreviousSameDeskWindow Right M NextSameDeskWindow Escape M Restart mlvwm Escape SM Exit +3 SC Exec "mlvwm-screenshot" exec .bin/mlvwm-screenshot +4 SC Exec "mlvwm-screenshot" exec .bin/mlvwm-screenshot -s END # Load Theme from themes/ ('System7', 'MacOS8', or 'MacOS9') diff --git a/README.md b/README.md index f92911e..4743359 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ MLVWM includes a very rudimentary set of rc ([run command](https://en.wikipedia. * `make` * `unzip` * `curl` -* `xdotool` * ImageMagick +* `xdotool` (for `mlvwm-restart`) +* [`maim`](https://github.com/naelstrof/maim) & [`slop`](https://github.com/naelstrof/slop) (for `mlvwm-screenshot`) ## USAGE diff --git a/bin/mlvwm-screenshot b/bin/mlvwm-screenshot new file mode 100755 index 0000000..2f9d6ce --- /dev/null +++ b/bin/mlvwm-screenshot @@ -0,0 +1,13 @@ +#!/bin/sh + +# mlvwm-screenshot - Take a screenshot using maim and save it as a date-stamped PNG +# +# Assumes that your ~/.mlvwmrc contains the following: +# +# ShortCut +# 3 SC Exec "mlvwm-screenshot" exec ./bin/mlvwm-screenshot +# 4 SC Exec "mlvwm-screenshot" exec ./bin/mlvwm-screenshot -s + +SCREENSHOT_DIR=${SCREENSHOT_DIR:-$HOME/Pictures} + +maim "$@""${SCREENSHOT_DIR}/screenshot-$(date +%Y%m%d-%H%M%S).png"