Posts Tagged ‘xmonad’

Fawkes Does Some (Quasi-Interesting) Technical Things

Sunday, January 24th, 2010

Several people doing this Iron Blogger thing are writing technical blogs rather than the more classical, perhaps less interesting “here are some things I did this week.” I’ll split the difference: “Here are some technical things I did this week…”

Web Design: myquestforcollege.com

Two weeks ago, I wrote an entry about the web, design, and my relation to it. In it, I stated my intention to make a site for my mother’s college consulting business. This weekend, in the midst of shifting from dayshift to nightshift back to dayshift, I, in fact managed to get it done. I started it over the summer. The sites design was based on playing with both the notion of the college search process as a “quest” and the logo which my mom designed and had designed—partially inspired by my signature

My Signature she took the Q and the C from Quest for College and made this:

I thought this looked like an X. Between these facts, I decided to run with the notion of a treasure map, treasure hunt, etc. I made this:

I am happy with how it turned out. My goal was to make it as professional as possible and I think it turned out well. What do you think?

Site Specific Browsers: Hiveminder

I was recently introduced to the notion of Site Specific Browsers. The idea is that with the increasingly blurry line between web apps and desktop apps, it is useful to abstract the former into the latter. In addition to giving you a quick shortcut into running an app, it gives you a sandboxed execution environment which will prevent one site from crashing the rest of your browser (much like the model in Chromium). I recently, copying Evan, used Fluid.app to roll a Gmail app that lives in my dock where Mail.app used to live. Thanks to some nice functionality that Fluid packaged in, it also has a nice badge label that shows the number of unread messages. I was trying to think of other use cases for this. The one I came up with was Best Practical’s to-do solution, Hiveminder.com. I rolled it using the standard Fluid procedure and got this:

This works, but isn’t ideal for such a site in my opinion. I thought this was a perfect change to play with another nice feature that Fluid threw in … the ability to convert it to a menu extra:

This gives this, in my opinion better, interface to activate it:

It was my opinion that the sidebar was kind of unnecessary for this interface. Luckily for me, Fluid has yet another feature that lets you add a user stylesheet for any site. After throwing this in:

#info-wrapper {
	display: none;
}
 
#headers {
	display: none;
}
 
.dropshadow_left_wrap1 {
	float: left;
	position: absolute;
	left: 0;
}

I got this:

I set it as a StartupItem. Hopefully this will encourage me to use hiveminder more consistently in the future.

Window Managers: XMonad.app

For a while now, more and more of my technical friends have been using the XMonad tiling window manager in their linux distros. I use OS X as my main OS these days, but I still spend quite a bit of time playing with command lines and wanted the ability to have full screen or split screen with terminal emulators. Given OS X’s BSD underpinnings and the XQuartz project, running XMonad on OS X is perfectly possible. There are nice directions on the XMonad wiki for using XMonad on OSX. But these directions are set-up to always use XMonad as your window manager when you are running X. Since I use things like Gimp.app , Inkscape, and Wireshark that are not really suited to a tiling window manager, I wanted an easy way to switch it on or off in a nice way. To achieve this I first, rather than using a .xinitrc, made a system-wide xinit script. I originally tried switching on an environmental variable, but this was not getting passed through the right way. Ultimately, I decided to use the app’s plist. So, in /opt/X11/lib/X11/xinit/xinitrc.d/97-xmonad.sh I wrote:

if [ $(defaults read org.macosforge.xquartz.X11 UseXMonad) -eq 1 ]; then
    export USERWM=$(which xmonad)
fi

(if you use Apple’s X11.app rather than XQuartz.app, you’d want it in /usr/X11/lib/X11/xinit/xinitrc.d/97-xmonad.sh instead and you’d use org.x.X11 rather than org.macforge.xquartz.X11).

Then I created an XMonad.app by setting up the standard directory structure:

XMonad.app
|-- Contents
|   `-- MacOS
|       `-- XMonad
`-- Icon

In XMonad I wrote:

#!/bin/bash
defaults write org.macosforge.xquartz.X11 UseXMonad 1
/Applications/Utilities/XQuartz.app/Contents/MacOS/X11
defaults write org.macosforge.xquartz.X11 UseXMonad 0

Finally I whipped up a niceish aqua-style XMonad icon:

and … ta-da:

(It is worth noting that normally I plan to use it mostly with my second monitor, so that the dock and menu bar won’t be in the way).

So, there you have it, other than the ruby class I taught (slides and example code at http://sipb.mit.edu/iap/2010/caffruby ), and the Google phone interviews I had, those are the technical things I did this week.

I hope you found them interesting. On to the last week of IAP ! (:-/)
~Donald