From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NkzAE-0003AB-CJ for garchives@archives.gentoo.org; Fri, 26 Feb 2010 12:19:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9251EE09A5; Fri, 26 Feb 2010 12:19:16 +0000 (UTC) Received: from mail-pz0-f177.google.com (mail-pz0-f177.google.com [209.85.222.177]) by pigeon.gentoo.org (Postfix) with ESMTP id 5DD14E09A5 for ; Fri, 26 Feb 2010 12:19:16 +0000 (UTC) Received: by pzk7 with SMTP id 7so8294pzk.16 for ; Fri, 26 Feb 2010 04:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=C2HmZ8hgX+lwyGlCMg70Y9uJuztCOsIG/jKlT54CpGg=; b=ahUO8bpxF4Ruy1aau3zcGXzldQBT5uQEmm+gsIRdFWiV5i6+r8Q0w776ONQvIA2GhH xVetkEDZcFA/+rELw5MIhR04vP30LzNpgD1DF7ZxNq+1HCm2QlSwg2kWulAicPloJVAm e/qtCyKfM9+ZPeZRrk8AOO8Ejj3H1eoyjno9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=JB4Lew1keeiNeZUFTERAo0Rfarexb/USenLkJ6LoHb4UecyOdozVjrfZpLPPYqUfkM Cx572li151JktvmteVdUvwAGnG3waaBhRKYg/CFE++pjtvUiXuvASR1cxh26WXQNH4+T DpWrM6c42OaTLd09CqveLbZOtm+x/jhi205qY= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.143.153.24 with SMTP id f24mr151919wfo.307.1267186755294; Fri, 26 Feb 2010 04:19:15 -0800 (PST) Date: Fri, 26 Feb 2010 21:19:15 +0900 Message-ID: <3ac129341002260419j7fea4135seb921010371b9cfa@mail.gmail.com> Subject: [gentoo-user] alsamixer transparent, should submit feature to bugzilla? From: daid kahl To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: ec69453a-de86-4af8-b61d-d19eda30a5ae X-Archives-Hash: 4761a78e82604126a5db4d9df979e980 Hello, I've been converting myself over to console applications when possible now. I think it has a sleek look, and it ought to reduce my overhead. So on my mutlimedia workspace, I'd considered running a nearly full screen terminal of alsamixer with a command line music player in a smaller terminal that is normally on top. However, for my pseduo-transparent terminals, this was a major eyesore to have a solid black background for alsamixer. Before I investigated other mixer option, google fu could produce a patch for alsa-utils to make alsamixer run transparent. So, with this patch in hand, then I could easily make a local overlay of alsa-utils, patch the ebuild, and get my desired result. The patch isn't for the latest ~x86 alsa-utils, so I may need to tweak it for more recent versions. My question is if anyone is going to accept this as a reasonable "feature" addition to alsa-mixer on the main portage tree. I assume perhaps not, but I can't really see almost any advantage of the forced black background. If you want a black background, I say run the terminal that way. I didn't make the patch, so I have no intention to take the credit myself, but I didn't want to look like a dunce on bugzilla, but I've never submitted a feature request that didn't make me look like a dunce, hence polling opinion here. You can see the patch below. In any case, of course ebuild patching >> plugins ~daid This idea came from https://www.prof-maad.org/blog/2009/11/11/transparent-alsamixer/ (and the website had some apparent security issues the other week when I found this, just fyi). daid@flux /usr/local/portage/media-sound/alsa-utils/files $ cat alsa-utils-1.0.20-transparency.patch --- alsa-utils-1.0.20/alsamixer/alsamixer.c 2009-05-06 15:07:24.000000000 +0800 +++ alsa-utils-1.0.20-profmaad1/alsamixer/alsamixer.c 2009-11-11 21:33:14.242278621 +0800 @@ -150,7 +150,7 @@ #define MIXER_CBAR_STD_HGT (10) #define MIXER_MIN_Y (MIXER_TEXT_Y + 6) /* abs minimum: 16 */ -#define MIXER_BLACK (COLOR_BLACK) +#define MIXER_BLACK (-1) #define MIXER_DARK_RED (COLOR_RED) #define MIXER_RED (COLOR_RED | A_BOLD) #define MIXER_GREEN (COLOR_GREEN | A_BOLD) @@ -320,7 +320,9 @@ dc_fg[n] = f; dc_attrib[n] = a; dc_char[n] = c; - if (n > 0) + if(b==-1) + init_pair (n, dc_fg[n] & 0xf, b); + else if (n > 0) init_pair (n, dc_fg[n] & 0xf, b & 0x0f); } @@ -339,6 +341,7 @@ mixer_init_draw_contexts (void) { start_color (); + use_default_colors(); mixer_init_dc ('.', DC_BACK, MIXER_WHITE, MIXER_BLACK, A_NORMAL); mixer_init_dc ('.', DC_TEXT, MIXER_YELLOW, MIXER_BLACK, A_BOLD);