Skip to content

Instantly share code, notes, and snippets.

@prachauthit
Last active November 27, 2019 16:23
Show Gist options
  • Save prachauthit/75ca3407980fce7179758f951abd7f76 to your computer and use it in GitHub Desktop.
Save prachauthit/75ca3407980fce7179758f951abd7f76 to your computer and use it in GitHub Desktop.
#!/bin/bash
ROOT_PATH="$HOME/Pictures"
create_dir () {
mkdir $1
cd $1
}
while getopts u:p: option
do
case "${option}"
in
p) PROJECT=${OPTARG};;
esac
done
if [ -z "$PROJECT" ]
then
echo "[-] Please use -p to specify a project's name"
exit
else
## Setting up path
destination="$ROOT_PATH/$PROJECT"
if [ -d "$destination" ]; then
echo "[-] The directory exists, please change the project name"
exit
fi
killall shutter
mkdir -p $destination
cd $destination
cp -f "$ROOT_PATH/template.xml" "$HOME/.shutter/profiles/$PROJECT.xml"
sed -i "s/REPLACEME/$PROJECT/g" "$HOME/.shutter/profiles/$PROJECT.xml"
rm -rf "$HOME/.shutter/settings.xml"
cp -f "$HOME/.shutter/profiles/$PROJECT.xml" "$HOME/.shutter/settings.xml"
shutter -p=$PROJECT --min_at_startup &>/dev/null &
fi
<opt>
<general app_version="0.94Rev.1290" as_help_active="1" asel_h="0" asel_w="0" asel_x="0" asel_y="0" ask_on_delete="" ask_on_fs_delete="" autofs="" autofs_min="" autofs_not="" autohide="1" autohide_time="400" autoshape_active="" border="1" bordereffect="2" bordereffect_active="" bordereffect_col="#000000" close_at_close="1" current_monitor_active="" cursor="" delay="0" delete_on_close="" filename="REPLACEME_%NNN" filetype="2" fname_autocopy="" folder="/home/user/Pictures/REPLACEME" ftp_mode="0" ftp_password="" ftp_uri="ftp://host:port/path" ftp_username="" ftp_wurl="http://example.com/screenshots" im_colors="2" im_colors_active="" image_autocopy="1" last_profile="0" last_profile_name="REPLACEME" menu_delay="10" menu_waround="1" no_autocopy="" notify_after="1" notify_agent="1" notify_ptimeout="1" notify_timeout="1" present_after="1" prog="Ristretto Image Viewer" prog_active="" quality="9" save_ask="" save_auto="1" save_no="" session_asc="" session_asc_combo="1" session_desc="1" session_desc_combo="1" thumbnail="50" thumbnail_active="" trans_backg="" trans_check="1" trans_custom="" trans_custom_col="#000000" visible_windows="" web_width="2" winresize_active="" winresize_h="500" winresize_w="500" zoom_active="1" />
<gui btoolbar_active="" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spbardistortion" binary="/usr/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion" category="Effect" lang="perl" name_plugin="Barrel Distortion" tooltip="Apply a distortion effect to your screenshot" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spnegate" binary="/usr/share/shutter/resources/system/plugins/perl/spnegate/spnegate" category="Effect" lang="perl" name_plugin="Negate" tooltip="Invert the colours of the image" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/sppolaroid" binary="/usr/share/shutter/resources/system/plugins/perl/sppolaroid/sppolaroid" category="Effect" lang="perl" name_plugin="Polaroid" tooltip="Make your screenshot look like a polaroid photo, add a caption, and even rotate it a little" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spresize" binary="/usr/share/shutter/resources/system/plugins/perl/spresize/spresize" category="Tool" lang="perl" name_plugin="Resize" tooltip="Resize your screenshot" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spsepia" binary="/usr/share/shutter/resources/system/plugins/perl/spsepia/spsepia" category="Effect" lang="perl" name_plugin="Sepia" tooltip="Add sepia colour toning to the image" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spshadow" binary="/usr/share/shutter/resources/system/plugins/perl/spshadow/spshadow" category="Effect" lang="perl" name_plugin="Hard Shadow" tooltip="Add a shadow to the image on a transparent background" />
<plugins name="/usr/share/shutter/resources/system/plugins/perl/spwatermark" binary="/usr/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark" category="Effect" lang="perl" name_plugin="Watermark" tooltip="Add a custom text watermark to your screenshot" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/spgrayscale" binary="/usr/share/shutter/resources/system/plugins/shell/spgrayscale/spgrayscale" category="Effect" lang="shell" name_plugin="Greyscale" tooltip="Turn the image into a grayscale image (256 shades)" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/spoffset" binary="/usr/share/shutter/resources/system/plugins/shell/spoffset/spoffset" category="Effect" lang="shell" name_plugin="Offset" tooltip="Give the picture an offset with itself as background" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/spraise" binary="/usr/share/shutter/resources/system/plugins/shell/spraise/spraise" category="Effect" lang="shell" name_plugin="Raise Border" tooltip="Raise a rectangular 3d-border" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/spsoftedges" binary="/usr/share/shutter/resources/system/plugins/shell/spsoftedges/spsoftedges" category="Effect" lang="shell" name_plugin="Soft Edges" tooltip="Add soft edges around the image" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/spsunk" binary="/usr/share/shutter/resources/system/plugins/shell/spsunk/spsunk" category="Effect" lang="shell" name_plugin="Sunk Border" tooltip="Add an inverted 3d border to the image" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/sptornedpaper" binary="/usr/share/shutter/resources/system/plugins/shell/sptornedpaper/sptornedpaper" category="Effect" lang="shell" name_plugin="Torned Paper" tooltip="Add a torn-like border to the image" />
<plugins name="/usr/share/shutter/resources/system/plugins/shell/sptrim" binary="/usr/share/shutter/resources/system/plugins/shell/sptrim/sptrim" category="Tool" lang="shell" name_plugin="Autocrop" tooltip="Remove empty borders from the image" />
<recent ruu_hosting="0" ruu_places="0" ruu_tab="0" />
</opt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment