Xmonad is a tiling window manager for Linux that lets you create custom windows and manage them with ease. It’s perfect for creating small, personalized displays of your favorite applications or websites. Plus, it’s easy to learn and use, so you can get up and running quickly. To get started with Xmonad, you’ll need to install the software and configure it according to your needs. Once you’ve done that, you can start using it to create custom displays in minutes! Here are some tips on how to get started:
- Choose the right window manager for your needs. Xmonad has a variety of options available to customize your display, so it’s important to choose the one that best suits your needs. If you’re looking for a simple interface with lots of features, try GNOME or KDE; if you want more control over every aspect of your display, try Xfce or MATE.
- Configure Xmonad according to your preferences. Once you’ve chosen the right window manager and configured it according to your needs, it’s time to start creating custom displays! To do this, first open up ~/.xmonad/xinitrc and set up some basic settings: width (in pixels), height (in pixels), use_xrandr (bool), and xrandr_mode (bool). Then add the following lines into ~/.xmonad/config: x11-wm “gnome” x11-wm “kde”
Tiling window managers make your life easier by automatically arranging windows on the screen for you. Xmonad is a minimal one that’s easy to get started with — all you have to do is learn a few keyboard shortcuts.
Xmonad is also highly configurable. In spite of this, you don’t have to touch the configuration file if you don’t want to – it works out of the box.
Installation
Xmonad doesn’t include an application launcher by default. You’ll probably also want dmenu, a basic application launcher that works with xmonad. To install both on Ubuntu, run the following command:
Omit suckless-tools from the command if you’d rather not install dmenu. This package contains dmenu – if you’re using an older version of Ubuntu, you may have to install dwm-tools instead.
If you’re using another Linux distribution, you should find xmonad and dmenu in its repositories, too.
After installing xmonad, log out of your Ubuntu system, click the icon next to your name on the login screen, and select XMonad before logging back in.
Getting Started
This is what you’ll see when you start xmonad:
Don’t worry, it didn’t fail to load — it just starts with an empty screen. Press Alt+Shift+Enter to launch a terminal.
To launch additional terminals, press the Alt+Shift+Enter shortcut again. Xmonad automatically resizes and arranges the windows on screen, tiling them. This is what a “tiling window manager” does.
To move the focus using the keyboard, use the Alt+J or Alt+K keyboard shortcuts. The focus also follows the mouse, so all you have to do is hover your cursor over a window to focus it.
Use the Alt+Space keyboard shortcut to switch between the different tiling modes. One of the modes shows only one window on the screen at a time.
If you installed dmenu, you can press Alt+P to pull it up. Type the first few letters of an application’s name, and then press Enter to launch it.
Graphical applications like Firefox appear tiled, just like the terminal windows.
Here are some other important keyboard shortcuts to get you started:
Alt+Shift+C – Close the focused window. Alt+. & Alt+, – Control the number of windows displayed in the master pane on the left. Alt+Enter – Move the focused window to the master pane on the left. Alt+Shift+J & Alt+Shift+K – Swap the focused window with an adjacent window. Alt+H & Alt+L – Resize the border between the master and secondary panes. Alt+Shift+Q – Log out.
Xmonad supports workspaces, too. For example, to switch to workspace two, use the Alt+2 keyboard shortcut. To move the currently focused window to workspace three, use the Alt+Shift+3 keyboard shortcut. Each workspace can have its own tiling mode settings.
Configuring Xmonad
Xmonad is extremely configurable, if you’re willing to get your hands dirty. Xmonad itself is written in Haskell, and its configuration file format uses Haskell, too. Xmonad’s configuration file is located at ~/.xmonad/xmonad.hs (that is, /home/YOU/.xmonad/xmonad.hs). This file doesn’t exist by default – you’ll have to create it yourself.
To get started configuring xmonad, you may want to start with a template file. For more advanced configuration, check out this list of configuration tips on the official wiki.
After modifying the configuration, use the Alt+Q keyboard shortcut to reload your configuration. You can also change the default modifier key in the configuration file – if you do, use your custom modifer key in place of every Alt in this post.
What do you think of xmonad? Do you prefer a different tiling window manager? Leave a comment and let us know.