<font class="Apple-style-span" face="'courier new', monospace"><b><div><span class="Apple-style-span" style="font-weight: normal;"><font class="Apple-style-span" face="arial, helvetica, sans-serif">Hello!</font></span></div>
<div><span class="Apple-style-span" style="font-weight: normal;"><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;">I'm pleased to announce a small utility program I wrote recently. Today I pushed version 0.2.0.0 of </span>mute-unmute<span class="Apple-style-span" style="font-weight: normal;"> to Hackage, from with you can cabal-install it right now (following the usual 'update' step). What it does? It's simple: it will </span>mute<span class="Apple-style-span" style="font-weight: normal; "> the sound when you </span>lock<span class="Apple-style-span" style="font-weight: normal; "> your screen and </span>unmute<span class="Apple-style-span" style="font-weight: normal; "> it back again when you </span>unlock<span class="Apple-style-span" style="font-weight: normal; "> it.</span></font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;">Why anyone would need such program? Well, this is a little bit more complicated.</span></font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;">I work in "open space" kind of office. It can get quite noisy there. I often sit with headphones on, but when I walk away from my desk I put them down and lock my screen. Here comes uncomfortable moment: when I remove my headphones suddenly people around me who </span>doesn't <span class="Apple-style-span" style="font-weight: normal;">use their headphones now start to hear the music I listen to. And they don't always like it, so I </span>manually<span class="Apple-style-span" style="font-weight: normal; "> mute the sound to make happy.</span></font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; ">But now, instead of doing this task by hand I have a program do it for me :-)</span></font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;">Unfortunately this kind of programs tend to be pretty much platform specific. Current version supports the recent versions of Gnome and KDE, but needs ALSA. It's quite common setup, but if you happen to have a different one you can easily hack the code (it's very straightforward) and send me patches. Patches are always welcome. The source repo is on Github and released versions are on Hackage:</span></font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;"><br></span></font></div><div><span class="Apple-style-span" style="font-weight: normal; "><b><div style="display: inline !important; ">
<font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal;">Github: </span></font></div></b></span><span class="Apple-style-span" style="font-weight: normal; "><b><div style="display: inline !important; ">
<font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><span class="Apple-style-span" style="font-family: 'courier new', monospace; "><b><div style="display: inline !important; ">
<font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><a href="http://github.com/Tener/mute-unmute#">http://github.com/Tener/mute-unmute</a></span></font></div>
</b></span></span></font></div></b></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><b><div style="font-weight: normal; "><span class="Apple-style-span" style="font-weight: normal; ">Hackage: </span><b><div style="display: inline !important; ">
<b><div style="display: inline !important; "><div style="display: inline !important; "><a href="http://hackage.haskell.org/package/mute-unmute"><span class="Apple-style-span" style="font-weight: normal;">http://hackage.haskell.org/package/mute-unmute</span></a></div>
</div></b></div></b></div></b></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; "><br></span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-weight: normal; ">Example use:</span></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><b><br></b></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><b><div>~/ mute-unmute <i># first session, it will ask for configuration options</i></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Creating config directory...</span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Mute config is missing...</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">Mute sound card and press RETURN</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Unmute config is missing...</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">Unmute sound card and press RETURN</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Session: UnixAbstract {addrPath = "/tmp/dbus-1tB1AEUcgg", addrGuid = Just "19ec85e3778816ad38a77bbf0000003f"}</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Connected</span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface "org.gnome.ScreenSaver",MatchMember "ActiveChanged",MatchPath "/org/gnome/ScreenSaver"]</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface "org.freedesktop.ScreenSaver",MatchMember "ActiveChanged",MatchPath "/ScreenSaver"]</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">^C</span></div><div><br></div><div>~/ mute-unmute <i># remembers previous options which can be changed by calling with --store switch</i></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Session: UnixAbstract {addrPath = "/tmp/dbus-1tB1AEUcgg", addrGuid = Just "19ec85e3778816ad38a77bbf0000003f"}</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Connected</span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface "org.gnome.ScreenSaver",MatchMember "ActiveChanged",MatchPath "/org/gnome/ScreenSaver"]</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface "org.freedesktop.ScreenSaver",MatchMember "ActiveChanged",MatchPath "/ScreenSaver"]</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Message {mType = Signal, mFlags = [NoReplyExpected], mSerial = 31, mPath = Just "/org/gnome/ScreenSaver", mInterface = Just "org.gnome.ScreenSaver", mMember = Just "ActiveChanged", mErrorName = Nothing, mReplySerial = Nothing, mDestination = Nothing, mSender = Just ":1.19", mBody = [Variant (True) {- b -}]}</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Lock screen</span></div><div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Message {mType = Signal, mFlags = [NoReplyExpected], mSerial = 32, mPath = Just "/org/gnome/ScreenSaver", mInterface = Just "org.gnome.ScreenSaver", mMember = Just "ActiveChanged", mErrorName = Nothing, mReplySerial = Nothing, mDestination = Nothing, mSender = Just ":1.19", mBody = [Variant (False) {- b -}]}</span></div>
<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Unlock screen</span></div><div><span class="Apple-style-span" style="font-weight: normal;">^C</span></div><div><br></div></b></font></div><div>
<br></div></b></font><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">You can get usage information with </font><font class="Apple-style-span" face="'courier new', monospace">--help</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> switch:</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br><b>~/ mute-unmute --help<br></b>mute-unmute<br> --store ask for mute and unmute configurations<br> --store-mute ask for mute configuration<br>
--store-unmute ask for unmute configuration<br> -d --daemon wait for screensaver state changes<br> -h, -? --help show help</font><br></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">There isn't much more I can say. I hope you find the program at least educational (as a simple example of DBus usage) if not useful.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Best regards,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Krzysztof Skrzętnicki</font></div>