Last active
May 30, 2017 15:37
-
-
Save chbuschmann/e97bc85e789dff21d788414b96744119 to your computer and use it in GitHub Desktop.
Change Fileformat for Apples Built-in Screengrab Tool
This file contains 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 characters
#!/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