Monday, 31 December 2018

Back to Training

After taking several weeks off from training, I now have just 3 weeks to prepare for my upcoming half marathon. Dammit. I didn’t mean to take that long off and now I’m in terrible shape again! It’s just so easy to keep being lazy when the alternative is harder than chilling on the couch.

Anyway, I got back out there today and ran just 2 miles. I kept a pretty good pace (9 min/mile average), but already my knee was bothering me. So I come home and do some Step Overs and 10 Cinder Block Pickups. Somehow, in this brief workout, I managed to totally fatigue something between my hamstring and groin. I don’t know what that muscle is, but it keeps threatening to crap up.

This sucks. I feel really unprepared and week. I guess I’ll just keep training, 6 days per week, and clean up my diet until race day (an hopefully after). I doubt I’ll even beat my previous best of 2 hours 10 minutes. No matter. I’ll do the best I can with what I’ve got and continue to improve. I’m planning to do several halfs and hopefully at least one full this year.

Saturday, 29 December 2018

Mopidy + PulseAudio + ncmpcpp

Oof. This was a real trick and a little bit of guess work, but I finally got the visualization in ncmpcpp to work with mopidy and pulseaudio. First, I found the ArchLinux ncmpcpp config walkthrough. That seemed really straight foward… but it didn’t work for me. After some dicking around, I figured it’s probably because I use mopidy instead of straight mpd. Okay… so I found this post. That seemed like it almost worked, but just failed in a slightly different way (mostly the ‘second command’ just didn’t work). Finally, I found this post on existence trainer and ncmpcpp would act like it was playing and the visualization worked, but I couldn’t hear anything. Shit. So close. Well let’s see. It’s gotta be in this line under :

output = tee name=t t. ! queue ! autoaudiosink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo

Everything looks good except this autoaudiosink business. What is that? I don’t really know, but let’s just try something.

output = tee name=t t. ! queue ! pulsesink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo

Hm. No connection. Well hang on just a sec! I had to add the line ‘output = pulsesink server=’ a while back, let’s see what that does.

output = tee name=t t. ! queue ! pulsesink server= t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo

Restart mopidy with ‘sudo systemctl restart mopidy’ and I’ll be damned. It all works. Okay. Now I can get back to my life. Phew.

Changing Default Browser in Debian

Not too long ago I wrote a short article about my findings in switching my default x-scheme-handler to Chrome for opening links from mutt. I used gio, and somehow it turned out to be pretty straight forward. I recently decided to switch back to Firefox for my browser, but now following links and viewing html email in a browser would open Chrome even though I used gio to set firefox-esr as my x-scheme-handler. That doesn’t even really matter anyway because I want to use firefox and not firefox-esr, but gio wouldn’t see firefox.desktop that I created in ~/.local/share/applications. What a headache.

It turns out that gio was not the tool that I needed. Or at least I’m pretty sure it was the wrong tool. Anyway, through a combination of articles, I discovered that not only did I need to create the .desktop file, but I needed to ‘install’ it using ‘sudo update-alternatives –install /usr/bin/x-www-browser x-www-browser /usr/bin/firefox 200’ then setting the default using ‘sudo update-alternatives –config x-www-browser’. So now mutt would try to open the text/html from the list of attachments from hitting ‘v’ in the pager, but I got the error ‘file:///tmp/mutt.html not found’.

A little further digging revealed that I needed a line in my .mailcap for ‘text/html; /usr/bin/firefox %s; description=HTML Text; test=test -n “$DISPLAY”; nametemplate=%s.html’ which I got from /etc/mailcap and changed to be firefox instead of firefox-esr and added ‘set implicit_autoview=yes’ in muttrc.

Sheesh. It’s working now. I don’t know if this was the totally proper way to do this, but it works and didn’t seem to break anything else. Yet. We’ll see if something turns up later.