Master Your Desktop Be a Window Wizard
Launching and Closing Apps
So far we've only been opening terminal windows, which is fine if you do most of your work at the command line, but obviously isn't great for general desktop usage. Fortunately, there's a dedicated program launcher for i3 called dmenu that is – as you've probably guessed by now – keyboard-centric. To activate it, press Alt+D and look at the top of the screen: You should see a bar with a gap on the left and various programs listed on the right. (If you don't see this, make sure dmenu is installed – have a search for it in your distro's package manager.)
Now, with dmenu open, start typing something – for example, f. You'll see that dmenu narrows down the list of displayed apps to those beginning with f. Type "fire" and (unless you have other apps installed beginning with fire), it should narrow down to "firefox", so hit Enter to launch it. As you're seeing, dmenu is a useful way to quickly launch applications without having to type in the full executable names – at least, most of the time!
To close an window, press Alt+Shift+Q. This tells i3 to send a regular "close window" command to the application, that is, shutting it down gracefully. So if you're running an editor and haven't saved your work, the app will prompt you. Try it out with, say, LibreOffice – start a word processor document, tap in some text, and then press Alt+Shift+Q. LibreOffice's Save Document? dialog will pop up, and you'll also notice that i3 lets it appear in the middle of the screen, as usual (see the "Using Workspaces" box for more info).
Using Workspaces
Like most desktop environments and window managers, i3 supports workspaces – separate virtual "screens" where you can open additional applications. You can see the number of the currently active workspace in the far-left of the status bar at the bottom (it should show "1" at this stage). To switch to another workspace, use Alt along with a number (e.g., Alt+2 to switch to workspace 2). These are created on the fly, so you don't have to worry about creating or managing them.
In many cases, you'll want to move windows between different workspaces; this is achieved by using Alt+Shift along with a number. So, if you're in workspace 1 with two windows open side-by-side and press Alt+Shift+2, the currently selected window will be moved into the second workspace. And, if that workspace was empty before the move, the window will take up the whole screen, like when we first started i3.
So i3 isn't overly zealous about tiling; it tries to give each window and application its own dedicated space on the screen, making sure no pixels are wasted, but it's also clever enough to respect "floating" windows that are temporary and don't need to be assigned their own tiles. You can see this in Figure 4.
You're now ready to start using i3 for your daily work – it may take some time to get used to, but after a while you'll find it much more elegant to work with than regular point-and-click window managers (Figure 5).
But one final thing we'll look at is the default configuration file that i3 created when you first launched it. This is called config, and you'll find it in the .config/i3/
subdirectory of your home directory.
Apart from the font option, which lets you customize the font used in window titles and the i3bar, most of the other options are preceded by bindsym and configure the keybindings for the various window management options. For instance, look at this:
bindsym $mod+Shift+q kill
Here, $mod is the modifier key (Alt or Windows) that we selected during the first run of i3 – and it's also defined at the top of the configuration file. So, this line of code says "bind the key combination $mod+Shift+q to the kill command" with kill meaning close the window.
Look through the file to explore the available keybindings – there are a few lesser-used ones that we haven't talked about in this guide, but that you may find useful as time goes on. If there's a particular default keybinding that you find awkward to use, you can simply change it here, save the file, and press Alt+Shift+C to reload the configuration file without having to restart i3 completely. (To exit i3, use Alt+Shift+E and notice the confirmation bar at the top of the screen.)
One last thing: When you're getting to grips with i3, we recommend loading up the i3 Reference Card [3] and making a printout of it for your wall. For the complete i3 documentation, describing many different ways to divide up your screen, see the User's Guide [4]. Also, check out the "Other Tiling WMs" box for alternatives to i3.
Other Tiling WMs
i3 is the most popular tiling window manager, and for good reason: Its default configuration is sensible, it's insanely fast and light, and it has very few dependencies (so it doesn't pull in loads of libraries or graphical toolkits when you run it). But there are plenty of others worth exploring as well if you really get into the tiling groove.
Awesome [5] works well out of the box, but is designed as a "framework" window manager that can be extended using the Lua programming language. It implements many Freedesktop.org standards, so it fits in well with add-on tools like docks, program launchers, and system trays.
Dwm [6], meanwhile, is an extremely minimalist tiling window manager – indeed, the developers have set its source code a hard limit of 2,000 lines! And it's even possible to do tiling inside a terminal window, thanks to Tmux – see our guide on page 92 of Linux Magazine issue 193 for all the juicy details.
Infos
- i3: https://i3wm.org
- i3 subreddit: https://www.reddit.com/r/i3wm/
- i3 Reference Card: https://i3wm.org/docs/refcard.html
- User's Guide: https://i3wm.org/docs/userguide.html
- Awesome: https://awesomewm.org
- Dwm: http://dwm.suckless.org
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.