Skip to content

Instantly share code, notes, and snippets.

@chbuschmann
Last active May 30, 2017 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chbuschmann/e97bc85e789dff21d788414b96744119 to your computer and use it in GitHub Desktop.
Save chbuschmann/e97bc85e789dff21d788414b96744119 to your computer and use it in GitHub Desktop.
Change Fileformat for Apples Built-in Screengrab Tool
#!/bin/bash
cat << "EOF"
# *************************************
# * *
# * Skift mellom lagringsformat *
# * som brukes ved skjermdump *
# * *
# *************************************
#
EOF
PS3="Hvilket filformat ønsker du?: "
options=(".png" ".jpg" ".tiff" ".pdf" "Avslutt")
select opt in "${options[@]}"
do
case $opt in
".png")
echo "Fette nais! Du har valgt .png"
defaults write com.apple.screencapture type png;killall SystemUIServer;break
;;
".jpg")
echo "Jævlig godt jobba! Du har valgt .jpg"
defaults write com.apple.screencapture type jpg;killall SystemUIServer;break
;;
".pdf")
echo "Du er en superhelt! Du har valgt .pdf"
defaults write com.apple.screencapture type PDF;killall SystemUIServer;break
;;
".tiff")
echo "Tiff? Du er rar. Du har valgt .tiff"
defaults write com.apple.screencapture type tiff;killall SystemUIServer;break
;;
"Avslutt")
break
;;
*) echo Ugyldig valg, velg mellom 1-4.;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment