1. Install scrot
sudo apt-get install scrot2. Create a file with your current project name. it can also be an environment variable but I find the file solution easier to work with.
echo MyProject > $HOME/.current3. Create a shell script with the following contents:
#!/bin/bash PROJECT=$(cat ${HOME}/.current) DATE=$(date +%Y-%m-%d.%s) if [ ! -d "${HOME}/projects/$PROJECT/shots" ]; then mkdir -p "${HOME}/projects/$PROJECT/shots" fi scrot "${HOME}/projects/${PROJECT}/shots/${PROJECT}_${DATE}.jpg" -s -q 904. You can create a lancher to this shell script that you can put in your launcher bar or whatever:
bash $HOME/screenshot.shYour screenshots will be saved for each project under the appropriate folder. Don’t forget to update your project file whenever you switch projects.
No comments:
Post a Comment