Package: scrot Version: 0.8-11 Severity: wishlist Tags: patch scrot beeps every time making screenshot. Although it may be convinient, my task (taking screenshot every 30 seconds) requires option that may disable such behaviour. Patch included.
-- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages scrot depends on: ii giblib1 1.2.4-5 wrapper library for imlib2, and ot ii libc6 2.11.1-3 Embedded GNU C Library: Shared lib ii libfreetype6 2.3.11-1 FreeType 2 font engine, shared lib ii libimlib2 1.4.2-8+b1 powerful image loading and renderi ii libx11-6 2:1.3.3-3 X11 client-side library ii libxext6 2:1.1.1-3 X11 miscellaneous extension librar ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime scrot recommends no packages. scrot suggests no packages. -- no debconf information
diff -ur scrot-0.8//scrot.1 scrot-0.8-mod//scrot.1 --- scrot-0.8//scrot.1 2010-06-22 15:11:11.457328956 +0400 +++ scrot-0.8-mod//scrot.1 2010-06-22 15:19:20.449492469 +0400 @@ -49,6 +49,9 @@ .B -t, --thumb NUM generate thumbnail too. NUM is the percentage of the original size for the thumbnail to be. +.TP 5 +.B -z, --silent +prevent beeping. .SH SPECIAL STRINGS Both the .B --exec diff -ur scrot-0.8//src/main.c scrot-0.8-mod//src/main.c --- scrot-0.8//src/main.c 2010-06-22 15:11:11.445328233 +0400 +++ scrot-0.8-mod//src/main.c 2010-06-22 15:20:59.480328999 +0400 @@ -154,7 +154,7 @@ { Imlib_Image im; - XBell(disp, 0); + if (! opt.silent) XBell(disp, 0); im = gib_imlib_create_image_from_drawable(root, 0, 0, 0, scr->width, scr->height, 1); @@ -336,7 +336,7 @@ } scrot_nice_clip(&rx, &ry, &rw, &rh); - XBell(disp, 0); + if (! opt.silent) XBell(disp, 0); im = gib_imlib_create_image_from_drawable(root, 0, rx, ry, rw, rh, 1); } return im; diff -ur scrot-0.8//src/options.c scrot-0.8-mod//src/options.c --- scrot-0.8//src/options.c 2010-06-22 15:11:11.465327358 +0400 +++ scrot-0.8-mod//src/options.c 2010-06-22 15:22:59.740326693 +0400 @@ -44,7 +44,7 @@ static void scrot_parse_option_array(int argc, char **argv) { - static char stropts[] = "bcd:e:hmq:st:uv+:"; + static char stropts[] = "bcd:e:hmq:st:uv+:z"; static struct option lopts[] = { /* actions */ {"help", 0, 0, 'h'}, /* okay */ @@ -55,6 +55,7 @@ {"focussed", 0, 0, 'u'}, /* macquarie dictionary has both spellings */ {"border", 0, 0, 'b'}, {"multidisp", 0, 0, 'm'}, + {"silent", 0, 0, 'z'}, /* toggles */ {"thumb", 1, 0, 't'}, {"delay", 1, 0, 'd'}, @@ -109,6 +110,9 @@ case 't': options_parse_thumbnail(optarg); break; + case 'z': + opt.silent = 1; + break; default: break; } @@ -246,6 +250,7 @@ " -t, --thumb NUM generate thumbnail too. NUM is the percentage\n" " of the original size for the thumbnail to be,\n" " or the geometry in percent, e.g. 50x60 or 80x20.\n" + " -z, --silent Prevent beeping\n" "\n" " SPECIAL STRINGS\n" " Both the --exec and filename parameters can take format specifiers\n" " that are expanded by " PACKAGE " when encountered.\n" diff -ur scrot-0.8//src/options.h scrot-0.8-mod//src/options.h --- scrot-0.8//src/options.h 2010-06-22 15:11:11.445328233 +0400 +++ scrot-0.8-mod//src/options.h 2010-06-22 15:23:23.482587357 +0400 @@ -35,6 +35,7 @@ int focused; int quality; int border; + int silent; int multidisp; int thumb; int thumb_width;