<font class="Apple-style-span" face="&#39;courier new&#39;, 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&#39;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 &#39;update&#39; step). What it does? It&#39;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 &quot;open space&quot; 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&#39;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&#39;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&#39;s quite common setup, but if you happen to have a different one you can easily hack the code (it&#39;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: &#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><b><br></b></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, 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 = &quot;/tmp/dbus-1tB1AEUcgg&quot;, addrGuid = Just &quot;19ec85e3778816ad38a77bbf0000003f&quot;}</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 &quot;org.gnome.ScreenSaver&quot;,MatchMember &quot;ActiveChanged&quot;,MatchPath &quot;/org/gnome/ScreenSaver&quot;]</span></div>

<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface &quot;org.freedesktop.ScreenSaver&quot;,MatchMember &quot;ActiveChanged&quot;,MatchPath &quot;/ScreenSaver&quot;]</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 = &quot;/tmp/dbus-1tB1AEUcgg&quot;, addrGuid = Just &quot;19ec85e3778816ad38a77bbf0000003f&quot;}</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 &quot;org.gnome.ScreenSaver&quot;,MatchMember &quot;ActiveChanged&quot;,MatchPath &quot;/org/gnome/ScreenSaver&quot;]</span></div>

<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Handler added: [MatchType Signal,MatchInterface &quot;org.freedesktop.ScreenSaver&quot;,MatchMember &quot;ActiveChanged&quot;,MatchPath &quot;/ScreenSaver&quot;]</span></div>

<div><span class="Apple-style-span" style="font-weight: normal;">mute-unmute: Message {mType = Signal, mFlags = [NoReplyExpected], mSerial = 31, mPath = Just &quot;/org/gnome/ScreenSaver&quot;, mInterface = Just &quot;org.gnome.ScreenSaver&quot;, mMember = Just &quot;ActiveChanged&quot;, mErrorName = Nothing, mReplySerial = Nothing, mDestination = Nothing, mSender = Just &quot;:1.19&quot;, 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 &quot;/org/gnome/ScreenSaver&quot;, mInterface = Just &quot;org.gnome.ScreenSaver&quot;, mMember = Just &quot;ActiveChanged&quot;, mErrorName = Nothing, mReplySerial = Nothing, mDestination = Nothing, mSender = Just &quot;:1.19&quot;, 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="&#39;courier new&#39;, monospace">--help</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> switch:</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><br>

</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">There isn&#39;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>