Added new mlvwm-screenshot wrapper script for maim, plus added 'ShortCut' configuration in .mlvwmrc so that ctrl-shift-3 & ctrl-shift-4 now take screenshots of the root window or a selected area, respectively. Issue #3

This commit is contained in:
Morgan Aldridge 2023-08-16 22:50:04 -04:00
parent df53e606e7
commit 020215b765
3 changed files with 17 additions and 1 deletions

View File

@ -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')

View File

@ -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

13
bin/mlvwm-screenshot Executable file
View File

@ -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"