Skip to content

Commit

Permalink
Add handy screenshot utility
Browse files Browse the repository at this point in the history
  • Loading branch information
axiom committed Sep 20, 2012
1 parent 33da820 commit 2f379b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions capture
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/zsh -f

destination_directory=$HOME/work/scrap/img/
temporary_file=$(mktemp screenshot.XXXXXXX.png)

import $temporary_file

basename=${${(s@.@)temporary_file:t}[1]}_$$
filename=$(zenity --entry --text="Enter image file name" --entry-text="${basename}").png
filename=${filename:gs@ @-}

mv $temporary_file $destination_directory/$filename
chmod +r $destination_directory/$filename
echo http://saturn.lan/img/$filename | xclip -i
xclip -o

0 comments on commit 2f379b1

Please sign in to comment.