Topic: [script] crunchooter
crunchooter is a script inspired by cruncbang rc.xml:
<keybind key="Print">
<action name="Execute">
<execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ & gpicview ~/images/$f'</execute>
</action>
</keybind>I was fed up to open my images with gpicview, cause I don't use gpicview; it's more convenient to use gnome-open instead. Moreover, I was fed up to have my images directory muddled by screenshots… crunchooter uses "~/images/shots/", but in the near future, I think it will use an environment variable, something like:
export SHOTSDIR="$HOME/my/preferred/path/to/save/screenshots"which it could be more adaptable…
It can use optipng to compress screenshots, on the fly… furthermore, it uses / tmp before moving the image in the folder… while the original command uses the $HOME before moving.
For a behavior similar to the original command line, just use:
crunchooter -othe image will open in your default program…
add -c option to compress using optipng:
crunchooter -octhe image is compressed into a sub process started in background and open in your default program… no wait.
# crunchooter --help
Usage: crunchooter [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-c, --compress use optipng to compress image
-o, --open open file using gnome-openExample of commands to install crunchooter in your ~/bin below:
cd ~/bin
wget http://88.174.112.74/share/debian/crunchooter.tar -O crunchooter.tar
tar -xvf crunchooter.tar
rm -v *.tarSome displays debugging can still be seen in the terminal. It's still fresh ... please disregard. Additional options could happen in the future, like a countdown. If you have ideas and / or suggestions, please.
Last edited by ~HP (2010-02-21 19:34:15)
