Window Sizes in Tiling Window Managers

There’s an issue in tiling window managers, that I think a lot folks who are used to floating window managers never expect. I wrote a post to the Awesome listserv a while back explaining this to someone, and it seems to have struck a chord (I saw the post linked to last week). I thought I’d write a brief post here to explain what’s going on in a more clear and general way.

The Problem

When tiled, windows don’t seem to take up all the space that’s available to them. This creates weird “gaps” between windows. But only some windows: Firefox is immune to this problem, while terminal emulators like xterm, and urxvt, and gVim, and emacs get all funky.

What’s Happening

The application that are affected by this draw their windows based upon a number of fixed width columns. We’ll note that terminal emulators, as well as GUI versions of programmer’s text editors like vim and emacs, all used fixed-width fonts and often allow you to set window sizes based on the number of columns (of characters).

As a result, these applications are only able to use space on the screen in increments of full characters. Most of the time, in floating window managers, we never really notice this limitation.

In tiling window managers you do notice, because the window manager forces the windows to use all available space, except in some windows it leaves these weird gaps at the bottom and right of the window. Sometimes the gaps end up in the window, as unusable buffers, and sometimes they end up between windows. It looks funny, pretty much no matter how you slice it.

What You Can Do About It

The truth? Not much.

The Awesome Window Manager, by default shows the gaps between the windows. I always found this to be the “more ugly” option. You can alter this behavior by searching your configuration file for size_hints_honor and making the line look like this:

c.size_hints_honor = false

This tells Awesome to ignore windows (client’s) when they say “I want to have these dimensions.” It doesn’t fix the problem but it does get rid of the gaps.

The real solution is to tweak text sizes, fonts, and any buffering elements (like a status bar, mode line, or widget box), and window borders so that the windows aren’t left with extra space that they don’t know how to cope with.

By real solution, I really mean “only option:” it’s really impossible to get all of your fixed width applications to have exactly the right number of pixels. You can get close in a lot of situations, and I’ve always found this to be much less annoying than using floating window managers.

The Original Post

Just for giggles, I’ve included a quoted portion of what I posted original to the listserv on the topic.

The one big of information that might be important: The urxvt terminal emulator, when not “honoring size hints,” is unable to really properly draw the “extra space” with the proper background. I suspect this is a bug with the pseudo-transparency system they use. As a result there are often a few pixels with the background in an inverted color scheme. Same problem as above, but it looks funny if you’re not used to it.

What’s happening is that urxvt (like many terminal emulators) can only draw windows of some specific sizes based on the size of the characters (eg. x number of rows, and y number of columns.) So while you may have larger and the equivalent of say 80.4x20.1, urxvt can’t do anything with this extra space.

If you honor size hints, the windows will end wherever they can, and use as much space as they can, but leave gaps between windows if the total space isn’t properly divisible. If you don’t honor size hints, the windows themselves take up the extra room (but they can’t do anything with the extra room, so they just leave it blank, and sometimes the transparency is a bit wonky in those “buffers”).

So there you have it. I hope this helps!

personal desktop 2

For a few days last week, in between the time that I wrote the Personal Desktop post and when I posed it yesterday, I had a little personal computing saga:

1. One of my monitors developed a little defect. I’m not sure how to describe it, but the color depth suffered a bit and there was this flicker and I really noticed it. It’s not major and I probably wouldn’t have noticed it, except I look at a very nice screen all day at work and I had a working display right next to it, I saw every little flicker.

2. I decided to pull the second monitor, and just go back to one monitor. While I like the “bunches of screens” approach, and think it has merit, particularly in tiling environments, I also think that I work pretty well on one screen, and with so many virtual desktops, it’s no great loss. Not being distracted by the flicker is better by far.

3. I pulled the second monitor and bam! the computer wouldn’t come back from the reboot. Shit. No error beeps, nothing past the bios splash screen. No USB support. Everything plugged in. Shit.

4. I let things sit for a few days. I was slamed with stuff in other areas of my life, and I just couldn’t cope with this. It doesn’t help that I really like to avoid messing with hardware if I can at all help it. Fellow geeks are big on building custom hardware, but the truth is that my needs are pretty minimal and I’d rather leave it up the to the pros.

5. On Friday, I sat down with it, pulled the video card that I’d put in it when I got the machine (an old nvidia 7200 series), and I unplugged the hard drives and futzed with the ram, and after re-seating the RAM it worked. I’m not complaining, and I figure it was just some sort of fluke as I jostled the case.

6. So now I’m back, with one monitor, no other problems have been fixed from the last post, but I can live with that.


As I was fretting with the implications of having a computer die on me like this, and thinking about my future computing trajectory. I realized that my current set up was deployed (as it were) under a number of different assumptions about the way I use computers. I got the desktop with the extra monitors when I was starting a series of remote jobs and needed more resources than I could really expect from my previous setup (a single macbook.) I also, in light of this downgraded my laptop to something smaller and portable that was good for short term tasks, and adding mobility to my setup, but that really didn’t work as my only computer for more than a day or two.

Now things look different. I’m not doing the same kind of remote work that I got the desktop for, and I have a killer machine at work that I’m only using a portion of (in a VM, no less). I have a VPS server “in the cloud” that hosts a lot of the “always on” infrastructural tasks that I needed from my desktop when I first got it.

I’m not sure what the solution is. Make the desktop at home more “server-y” (media files, downloading stuff + writing) exchange the laptop at some point for: a 15" notebook that would be my primary machine--particularly useful for long weekend trips, un/conferences and so forth, and some sort of small netbook-class device, for day-to-day portability.

It’s a thought. Anyway, on to more important thoughts.

Cheers!

personal desktop

I wrote a series of posts about setting up my new work computer as a way to avoid blathering on and on about how the movers lost the cushions for my couch, and other assorted minutia that seem to dominate my attention. What these posts didn’t talk about were what I was doing for “tychoish” and related computing.

About a week and some change, before I moved, I packed up my desktop computer and started using my laptop full time. It’s small, portable, and sufficient, if not particularly speedy.

I can do everything with the laptop (a ThinkPad x41t, which is a 2005-vintage 12" tablet) that I can do on any other computer I use, and while I often prefer it because small screen means that it’s really easy to focus intently on writing one thing at a time. This, inversely, means that it doesn’t work very well for research intensive work, where I need to switch between contexts regularly. It’s a fair trade off, and I did OK for weeks.

But then, having been in town for two and a half weeks, I decided it was time to break down and get my personal desktop setup and working. And it’s amazing. The thing, works just as well as it always has (which is pretty good,) and it’s nice to have a computer at home that I can do serious writing on, and the extra screen space is just perfect. I’ve been able to be much more productive and comfortable with my own projects since this began.

There are some things that I need to address with this computer, that have been queuing up. In the spirit of posting my todo lists for the world to see…

  • I need to get a new keyboard. My “fancy” “Happy Hacking Lite 2” keyboard is at work, as I’m comfortable with it, I do a lot of writing at work, and I set up that keyboard first (and the current default Mac keyboard sucks.)

    I’m thinking of either, getting another Happy Hacking keyboard, or more likely at this point, getting a das keybaord ultimate because how could I turn down blank keys and variable-pressure mechanical switch keys. And writing is what I do, so totally worth it.

  • I need to install Arch on this computer. I feel like cruft is beginning to accumulate here, I’ve never quite been happy with the ubutnu experience, and there are some things that I can’t get to work right (namely mounting of USB-mass storage devices) My concerns are that getting dual monitors setup on this box was a royal pain. But that might have been ubuntu related. I’m not sure.

  • My current thought is that I’ll buy a new (small) hard drive (eg. 80 gigs) to run a clean operating system install on (arch) and then use the current drive as storage for the stuff that’s already there (music, video). But I might just get a larger additional drive and do it in reverse. I dunno. The current situation isn’t that bad, and I think that I’ll archify the laptop first.

Annnyway…

Org Mode Pitfalls

I’m writing this post for all of the wrong reasons. I’ve had this “write a post about pitfalls of org-mode,” on my org-agenda for weeks, with a list of “ways I’m not doing things right in org-mode.” One of those pitfalls, the main one in fact, was “you’re living too much in the agenda view, and not thinking of your org-files as working documents and outlines onto themselves.”

And because I’m living too much in the agenda view, I’m writing a post (that I need to write, but have been hesitant to write for a while) mostly to get it off my todo list.

This is certainly an acceptable way to work, and I think todo lists mostly exist in order for their items to be completed and checked off. At the same time, I’ve said (and I keep saying) the beautiful thing about org-mode is that it allows you to plan and process your projects in a way that makes sense for project planning without centering your process on “actionable items,” which is good for doing things but less good for planning things.

And so I’ve been failing at keeping the “planning” and the “doing” as separate thought processes. Note to self: do better with this.

The second pitfall is in the “org-refile” functionality (C-c C-w), which allows you to send items and subtree’s to other parts of your org-agenda files. I think part of the problem is that I don’t really get how it was intended to be used, and as a result when I try to use it, it doesn’t work. (I tooled around in customize, after I wrote this and found: that the following bit (in custom-set-variables) to help, bunches:)

'(org-refile-use-outline-path (quote file))

When I want to refile something, I think to myself “it should go to x file, under which heading, hrm… lets see what’s there…” And my options are presented to me in [Heading]/ (filename.org) format. The problem is that org is thinking backwards from me, and as a result I end up miss-filing things, or not using the refile as much as I should because it doesn’t really work for me. Hrm. Not sure how to hack this.

In anycase, back to working.

new awesome

I’ve been (slowly) upgrading to the latest version of the Awesome Window Manager. Since Awesome is a pretty new program, and there was a debian code freeze during development for a huge chunk of the awesome3-series code… it’s been hard to install on ubuntu. Lots of dithering about, and then compiling by hand. For the uninitiated, ususally installing new software on a Debain-based system (like ubuntu; and many GNU/Linux systems are this way) is as simple as typing a single command. This hasn’t really been the case for awesome.

In any case, with the latest release candidates for awesome 3.3 in sid (debian unstable) I added a sid repository to my ubuntu system, updated, installed awesome, removed the sid repository. Breathed a huge sigh of relief, and then got to getting things setup again. I have the following responses to the new awesome:

  • I really like the fact that if you change something in your config file and it doesn’t parse, awesome loads the default config (at /etc/xdg/awesome/rc.lua) so that you don’t have to kill X11 manually and fix your config file from a virtual terminal.
  • If you’re considering awesome, and all this talk of unstable repositories scares you, the truth is that awesome is--at this point--not exactly adding new features to the core code base. There are some new features and reorganizations of the code, but the software is generally getting more and more stable. Also, the config file has been (and is becoming less of) a moving target, so given that it’s pretty stable and usable, it makes sense to “buy in” with the most current version of the configuration so you’ll have less tweaking in general.
  • The new (default) config file is so much better than the old ones. I basically reimplemented my old config into the new default config and have been really happy with that. It’s short(er) and just yummy.
  • I did have some sort of perverse problems with xmodmap which I can’t really explain but they’re solved.
  • If you’re use a display manager (like gdm) to manage your x sessions, I know you can just choose awesome from the default sessions list, but I’d still recommend triggering awesome from an .xinit/.Xsessions file so that you can load network managers and xmodmap before awesome loads. Which seems to work best for me.
  • I’d never used naughty, which is a growl-like notification system before, and now that it’s included by default I am using it, and I quite adore it.

More later.

Re-Rethinking GTD

I wrote a series of articles nearly two years ago to rethink the GTD system, which I think is worth revisiting again. Not the essays, which were from when I called the website “TealArt” (don’t ask) and were before I really discovered free software and open source in a big way; but rather, I think two years out from my original article and even further out from the heart of the GTD fad, I think that it’s worthwhile to explore GTD again.

For those of you playing along at home, GTD (Getting Things Done) is really a “personal productive methodology” designed by David Allen that swept the geek community a few years ago. It’s good stuff, and while it’s certianly not a one-size-fits-all miricle cure for umproductive and overwhelmed folk; it promotes (to my mind) a number of goals that I think are quite admirable:

  • Have a single system, that integrates across all aspects of your life. One place where systems can fail is if you’re using different “databases” (in the non-technical sense) to store information and tasks, and you have a piece of information that might fit in either system: when you go to look for it later (or need to be notified by it later) the chance of you missing the task because it’s on the wrong list is much higher if you have more than one place where lists might be.
  • Think about tasks and projects being broken into “actionable items,” and have actions be the unit of currency in your system. As you assimilate information be sure to record anything that needs doing and keep it in your system
  • Attach two pieces of metadata to your action: project (what larger goal does the action help you acomplish; you’ll likely have a list of these projects), and “contexts” (where do you have to be in order to do the action, things like “phone” “office” “erands”) are helpful for focusing and making it easier to move your projects forward.
  • Do regular reviews of the information on your todolists, and spend (an hour?) once a week making sure you’re not foregetting things and that you’ve checked off all the actions that you’ve actually done and so forth.

There are other details, precise methods which GTD people focus on, talk about, and provide in their software applications. Frankly I’ve not read the book and I’m by no means an expert on the subject. I continue to have objections to the system: it assumes large tasks and quickly and easily be broken down into smaller tasks (which isn’t always true), and that projects follow linear and predicatable sequences, which I find to be almost universally false. While the reviews help counteract these sorts of assumptions about projects, I have always tended to find GTD a poor solution to the productivity problem:1 both for myself and in my observations of how other people work.

At the same time, I think the notion of a single system that comes to the mainstream via GTD and of weekly/regular reviews, another artifact of GTD, are both really helpful and powerful concepts for organizing ourselves. The other aforementioned “features” are helpful for many, but I feel that very often organinzing the “GTD list,” and our lives to fit ino a GTD list is often too much of a burden and gets in the way of doing things.

I’m interesting in finding out how people these days are talking and thinking about GTD these days. I think the fad has died down, and I’m interested in seeing what we’ve as a geeky community have learned from the experience.

Interestingly, I’m probably doing something much closer to what GTD recomended these days than I ever have before. org-mode is (among many other things) a capiable GTD tool. I think it’s successful not simply because it supports GTD, and the task-management features seem to have grown out of an emacs/writing writing platform rather than a calendar platform. The end result is that I’ve found the GTD way to be quite effective, though its largely unintentional.

I’m interested in hearing where your own systems are, and how you feel about GTD these days:

  • Do you use GTD or GTD based methodologies for your personal organization?
  • If you only use some which, and why?
  • If you don’t use GTD, what system if any do you use?
  • If you once used GTD but stopped, or have considered using GTD and then didn’t, I’m particularly interested to learn why you came to these conclusions?
  • What current factors influence the way that you organize your work?

I hope that covers everyone. I’m particularly interested by how creative folks work, but i think in the right light that covers most of us. I look forward to hearing from you?

Cheers, sam


  1. Not the least of which is the way GTD (et al) classify the problem of work acomplishment to be a “productivity problem” rather than an issue of “effectiveness”. ↩︎

Mobile Emacs

I have a confession. I last week (briefly) considered getting a Nokia N810 so that I could sync and use org-mode when I was away from my computer/laptop. The N800/810 is a small tablet that runs a Debian based operating system, which means it could run emacs, and I could write little clickable scripts that could do all of the syncing and awesomeness that I’ve grown accustomed to.

Then I realized how absurd this is, and cast it aside. My laptop is really mobile, and if I needed it to be lighter or more mobile, I could buy a new battery for it. And it has a full sized keyboard.

This is a sickness right?

Todo List Bloat

I’m working on a longer post on the topic, but the past few days have seen me spend a bit of extra attention trying to develop some way of doing a “fact file” inside of emacs. Basically what I need is some way of storing information (links, quotes, text) along with bibliogrpahic information (where I got it, when I accessed it) and some sort of meta-data (tags, categories, search index) so that I can find things again. Largely, this data isn’t for any specific project, but it is a way to record general notes on the information that I consume in an effort to make that data more useable in the future.

As I firm up the solution, I’ll write more about it, but I’ve discovered something about the software targeted at this domain (generally, “personal information management,") that’s worth sharing: there are a lot of notebooks and databases around, but they’re all very much alike: anything that’s structured as a database is generally desgined to store addresses, contact information and other “CRM” data, which is nice, but not what I’m going for at all. There are also a lot of notebook applications that are modeled on wikis (too unstructured) or outliners (ok, but hierarchical). Interestingly, it seems every kind of personal information management package that isn’t an address book (for emacs, but I think this is to some degree generalizable) has grown to a point where it can manage and extrapolate todo-lists from your notes.

Once upon a time, emacs itself was critiqued (and still is) because it has the ability to send and recieve email, and that this feature (email sending) was a sign of “feature bloat,” becasue after all, sending email with a text editor. That’s a bit a field. I’ll let you decide how history has dealt with the email issue. I in the mean time am going to write, and figure out some way of doing a better job with this information.