dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit 5921975e82a0acefb3aad29d41aa63ffccf010f8
parent f92801de17f1a64be4dee85449592196959409e6
Author: Paco Esteban <paco@onna.be>
Date:   Sun, 11 Nov 2018 20:50:53 +0100

finally screenshots !

Diffstat:
bin/bin/screenshot.sh | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/bin/bin/screenshot.sh b/bin/bin/screenshot.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -eu + +if ! command -v maim ; then + echo "Maim not installed" + exit 1 +fi + +SHOT_FILE="shot_$(date +%Y%m%d%H%M%S).png" +SHOT_FOLDER="$HOME/tmp/shots" +TYPE=${1:--s} + +if [ ! -d "$SHOT_FOLDER" ]; then + echo "Dest folder does not exists: $SHOT_FOLDER" + exit 1 +fi + +maim "$TYPE" "$SHOT_FOLDER/$SHOT_FILE"