Archive for the ‘xmonad’ Tag
One window manager to rule them all…?
Filed under: operating systems | Tags: fluxbox, gnome, linux, window managers, xfce, xmonad
Comments Off
Every Linux hacker has his favorite window manager (or maybe even just the console!). What is mine? Fluxbox.
I’ve used GNOME, Xfce, fluxbox, and xmonad, and I like fluxbox the best. Here is my reasoning:
- Speed It’s fast. Really fast. Not as fast as xmonad, but it retains enough of the elements of the more mainstream GUI WMs that you don’t feel quite so intimidated by it.
- Customizability Fluxbox lets you customize your theme, menu, hotkeys, and a few other things, and it gives you more control over those things than do GNOME or Xfce. Given, it’s all done from text files (unless you use fluxconf), so it takes some time to learn. But it’s quite powerful.
- Compatability All my normal software still runs fine under fluxbox. This might be just because I have GNOME installed, too, I’m not sure. But it works.
- Keyboard use It’s pretty easy to use virtually all the fluxbox-specific features from the keyboard (although it sometimes requires tweaking, as with the Alt+Tab behavior). And the terminal always occupies a front row seat on my desktop.
- Lean, green, computing machine Fluxbox just has the stuff you need, and no heavyweight GUIs to manage it. Of couse, that makes it harder for the beginning user, but both the power user and the novice can be productive with it.
I started using Linux under GNOME, and I still like it. Especially on Ubuntu (the distro I run), it makes it easy to do everything from text editing to web browsing to system administration from the GUI. And that’s good. But once I became more accustomed to the terminal and the command-oriented way of doing things, fluxbox was a great step forward.
All the same, I still don’t believe there is “one window manager to rule them all.” What are your thoughts on the plethora of window managers? Should it be a battle for the fittest, is the community headed in the right direction by providing so many choices?
xmonad: the mouseless window manager
Filed under: operating systems | Tags: linux, window managers, xmonad
Comments (1) The other day I discovered (through link surfing) a window manager called xmonad. It is an extremely small (the compiled executable is 1.2M), lightning fast, sleek window manager for Linux designed to make the most of screen real estate and maximize your productivity using X. It can operate entirely without the mouse.
xmonad works by opening windows in tiles, which are rearranged as you open more windows. The primary window is on the left or top half of the screen (depending on which mode you’re in) and the other windows stack in the other half of the screen. You can switch between windows using Mod+J and Mod+K (“Mod” is the Alt key on my machine), and you can swap windows to and from the primary position. Naturally, there are multitudinous ways to resize, move, and reorder the windows within the different panes. It also includes support for multiple workspaces (as do most WMs) and even multiple monitors if you have them.
I’ve been playing with xmonad for a little while now and I quite enjoy it. It allows me to work easily from the command line but still run my X apps without too much hassle. I’ve found, however, that with programs like Firefox which pop up smaller windows on occasion (e.g., file and settings dialogs), it’s best to run in full-screen mode. When running in the normal tiling mode, the popups sometimes take on strange proportions as they are squeezed into the existing layout. Using full-screen mode usually gives them their natural dimensions.
No title bars, no icons, no nonsense. This window manager is very simple, clean, and fast. There’s a bit of a learning curve with all the keyboard navigation, but for any Linux hacker who knows vim, it shouldn’t be too hard to pick up.
Mostly for my own benefit, but also for any fellow Linux geeks, I’ve posted the process I went through to install xmonad:
- First make sure you look at the overview, which includes everything you need to get started. It describes how to get the Haskell compiler and the required packages, including mtl, X11, and X11-extras (those were the three I had to get myself).
- Once I had installed all the required packages, I installed dzen and dmenu (which involved compiling them from source with make).
- At this point, you want to edit xmonad’s Config.hs script to put a space at the top for dzen to run as the status bar. This file is in the source directory for xmonad. Open it and find the line that says “defaultGaps = [(0,0,0,0)]” and replace it with “defaultGaps = [(18,0,0,0)]“.
- Now compile xmonad with the runhaskell command, as described in the documentation. (Make sure to keep the source around, since any reconfiguration you do requires recompilation.)
- I found it easiest to use the .xsession script to launch xmonad from the gdm, rather than using a .desktop file in /usr/share/xsessions, since it’s easier to specify startup programs and the like. Here is my .xsession script:
unclutter -idle 1 &
while true ; do
bt=`acpi -b | sed -n ’s/.*, ([0-9]*%).*$/1/;1p’ | xargs printf ‘Battery: %sn’`
tm=`date +”%H:%M %a %b %d”`
printf “%s | %sn” “$bt” “$tm”
sleep 60
done | dzen2 -ta r -fg ‘#ffffff’ -bg ‘#808080′ &
xterm &
xmonad -
- The unclutter command instructs X to hide the mouse once it’s been idle for one second. (There is a package for unclutter in Ubuntu.)
- The next six lines describe the text I want dzen to display in the status bar. The “date” part displays the date in the form “21:59 Fri Jul 13″. The other part extracts the battery percentage from acpi and formats it (which is important because I’m on a laptop).
- The printf command concatenates those two pieces of information.
- The sleep command tells dzen to wait 60 seconds between each update.
- The last line actually passes that loop to dzen and sets some options.
- The second-to-last line starts a terminal so I can start using it as soon as I log in. (Otherwise it just presents a blank screen and the status bar.)
- Finally, the xmonad command starts the window manager itself.
- Now it’s play time! Experiment with the layout features and keyboard shortcuts and customize to your heart’s content! And long live the terminal!
So there we go. Yet another nifty window manager for Linux.
UPDATE: Tassilo posted some more technical information about xmonad on his blog. Take a look if you’re interested in diving in yourself. Also, thanks the the guys at xmonad for their link.