anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#16
I have edited the script a little bit.

"Please enter the name" I changed to"Please enter the file name"

"What type of image?" to"Chose image type"

"Pick" to"Select"

What do you think?

The script is in antiX-M8
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#17
Sounds more appropriate. I will edit the original post for people using it now.

Thanks
Posts: 1,081
OU812
Joined: 29 Sep 2007
#18
Very nice, indeed. It's really coming along. I'm proud of you. I made some minor changes in the grammar to suit my personal tastes, but more importantly, I edited your code so that the .jpg option is automatically"pressed." I felt that if jpg is the first option, then it should be the default option. Here's what I have:

Code: Select all

#!/bin/bash

###    Zenscreen 2.0
### Description:
### Zenscreen is a combination of Scrot and Zenity.
### It is used for naming your screen shots in the
### graphical envirionment of your choice.
###
### Depndencies:
### Of course you need to have both scrot and zenity
### installed for this script to work.
###
###
### Thank you to OU812 (John) for his additions and enlightenment.

NAME=$(zenity --title"Zenscreen" --entry --text"Please enter a file name.") &&
  EXT=$(zenity --list --title"Zenscreen" --text"Choose an image type." --radiolist --column"Select" --column"Image Type" TRUE"jpg" FALSE"png" FALSE"bmp" FALSE"tif") &&
  FILE=$(echo $NAME.$EXT)

if ["$?" ="0" ] ; then
   scrot -d 5 $n"$FILE" && zenity --title"Zenscreen" --info --text"Your screenshot has been saved as\n $HOME/$FILE"
fi

if ["$?" ="1" ] ; then
   exit
fi
The only other thing to consider is setting the geometry of the window. The problem with this option is that changing gtk2 styles will mess with the window geometry and it won't look as nice. So I would ultimately suggest against hardwiring the dimensions. Great work.

john
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#19
Thanks John,

I left all options"unpressed" because of the comments left here. You mentioned jpg and I think it was mariel77 that said png so I left it open.

I did try to play with the window dimensions but like you said, it just doesn't work correctly. You get unexpected results.

Thank you for your input, much appreciated.
Posts: 253
mariel77
Joined: 13 Sep 2007
#20
You are all doing great with this. And changing it faster than I can keep up! LOL!
It's OK to have jpg as the default because I can change to png when I need it. (I sometimes use screen shots in presentations and the pngs seem to keep more detail.) I am pretty sure ksnapshot defaults to jpg until you tell it to save as something else. and then it stays on that.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#21
I hope it works as expected for you mariel77. Enjoy.
Posts: 609
dark-D
Joined: 02 Jun 2008
#22
i suggest to put : not . after choose image type or file name
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#23
Now updated to version 2.5. See the original post for the download and screenshots.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#24
Very nice!

Is there a way to have the user choose the time delay?
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#25
I will look into it. I think I can do it.
Posts: 253
mariel77
Joined: 13 Sep 2007
#26
I updated to 2.5 today; i never did get to 2. I really like it. Thanks! I'll have to post a screenshot now.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#27
Updated again!

As per Anticapitalista's request Zenscreen now allows you to enter a delay time in seconds when taking a full screen shot.

List of features:
-Name your shot anything you like
-Choose an image type (jpeg, png, bmp, tiff)
-Set the amount of time delay in seconds
-Select a specific screen area to shoot


Anything else Anti?
Posts: 609
dark-D
Joined: 02 Jun 2008
#28
i just updated my zenscreen to 2.5, love it!!! i had to install it manually because i followed the steps in the readme and i got an directory missing error. i have antix m8 and in there zenscreen.sh is screenshot.sh. also on choose area there is no default image type i edited the script and added true to jpg.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#29
What was the directory? I tested it on a couple of machines here and got no error.
Posts: 609
dark-D
Joined: 02 Jun 2008
#30
it didn't say as i remember. i'll try it again tonight and post the error.