diff --git a/Readme.md b/Readme.md index 1c2ca4bc..a7c23fb4 100644 --- a/Readme.md +++ b/Readme.md @@ -33,7 +33,7 @@ These are the script's optional dependencies: - Window manager detection: wmctrl - This is used as a fallback to parsing ```.xinitrc``` and ```$XDG_CURRENT_DESKTOP```. - Take a screenshot on script finish: scrot - - I'll add an option to specify a custom cmd soon. + - You can change this to another program with a ```--scrotcmd``` and an in script option. diff --git a/fetch b/fetch index 4607aa1c..de7b9808 100755 --- a/fetch +++ b/fetch @@ -212,6 +212,10 @@ xoffset=0 # --scrot on/off scrot="off" +# Screenshot program to launch +# --scrotcmd +scrotcmd="scrot -c -d 3" + # Scrot dir # Where to save the screenshots # --scrotdir /path/to/screenshot/folder @@ -219,7 +223,7 @@ scrotdir="$HOME/Pictures" # Scrot filename # What to name the screenshots -# --scrot +# --scrot str scrotname="fetch-%Y-%m-%d-%H:%M.png" @@ -763,7 +767,7 @@ getimage () { } takescrot () { - scrot -c -d 3 "$scrotdir/$scrotname" + $scrotcmd "$scrotdir/$scrotname" } @@ -874,6 +878,7 @@ usage () { cat << EOF --scrot Take a screenshot --scrotdir Directory to save the scrot --scrotfile File name of scrot + --scrotcmd Screenshot program to launch Other: --help Print this text and exit @@ -947,6 +952,7 @@ while [ "$1" ]; do --scrot|-s) scrot="on" ;; --scrotdir) scrot="$2" ;; --scrotfile) scrot="$2" ;; + --scrotcmd) scrot="$2" ;; # Other --help) usage ;;