Wednesday, January 10, 2018

How to Fix: Firefox 57+ Status Bar


I used to use an extension called Status-4-Evar, which did a lot of neat things.  Mozilla has been ruining Firefox's status bar for a long time, and this extension let us get it back the way we wanted.  For me, I want an area of the screen where URLs and status text can appear, but does not vanish or move depending on where my cursor is.  I also don't want it to overlap with useful page real estate.  Basically everything the new Chrome-style corner status bubble is, I do not want.  Recently, Mozilla made more changes which make Status-4-Evar incompatible with new versions.

Many people would prefer to have their downloads and other extension icons down in the bottom bar as well.  That's where I used to have them, but it doesn't bother me terribly to have them up in the top bar instead.

This fix addresses only my consistent-status-area concern, not the icon stuff.  There are solutions out there which re-position and re-purpose the bookmark toolbar and let icons live there.  This is a much simpler and admittedly less-flexible hack.

Credit where it's due; I started with this:
https://github.com/MatMoul/firefox-gui-chrome-css/blob/master/chrome/userChrome.css

My solution is to create "~/.mozilla/firefox/(my profile)/chrome/userChrome.css" containing:
#browser-bottombox {
 height: 1.4em;
 border-top: solid thin #505050;
}
.browserContainer>statuspanel {
 left: 4px !important; bottom: 2px;
 transition-duration: 0s !important;
 transition-delay: 0s !important;
}
.browserContainer>statuspanel>.statuspanel-inner>.statuspanel-label {
 margin-left: 0px !important;
 border: none !important;
 padding: 0px !important;
 background: rgb(0,0,0,0) !important;
 color: silver !important;
}

window[inFullscreen="true"] #browser-bottombox {
 display:none !important;
}
window[inFullscreen="true"] .browserContainer>statuspanel[type="overLink"] .statuspanel-label {
 display:none !important;
}

Your mileage may vary, and unless you use a dark theme (like I do) you'll probably want something other than color: silver for the actual status bar text.

Mozilla, get your house in order.  Let us customize our browser; you are not Google or Apple, that is why we like you.

Tuesday, January 09, 2018

Arcade Sticks and MAME and Key Events, Oh My

This is a solution so simple I feel very silly for not thinking of it sooner.

from a virtual console: (as in ctrl+alt+f1 etc)
    xinit /usr/games/mame -- :1


So my actual problem, for anyone who's curious, is that while using MAME to play some arcade games, my window manager (spectrwm) was capturing the "Alt" key (player 1's second button by default) and doing whatever actions alt+this and alt+that were bound to, depending on what other buttons (keys) were being pressed.

"Just remap the buttons" is a common answer, and not a bad one in many situations.  But the keyboard I use when playing arcade games is this big ol' thing:
It looks and feels like and is in fact built from arcade joystick hardware, but for maximum compatibility it acts like a keyboard when plugged into a computer.  It does indeed support remapping its "keys", but I'm running linux for cripe's sake, there had to be a better way.

I started down this logical path:  VirtualBox (virtual machine container; think VMware but open) steals the entire keyboard so that Alt and other modifier keys end up going to the virtual machines it runs, rather than the host.  Now and then, I get trapped on a certain screen for a moment because I can't just alt+number my way to another one.  It's a mildly annoying but useful feature.  MAME, the software I use to run old arcade games, doesn't seem to have any such option, but it really ought to.

VirtualBox and MAME are both open, so I could dive into the code and see how the keyboard grabbing is done in the former, and possibly graft it into the latter.  I imagine the abstractions used in each case are quite different, but I bet given time I (or someone) could figure it out without too much hassle.

But if I'm going to dive into code, maybe there was something simpler I could do.  Spectrwm, my window manager, is tiny compared to VirtualBox or MAME.  It does almost nothing, which is why I like it.  One of the things it does manage is the ability to assign special behaviour to certain programs.  (It calls these special cases "quirks".)  Perhaps I could dig in there and have it ignore all hotkeys when a certain program (mame) is active.

Then it hit me, again, that I'm running linux, for cripe's sake.  Just because I'm using spectrwm on my X server doesn't mean I can't run another X server with no window manager at all.  And sure enough, if I fire up a second instance of X thusly:
    xinit /usr/games/mame -- :1
...then I have a completely isolated X running only MAME, and can switch between it and my main X session anytime.  For me, this is the best of all worlds.  I can keep up spectrwm and mame updated without having to manage any local patches, and I can mash any combination of those big joystick buttons without any unintended behaviour.

Some keyword search phrases, for any future schmucks having similar trouble:
  • mame grab alt key
  • mame spectrwm keys
  • mame window manager keys
  • wrap x keyboard events
  • linux x grab all keys
  • mame grab keys like virtualbox

Monday, November 13, 2017

Book

This is Book.  So named for looking like he's got writing on him, and since "Boo" and "Bo" for short also suit him.  His mellow temperament also reminds us of Shepherd Book from Firefly.


To expand on that particular metaphor, he inadvertently spooks our in-house mental patient, whose most positive reaction to him so far has been along the lines of "keep walkin', preacher man".


We adopted Book as a late anniversary present to each other, and Autumn (River?  ;^) hasn't fully forgiven us since.  They can be civil at close quarters as long as they're sleepy or getting snacks, but otherwise Book is eager to play and Autumn is eager to growl, hiss, and be a drama queen until pesty little brother goes away.

It will be in Autumn's interests to warm up to him sooner than later, since at 8 months Book is showing every sign that he's going to be a big beefy boy.

Welcome to the family little guy, we're happy you seem to like us all.  ...Even though your big sister's a brat.  ...And your human parents are silly enough to keep adopting you young energy-filled cats.


Tuesday, August 08, 2017

Move Moments

We bought a house.  We've been moving into it.  There's more to tell there than is worth telling, and certainly more than is worth reading about.  But the other day we moved a big couch and chair, which required renting a van.  In lieu of my usual long-winded babbling, here are a few captured moments.


 It's just a bruise.  But yeah, it scared me at first too.

 The van and garage doors shared a moment.

Brainstorm: hide away bedside cords from the cat.
(Our implementation was simpler but works :^)

Monday, June 26, 2017

Doodled Dudes

One thing that I haven't seen dug up from the 1980s, slathered in modern attention-deficit-mediocrity and re-sold to us is those little finger puppet monsters.  They contained no sound chips, activated no unlockable video game content, and were cheap enough to come in happy meals.  Probably.  Who knows if I can remember the 80s correctly.

Alternate opening paragraph:

Nowadays everybody's 3D-printing fidget spinners.  Perfectly fitting for today - can't sit still, noisy, no personality.  Me, I've got a not-completely-atrophied imagination and my little 3D pen came with some flexible rubbery plastic stock.  So now if my fingers need to do some fidgeting, here's what I've got:


Precision, detailed figures they are not.  But, they're cute enough not to have been banished from my desk yet.

Friday, June 23, 2017

Cobbled Counterfiet Cat Carrier Clip

A lifetime ago, we had a sweet kitty who, when boarded at the vet's while we were away, managed to knock over a room full of pet carriers.  Everything survived, more or less, but ever since then our carrier has been suspiciously missing one of the clips that holds it together.

With Murphy, that wasn't a problem since she basically weighed nothing.  Our current kitty, though, has a bit more junk in the trunk, and is going to need proper support when we move, and take her to her overdue vet visit, etc.

3D printers are all the rage, able to turn files from CAD or animation software into physical, strong plastic parts.  I'd like to have one of those some day but for now the closest I've got is a more arts-and-crafts version - a 3D pen that draws in plastic by hand.  It really is to a 3D printer what an ink pen is to an inkjet printer.  With a steady hand and some thinking ahead, it's possible to make useful stuff.


My hand isn't super steady and I don't plan things all that well, but still the replacement carrier clip turned out pretty nicely.  :^)


The inside of a pen with a couple layers of masking tape was just the right size to scribble the part's "hooks" onto.  The flat bits are just a matter of filling in a shape on paper (or on masking tape, since the melted plastic doesn't stick to that quite as stubbornly).


It snapped right into place, just like the "real" one.  If I cared about it being pretty, I could sand it down a bit, but since its lot in life is to clamp together a cat carrier, I called it good as-is.

If it's not a bit dinged up and cobbled-together, it's probably not mine.  (My wife wishes I wouldn't say that, but she's the exception that proves the dinged-up, cobbled-together rule.  :^)