GFX::Monk Home

Posts tagged linux:

Bluetile: A friendly tiling window manager

I've recently started using bluetile instead of compiz, and I think I'm going to stick with it. Bluetile is a tiling window manager, but it’s not like all those other tiling window managers*:

  • it’s simple
  • it’s easy to learn
  • it’s built with GNOME support out of the box
  • it still supports direct manipulation style using the mouse if you just want to change a window’s size, or swap window locations. I think this is crucial for keeping it accessible to new people like myself.

* well okay, it is like those other tiling window managers. Specifically, it’s built on xmonad. But it presents a simple veneer over the vast complication that is xmonad (I should know, I tried to configure it just last week ;)).

Bluetile is, sadly, notoriously difficult to install. But there are good guides around, I used this one for ubuntu karmic.

The good news is, bluetile has recently been merged back into the xmonad mainline. And xmonad is apt-gettable (at least on ubuntu). So in theory, the next release of xmonad will make it pretty easy to run in bluetile mode, without having to compile-your-own-window-manager (which certainly does not make for a gentle learning curve). If anyone is considering playing around with alternate window managers, it’s definitely worth your while to give bluetile a go.

Etoile first impression

I've long been interested in étoilé. It’s a linux distribution built on top of GNUStep, aiming to provide a more modern (read: prettier and generally a bit more Apple-Like) operating system than the GNUStep base. Obviously as a mac user who has switched to linux for its openness, this is a pretty tempting idea.

Anyways, I recently downloaded the VirtualBox image to take it for a test run. Aside from there not really being much software to use yet (making it hard to take for a spin), I noticed this in the system menu. It’s probably somewhat more important to get your character encoding right if you’re going to be all fancy and have accents in your name ;)

etoile
system menu

Zenity: for the user-friendly scripter

I just discovered zenity, which is a great tool for simple gtk+ interactions with a script.

It has the following types of interactions:

  • calendar (date picker)
  • file / directory selection
  • error / info message
  • list picker
  • question (yes/no)
  • progress dialog
  • systray notification
  • and more… ( see the man page )

The usage is brilliantly simple, and it’s very unixy despite being a GUI tool. I just wrote a pygtk+ app to do some photo importing stuff, but doing it with zenity would have been far simpler.

Well worth keeping in mind for your next user-friendly shell scripts (particularly for the more advanced progress, calendar and list picker dialogs).

Is there such thing as a Snapping Window Manager?

..in which I propose a potentially-new window management feature, and hope that somebody has already done it so that I won’t have to…

A thought or two about application launch window focus models

Note that here I'm talking about windows getting focus when they launch, rather than focus-follows-mouse or window click-through (I’ll leave that one to Gruber).

Recently, I've learnt something about how window focus works on OSX, and subsequently been fairly disappointed by how it works in X (and probably Windows, but correct me if I'm wrong).

OSX-style horizontal mouse scrolling for linux

OSX has this great feature where if you hold down SHIFT at the same time as using your mouse scroll wheel, it’ll scroll horizontally instead of vertically. If you don’t have a laptop, this is an immensely useful trick. Sadly, I couldn’t find any way to get this to happen on linux.

But now, thanks to some direction from stackoverflow, I finally figured out how to do it myself. The world of X11 input hackery is somewhat twisted and full of projects either abandoned or in disrepair, but I finally stumbled across the right set of tools.

If you'd like to get this (rather excellent) feature in linux, you will need the following:

  • Install the packages xbindkeys and xautomation: sudo apt-get install xbindkeys xautomation

  • Save the following file as ~/.xbindkeysrc.scm :

    ; bind shift + vertical scroll to horizontal scroll events
    (xbindkey '(shift "b:4") "xte 'mouseclick 6'")
    (xbindkey '(shift "b:5") "xte 'mouseclick 7'")
    
  • Use your favourite mechanism to ensure that the xbindkeys command is run at the beginning of your xsession (I added it to ubuntu’s “startup items” preference, but you can surely use init.d if you’re comfortable with that).

Remap shift+space to underscore

So I had this great idea yesterday (for coders, at least): remap [shift+space] to [underscore]. Turns out I am far from the first to think of this, which only enforces its awesomeness as an idea.

Mac: Put this in ~/Library/KeyBindings/DefaultKeyBinding.dict:

{
    /* turn shift + space into underscore */
    "$ " = ("insertText:", "_");
}

Linux: for a PC keyboard, try:

xmodmap -e 'keycode 65 = space underscore'

or on a mac keyboard:

xmodmap -e 'keycode 57 = space underscore'

Or if neither of those work, run:

xmodmap -pk | grep space | awk '{print $1}'

and use that number instead of 65 or 57 above.

You can put this keybinding in ~/.xmodmaprc or somesuch if you like it.

A better snap-open (for gedit)

snap-open is handy. Unfortunately, it’s terribly crippled if you have a lot of files, since:

  • it uses the linux find command, instead of an index-based file list
  • it doesn’t run in a separate thread, so it locks up your entire GUI while it goes off to trawl your file heirarchy every time you change a letter in the find box

So I fixed it a bit. It is now threaded, and uses the linux locate command. This is still not ideal, it would be much better to use beagle. But I couldn’t figure out how to do that real quick, so locate it is (for now).