Last active
July 10, 2020 21:06
-
-
Save CodeLongAndProsper90/e4bfcf5b7d5cb4556a0177fe30e4264f to your computer and use it in GitHub Desktop.
Revisions
-
CodeLongAndProsper90 revised this gist
Jul 10, 2020 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ !/bin/bash if ! test -d ~/Screenshots then @@ -18,7 +18,7 @@ fi if [ "$1" == "instant" ] || [ "$1" == "i" ] then scrot ~/Screenshots/`date +%s`.png elif [ "$1" == "gimp" ] || [ "$1" == "g" ] then @@ -33,13 +33,13 @@ elif [ "$1" == "gimp" ] || [ "$1" == "g" ] fi scrot ~/Screenshots/`date +%s`.png gimp ~/Screenshots/`date +%s`.png rm -f ~/Screenshots/`date +%s`.png elif [ "$1" == "delay" ] || [ "$1" == "d" ] then scrot ~/Screenshots/`date +%s`.png --delay "$2" else echo "[i]nstant: Take a screenshot" echo "[g]IMP: Open in the GIMP" -
CodeLongAndProsper90 created this gist
Jul 10, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ #!/bin/bash if ! test -d ~/Screenshots then mkdir ~/Screenshots fi if ! command -v scrot &> /dev/null then echo "scrot not installed or missing from \$PATH. Cannot continue." echo "Stop." exit 1 fi if [ "$1" == "instant" ] || [ "$1" == "i" ] then scrot ~/Screenshots/`date +%s` elif [ "$1" == "gimp" ] || [ "$1" == "g" ] then if ! command -v gimp &> /dev/null then echo "gimp not installed or missing from \$PATH. Cannot continue." echo "Stop." exit 1 fi scrot ~/Screenshots/`date +%s` gimp ~/Screenshots/`date +%s` rm -f ~/Screenshots/`date +%s` elif [ "$1" == "delay" ] || [ "$1" == "d" ] then scrot ~/Screenshots/`date +%s` --delay "$2" else echo "[i]nstant: Take a screenshot" echo "[g]IMP: Open in the GIMP" echo "[d]elay: Delay $2 seconds" echo "" echo "Exit status 0: Finshed" echo "Exit status 1: Missing dependences" fi