How to Use the Super Fast i3 Tiling Window Manager on Linux - Linux.com (2025)

I’ve been a fan of tiling window managers ever since Windows 3.1. I know, Windows 3.1 wasn’t very good for much actual work, but it did stacking and tiling windows rather nicely. Thei3 tiling window manageris a nice modern tiling window manager for GNU/Linux and BSD operating systems. It supports tiling, stacking, tabs, virtual desktops, and multiple monitors. You can do almost everything from the keyboard, or mix up keyboard and mouse.

How to Use the Super Fast i3 Tiling Window Manager on Linux - Linux.com (1)

You can download source tarballs or snag the latest code from the i3 git repository, but the easiest method is to install it from your distro repositories. On Debian/Ubuntu you have the i3 metapackage, and the individual i3-wm (window manager), i3-wm-dbg (debugging symbols), i3lock (screenlocker), and i3status (system status bar) packages. The i3 metapackage includes everything except i3-wm-dbg. The full-meal deal is a little over 2 megabytes, so you might as well go for it. In Figure 1 you can see that I have two virtual desktops, the status bar, and three windows arranged nicely. They’re not perfectly tiled because I rearranged them a bit: i3 is not dogmatic about tiling geometry and lets you have it your way.

Installation and First Tweaks

Install i3, then log out. When you log back in change your session to i3. On its first run it walks you through a simple configuration wizard. First you must decide if you want the wizard to create a~/i3/configfile. Say yes. Then choose your mod (modifier) key, either the Win or Alt key. If you choose the Alt key you’re going to conflict with a lot of application keybindings and commands, so choose Win. This is really the Super_L key, but on many keyboards it bears the Windows logo. (Liberate your keyboard! BuyTux keyboard stickers!)

Now you should be gazing upon a mostly blank screen. You should see a little tiny 1 in the bottom left corner, which is the first virtual desktop, and the system status bar along the bottom right. The background image is whatever has been set for your X11 root window. I’m running Kubuntu, so my base background image is the one set by the KDE4 theme. i3 does not touch the X11 root window, so you need an external app to set a background image.fehis a nice little app for this. Installfeh, and then open~/i3/configand configure a background image by adding a line like this anywhere in the file:

exec --no-startup-id feh --bg-scale /path/to/picture

--no-startup-iddisables the startup notification so you don’t have an hourglass in your way for 60 seconds.--bg-scalemakes your image fill the screen, and does not preserve the aspect ratio. Seeman fehfor other background image settings.

How do you do all this?$mod+Returnopens your default X terminal.$mod+dopens the system menu,dmenu(figure 2). Start typing the application name, for examplekateorgeditto bring up a graphical text editor, and when it’s highlighted in blue press the Return key to open it.dmenushows you all the command names that include the string you’re typing. It only finds commands that are in your $PATH. If you change your mind press the Esc key to close it. You can’t do anything else whiledmenuis open.

How to Use the Super Fast i3 Tiling Window Manager on Linux - Linux.com (2)

For most~/i3/configchanges, press$mod+Shift+cto reload the file and activate changes. If that doesn’t work then$mod+Shift+rrestarts i3, preserving your layout and open applications. To load your new background image you need to log out of i3 and log back in.$mod+Shift+eexits i3, and then you log back in the usual way with your Linux login manager.

Set Default X terminal

If$mod+Returndoesn’t open the correct X terminal, then change this line in~/i3/config:

# start a terminalbindsym $mod+Return exec i3-sensible-terminal

Replacei3-sensible-terminalwith your chosen terminal, for examplekonsoleorgnome-terminal, and reload~/i3/config.

Basic Layout Management

Every time you open an application it fills the available space. Apps are either lined up side-by-side, or stacked on top of each other. To duplicate figure 1, open an application in an empty desktop. Then open a second app. Then make the second app the active window by hovering the cursor over it. There are also multiple keyboard combinations for selecting the focus window, such as$mod+arrow key. Press$mod+v, then open your third app.$mod+vstacks, and$mod+hlines them up side-by-side.

Use your app menus to close them, or$mod+Shift+qcloses the window with focus.

You can move your windows around with$mod+Shift+arrow key. Resize them by dragging a border with the cursor, or enter resize mode with$mod+r, and then resize the window with focus with the arrow keys. Leave resize mode by pressing the Esc key.

$mod+ftoggles fullscreen.$mod+Shift+nmoves the window with focus to desktop n.$mod+Shift+spacebartoggles a floating screen. This removes it from the tiles, and you can drag it around and resize it like in a non-tiling window manager.

$mod+etoggles horizontal and vertical layout,$mod+sstacks open windows, and$mod+wtabs them.

Open a second virtual desktop with$mod+2. i3 closes virtual desktops automatically when you close all the applications on them.$mod+nnavigates to an existing virtual desktop, or creates a new one. You don’t have to number them sequentially, but can use any numbers you want.

Configuration Hacks

Look in your~/i3/configfile to see your keybindings, and theDefault Keybindingssection of the user manual shows you the i3 defaults. You can easily create keyboard shortcuts to launch applications, like this:

bindsym $mod+F1 exec firefox

I like to bind PulseAudio volume controls to the keyboard. I have multiple soundcards, so first I have to locate the correct one. You need some audio playing for this to work:

$ pactl list sinks | grep -A2 -B2 -i runningSink #1State: RUNNINGName: alsa_output.usb-M_Audio_MobilePre-00-MobilePre.analog-stereoDescription: M-Audio MobilePre Analog Stereo

These lines in~/i3/configlet me control up and down volume with the Pageup/Pagedown keys, and toggle mute with the Home key:

bindsym $mod+Next exec pactl set-sink-volume 1 -- -10%bindsym $mod+Prior exec pactl set-sink-volume 1 -- +10%bindsym $mod+Home exec pactl set-sink-mute 1 -- toggle

Keynames are not always consistent on keyboards, so you can find the correct keynames with thexevcommand. Run it with no options, and then press keys to see their names and keycodes. That’s how I learned to use Next and Prior for Pagedown and Pageup:

$ xev[...]KeyPress event, serial 32, synthetic NO, window 0x2c00001, root 0xa0, subw 0x0, time 24296185, (651,87), root:(1615,816), state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES[...]KeyPress event, serial 32, synthetic NO, window 0x3a00001, root 0xa0, subw 0x0, time 25458177, (247,105), root:(1211,834), state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,

i3 is wonderfully configurable. Seeman xev,man pactl, and the excellent and thoroughi3 documentationto learn more about the myriad ways to customize i3 and make it super-fast and efficient.

How to Use the Super Fast i3 Tiling Window Manager on Linux - Linux.com (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 5307

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.