Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90017 - new feature for media-gfx/xv: quick command keys
Summary: new feature for media-gfx/xv: quick command keys
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Tavis Ormandy (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2005-04-22 00:39 UTC by Alexey Spiridonov
Modified: 2005-08-21 06:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Make F1-F12 into quick command keys. (xv-3.10a-fkey-command-patch,2.63 KB, patch)
2005-04-22 00:40 UTC, Alexey Spiridonov
Details | Diff
Script to enable lossless rotation with jpegtran. (rot,121 bytes, text/plain)
2005-04-22 00:41 UTC, Alexey Spiridonov
Details
A very silly comment editor for JPEGs. (editcom,306 bytes, text/plain)
2005-04-22 00:42 UTC, Alexey Spiridonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Spiridonov 2005-04-22 00:39:07 UTC
I wrote a small new feature for xv; here's why. XV will never do everything that external programs can do. For instance, if you're rotating photos from landscape into portrait orientation, you should really be using jpegtran, since it's lossless, and faster. ImageMagick has a number of additional effects xv doesn't have. There are dozens of other handy external programs. A way to painlessly invoke them from xv is much better than to have to go to a terminal every time.

The attached patch allows the user to bind arbitrary shell commands to the F1-F12 keys (number of supported function keys is flexible). This is done by specifying resources (in, say ~/.Xdefaults), thus:

xv.F1command: rot 90 %s
xv.F2command: rot 270 %s
xv.F3command: @echo "The selection rect for '%s' is at (%d, %d), with size %dx%d."
xv.F4command: @editcom %s &

I'm also attaching the "rot" & "editcom" scripts.

Now, I can losslessly rotate the on-disk image by pressing F1 or F2.  I can edit the comments by pressing F4.  

About the '@' symbol: by default, the image is reloaded after a
command is run. '@' blocks this behavior.

The patch applies to the xv-3.10a-r11 release.

I hope this is useful enough to be included into the Gentoo patchset.
It would probably be helpful to include the above blurb, and the attached scripts with the documentation.

Reproducible: Always
Steps to Reproduce:
Comment 1 Alexey Spiridonov 2005-04-22 00:40:02 UTC
Created attachment 56899 [details, diff]
Make F1-F12 into quick command keys.
Comment 2 Alexey Spiridonov 2005-04-22 00:41:28 UTC
Created attachment 56900 [details]
Script to enable lossless rotation with jpegtran.
Comment 3 Alexey Spiridonov 2005-04-22 00:42:08 UTC
Created attachment 56901 [details]
A very silly comment editor for JPEGs.
Comment 4 Tavis Ormandy (RETIRED) gentoo-dev 2005-08-21 06:09:14 UTC
Hi Alexey, have you considered sending these patches to Greg Roelfs, who 
maintains a major patchset for xv (we use it in gentoo), Although your patches 
sound useful, I dont want to deviate too far from Greg's patchset.

http://www.sonic.net/~roelofs/greg_xv.html