Linux: Awesome

Awesome is a terrific window manager. (I’m not going to go with the cliche “awesome is awesome.”) I actually switched from Openbox, which is also a terrific window manager. But I’d heard of this “tiling window manager” business, and because I just don’t feel comfortable when everything on my computer is working perfectly, I decided to try some other one. I did try Pytyle2 with Openbox for awhile, and I liked the idea of tiling enough to work up the courage and try Awesome.

I had a moment of panic after I substituted Awesome for Openbox in .xinitrc and restarted X. Nothing responded to my mouse clicks! Thankfully, I had a panel running, so I managed to click my browser open and start going through the Awesome wiki. It’s got some very logical keybindings, once you get them figured out.

Interestingly, Awesome defaults to a floating layout; it’s a little unnerving considering how it also defaults to a lack of titlebars. Moving windows is pretty simple – hold the windows key and either the left or right mouse button to move or resize, respectively – but it’s a little off-putting at first. I added a couple of application launching ones and started getting used to it. The default close-window keybind involves three keys, so I changed that as well. (Makes sense, though, to prevent us first-time random-clickers from accidentally killing windows.)

I set my default layout to tile first, then I tried out spiral. What’s great is, Awesome lets me take advantage of all the space on my small laptop screen, and it does it without any effort from me.

I spent the first few days just tinkering with my rc.lua. I got to be very good friends with the command “awesome -k rc.lua” to check my syntax. One thing about awesome – documentation isn’t that great. It’s gone through several iterations, and configuration has changed several times as a result. Information isn’t always up-to-date, and it’s sometimes a little sparse. For example, it took me a good bit of searching and some of my own hacking to figure out how to add small titlebars to windows whenever they became floating. It’s a bit obscure of a desire, but coming from the Arch wikis and forums, Awesome help is a little lacking. It’s a great way to learn something about the Lua scripting language, though.

I’m still using Awesome. It’s quick, light, and fast. I don’t use its panel, but everything else about it I like. I understand that there are lots of other tiling WMs out there, and I’ll probably get around to trying a few when I get too comfortable with Awesome. But for now, I’m liking it.

In case anyone is wondering, this goes in the clientkeys table, and kicks in whenever I switch a window to floating:

    awful.key({ modkey, “Control” }, “space”,
awful.client.floating.toggle,
function (c)
if not c.floating and c.titlebar then awful.titlebar.remove(c)
elseif not c.titlebar then
awful.titlebar.add(c, { modkey = modkey, height = “10” })
awful.client.moveresize( 0, 10, 0, 0 ) end
end),

and this doesn’t quite work right. It leaves dead titlebars when windows that were opened by other windows get closed. I’m not sure how to detect whether that’s the case to get rid of the titlebar. On the off chance that someone reads this and figures out how to fix it, let me know. It’d go at the end of the rc.lua.

 –add titlebar to floating windows
awful.hooks.property.register(function(c, prop)
if c.titlebar == nil and awful.client.floating.get(c) and not c.fullscreen then
awful.titlebar.add(c, { modkey = modkey, height = “10” })
awful.client.moveresize( 0, 10, 0, 0 )
elseif c.titlebar and c.fullscreen then
awful.titlebar.remove(c)
elseif c.titlebar and not awful.client.floating.get(c) then
awful.titlebar.remove(c)
end
end)

Advertisements
Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: