Year: 2014

Understanding GNU Screen’s hardstatus strings

My current development setup revolves mainly around Vim and GNU Screen. I use Screen only to keep sessions running between work days or in case I get disconnected, but lately I’ve been tempted to try using different windows inside Screen. In order to make this easier, I wanted one of those status lines that shows you all your windows as “tabs”.

Configuring this status line (the “hardware status line” or, as I’ll call it, “hardstatus”) is done with a single, often long string of characters in ~/.screenrc that at first can look entirely baffling:

hardstatus string "%{= KW} %H [%`] %{= Kw}|%{-} %-Lw%{= bW}%n%f %t%{-}%+Lw %=%C%a %Y-%M-%d"

Exactly.

To my dismay, almost everything I can find about hardstatus through Google are just dumps of other people’s strings, with little to no explanation about why they do what they do – it’s easy to imagine that the people who post them hardly know why they do what they do, either. GNU’s official documentation isn’t terribly helpful.

After finally deciphering a lot of what goes on in these strings, I wanted to spell it out to anybody else who might be hunting around for half a clue about this voodoo. There are (more than?) a few things I haven’t covered here, of course – truncation and conditionals, namely – but this should be enough to get you started.

Continue reading “Understanding GNU Screen’s hardstatus strings”

15 Responses

A fairer, more conscientious alternative to AdBlock Plus

Having just stumbled across an article advocating against AdBlock Plus (via Lea Verou), I decided to revisit my settings for relatively nuisance-free browsing in Firefox.

For a long time I’ve done development work and writing for a site that keeps its lights on through advertising, so I sympathize with content-creators’ need for (and frustration with) ads. It’s a necessary evil, and I’ve always found it a bit disheartening to see AdBlock Plus at the top of every “Popular Plugins” list (whether for Chrome, Firefox, or Safari). Worse, there seems to be a sense of entitlement among savvy internet users, telling them that they shouldn’t have to endure ads. Commonly this might be veiled as being “anti-corporate” or some other such vague excuse, but the real reasons are usually the same as those behind piracy: it’s just nice not to have to pay for things, whether through eyeballs, bandwidth, or dollars.

(None of this is to say that I am entirely innocent on these points.)

Still, there are some troubling common practices among the more insidious of these JavaScript embeds, and I think there is some justification in circumventing them. But one doesn’t need to block every advertisement to severely diminish advertisers’ ability to, say, keep track of one’s browsing habits.

Here are the things you can do to make your browsing a little more private and safe, while still (mostly) allowing the sites you love to pay their bills. These tips will be written for Firefox users (though the equivalent plugins are readily available in Chrome and Safari), and won’t include things that readers of this site will probably already know about (e.g., avoiding “watch movies free” sites and their ilk, and disabling pop-ups).

Continue reading “A fairer, more conscientious alternative to AdBlock Plus”

4 Responses

If Apple makes a watch

I don’t claim to be any kind of Apple pundit, but I have some hunches about what their watch will be like if and when they release one.

The two factors I see as being vital are price and simplicity.

Price

The Galaxy Gear starts at $299, which is a lot more, I think, than the average person (i.e., non-Android zealots) are willing to spend on a watch that they have to charge every night. A successful watch, one that gets into the hands of millions of people, will have to be closer to the “Apple impulse buy” price of the iPods Nano — at most $249, but I think they could do it for $199. (The Pebble E Ink watch is $150.) To reach that price point, an Apple watch will lack, for instance, a camera and a speaker, which are included in the Galaxy Gear.

Continue reading “If Apple makes a watch”

One Response