From: daid kahl <daidxor@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] alsamixer transparent, should submit feature to bugzilla?
Date: Fri, 26 Feb 2010 21:19:15 +0900 [thread overview]
Message-ID: <3ac129341002260419j7fea4135seb921010371b9cfa@mail.gmail.com> (raw)
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);
next reply other threads:[~2010-02-26 12:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 12:19 daid kahl [this message]
2010-02-26 13:32 ` [gentoo-user] alsamixer transparent, should submit feature to bugzilla? Stroller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ac129341002260419j7fea4135seb921010371b9cfa@mail.gmail.com \
--to=daidxor@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox