This article has been checked and updated in January 2020 for correctness.
Fedora Workstation comes with the GNOME desktop by default. GNOME brings their users a rich experience with a complete set of applications. This includes applications for music and video players, text editors, PDF viewers, and even a Weather and Maps apps. But for those looking for another desktop experience for their workstations, Fedora provides a large set of options to try out. Some are full desktop environments like Cinnamon and KDE Plasma, to minimal window managers like OpenBox, Fluxbox, and i3wm (often shortened to just i3).
Overview of i3
In this post, we will cover the i3 tiling window manager, a relatively new option for your desktop. Despite being new, it has been rapidly adopted by many Linux hackers, such as Greg Kroah-Hartman. Some of the features and benefits of the i3wm include:
- Does not require high-end hardware
- Low resource consumption
- Highly customizable
Unlike traditional desktop environments, window managers are flat, terminal-like environments that work in terms of workspaces and tiles. Usually there are not things like application menus or a desktop for files and folders. Window managers are independent from a GUI. Many pro users don’t even use a mouse with their window managers and use only a keyboard (although it is still possible to use a mouse if you prefer to have one).
Installing i3
Although desktop environments can be pretty and fluid, you may not discover just how fast your computer can be until you use a window manager like i3. For this tutorial, we will assume you are already working in a traditional desktop environment like GNOME.
To begin, open a terminal and run the following command.
$ sudo dnf install i3 i3status dmenu i3lock xbacklight feh conky
Confirm the download and wait until it finishes installing. Curious about what you installed? Here is the package-by-package breakdown.
- i3 is the main window manager package.
- i3status is a utility to generate a string with information to be displayed in the i3bar.
- dmenu is a utility to launch our apps in the i3 desktop.
- xbacklight is a utility to set our laptop’s screen brightness.
- feh is a utility to set a wallpaper.
- conky is a utility to display information of the system in a awesome way.
This should be around 19MB to download in a fresh Fedora 23 Workstation installation.
Once it finishes installing, log out of your current session and log in again, this time selecting the i3 session in your login screen (although you may want to read the rest of this guide first before jumping in so you won’t be lost).
Configuring i3
The first time you log in, i3 will start a setup wizard to guide you through creating a configuration file. There are two options: start with the default options or start with an empty file. If it is your first time using i3 or a window manager, we recommend using the default configuration.
Next step is to set the $mod key. The $mod key is an important concept to understand in i3. The $mod key is what you use to navigate around your window manager. It is more or less the “command” key that you will always use when changing workspaces, windows, changing layouts, or opening new applications. The wizard will ask you to select the Windows key or the Alt key. By default, you can select the Windows key.
That’s it! That’s all you need to start using your new window manager. After completing the set up utility, you will be at a new i3 workspace. It will look simple, with just a black screen and a little bar down at the bottom. First, we will need to learn to become more productive, and then we will learn how to customize i3.
i3 Basic Use
To begin, try using a basic but important shortcut,
. Of course, substitute whatever you chose to be your $mod key in the example. This will open a new terminal.
To open a different application, you will need to use dmenu. To use dmenu, hit
on your keyboard. You can then search for an application, like Firefox. Press Enter once you are ready to open an application. Firefox will open and adjust to use half of your monitor.
But what if you want to split your windows so your terminal is on top of your Firefox window? No problem.
Now, we are going to tell i3 that for the next window, we want to split the screen horizontally, not vertically. You can do this by pressing
. You may think nothing happened, but you will need to open a new window to see your change.
Open dmenu again by pressing
and look for another application, like evince (which opens PDF files). Press Enter once you find it. Now, you should have three windows in your screen in a layout like this.
Decide that you need to use your full screen and want just one window on full screen? Easy! Select a window and press
to go full screen. Once you are done, you can go back by hitting
again.
Time to close your window? You might be used to other shortcuts like
or
on other operating systems or desktop environments. You can press
to close a window in i3 or you can use
. To use
, open dmenu again (
) and find “xkill”. Hit Enter. Now, your mouse cursor will become an “X”, and any window you click on will close.
Is your current workspace getting too full of windows? You can easily make a new workspace to hold new windows. Press
, where # is any number from 1 to 9. This will move you a new workspace in your virtual desktop. If you want to move an already existing window to a new workspace, select the window you want to move and press
.
Exiting i3
Ready to log out and end your i3 session? You can end you i3 session by typing
and confirm with your mouse that you want to logout.
These are the basics you need to know for a workflow with the i3 window manager. Next, we will see how to customize i3!
Customizing i3
To adjust i3 to your needs, you will need to become familiar with the file in
. This file is created by the setup wizard and you can control any aspect of your windows manager by changing the configuration.
To open the file, you can use your favorite text editor. In this tutorial, we will gedit. Open a terminal and run this command.
$ gedit ~/.config/i3/config
You can also open Gedit in dmenu and open it that way.
Take some moments to review the configuration file. You will see it is ordered by sections. Don’t worry about breaking this file. At any time, you can delete this file and run
again to restore the default configuration.
Once you are done configuring the file, save and close your text editor. To see your changes take effect, you will need to reload i3. You can do this by typing
. If there is an error with your configuration, you will see a warning message.
Knowing the terminal helps
i3wm is targeted at advanced Linux users open to learning. Using a command line interface (CLI) is important for your time using i3.
There are some useful command line-based tools that you may find useful. Some of this utilities are:
- alsamixer: Lets you change the volume of speakers / headphones in a terminal
- xbacklight: Changes brightness of screen in a terminal
- nmcli: Command line interface to NetworkManager
- links: Text-based web browser
- irssi: CLI-based IRC client
- mc: mc, Midnight Commander, is an advanced file manager in the terminal
- glances: Shows system status
These are just a few apps you can find in the Fedora repos that can help increase productivity with i3. There are plenty of other choices you can use, but the tools listed here are some of the essential apps that you may want to have.
If using a terminal seems intimidating or too overwhelming, i3 may not be the best choice for your workstation environment. However, if you feel like you can get all of your work done in a terminal-like environment, i3 will feel like home.
Set your favorite terminal emulator
There are different terminal emulators that can change the general appearance or view of your terminal windows. I like terminator personally.
To change your terminal emulator, open your i3 configuration file and look for the commented section about starting a terminal. You should see something like this in the file.
bindsym $mod+Return exec i3-sensible-terminal
To use i3 with a different emulator like terminator, try changing it to the following line.
bindsym $mod+Return exec terminator
If you like the style of terminal used by GNOME, the terminal emulator is called
. You can use that name in place of terminator if you prefer.
Set dmenu to show apps with a graphical interface
You might notice that dmenu will show you all executable programs available on your system. To set up dmenu to only show apps with a graphical interface, look for the commented section about starting dmenu.
There should be two lines under this section. One will be commented with a # symbol before it and the other will not. Change these lines to look like the following to only show applications with a graphical interface.
# bindsym $mod+d exec dmenu_run
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
Create your own shortcuts
You may have noticed that it isn’t too difficult to set your own shortcuts for some of your favorite applications. The syntax is the same for launching multiple apps, such as bindsym
, substituting <key> and <app> with your own choices.
For example, you can add the following lines to your configuration file to create shortcuts to open Rhythmbox and Totem.
bindsym $mod+m exec rhythmbox
bindsym $mod+t exec totem
This way, you can include all shortcuts you want to your i3 session. Just take care that you are not setting a previously defined shortcut.
Set a wallpaper
i3 will not change any setting of your display by default. This means that you need a tool to set a wallpaper, like
(which we installed earlier). Look for an awesome wallpaper and save it a location on your computer. You can then add the following line to your i3 configuration file to set the wallpaper.
exec --no-startup-id feh --bg-scale ~/path/to/wallpaper.png
Reload your session with
to load your wallpaper.
Set up Conky
Conky is a useful way to show information about your system on the screen in a beautiful way. You can look for a Conky theme online and save it your computer. You can include a line at the end of your configuration file like this to set Conky in i3.
exec --no-startup-id conky -c ~/path/to/.conkyrc
You should have a result similar to this one, depending on your theme.
Configure apps to start up on login
Want to have some of your favorite applications start up in the background as soon as you log into your desktop? Similar to writing a new shortcut, you can set an app to automatically start with the following syntax.
exec --no-startup-id dropbox start
Online Resources
If you’re looking for taking your i3 learning to the next level, there are plenty of resources available to you to help you build your dream window manager.
These are all the basics to getting started with i3. Do not die in the try!
Paul Mellors
I use i3 on Fedora 23 and have a couple of extra apps
moc [music on console] is a great music player which supports mp3/ogg etc
terminator is a great console which allows you to split screen horizontally and vertically
for email I use mutt
All great apps that work well in i3!
kliper
I haven’t ever tried moc; I’ve been using ncmpcpp;
Is moc more cool?!
Justin W. Flory
I didn’t know about
! That sounds super cool. I’ll have to check it out!
Rene Reichenbach
Very nice introduction even if it don’t makes me flee from Gnome its good to have the right tool for the right work if you e.g. need something really fast running shell stuff.
Justin W. Flory
I’ve been using GNOME since I switched to Linux, and I tried i3 with some help from this article… it’s left me wanting to come back for more. 🙂
Andy Bear
I think the terminal multiplexer tmux is also a great addition to i3 for improved terminal handling :). Other than that it’s a great window manager.
Thank you for this guide, it will definitely be useful soon!
Justin W. Flory
Curious, how do you utilize tmux to improve your terminals? I’m trying to see how one might use it in i3.
Unop
I have a entire workspaces (sometimes across multiple monitors) dedicated to running tmux sessions – where tmux makes workflows with terminal apps much easier. Both i3 and tmux can handle things like splitting and arranging Windows but tmux would be cheaper doing the same and brings other benefits to the party – mouseless interactions, history buffer searching, copy-paste, session management, session sharing, etc.
shenase
Graet post;
And, here is a good place to see other people iI3s: https://www.reddit.com/r/unixporn/search?q=i3&sort=new&restrict_sr=on
William Moreno
Very interesting to see than most of the people in these subreddit are using Arch, i3 in Fedora work great, really I wrote this post to show people this great windows manager and how to start with it in theirs workstations.
kliper
Hey man
How can I increase the font size of system wholly?
meine
see ~/.i3/config, line starting with ‘font’. here you can change type and size
Dmitriy
It would be nice if you also cover usage of Awesome WM. Especially would like to read about substitutions for common Gnome 3 widgets.
I have tried both i3 and Awesome and the only valuable point was using Lua configurations in Awesome. Is there anymore point to choose i3 instead of Awesome for instance?
Also, how it would behave when all will run on Wayland?
Justin W. Flory
An Awesome WM article would also be a cool idea. We’ll have to see if we can find an author who has experience with it and is willing to help contribute to the Magazine! If you know anyone, feel free to send them our way. 🙂
Steven Snow
I just installed i3 and am trying it out for the first time. I find its minimalism is very much along the lines of what using a ‘nix OS has always been, more interactive and less of an observer role. The speed is much faster than Gnome (at first glance anyway). I did have an issue where my keyring manager did not log in automatically (I use Evolution for mail) so I had to login at first start of Evolution. I think I will keep it in use for a bit to see what it is really like as a WM. Good article, and thanks for bringing it to my attention. I notice Terminator works well, with my already setup Powerline configuration.
Sergio
Interesting post,
i will try it, let me ask you,
does i3 support multiple screens?
do i need to install something else?
meine
with + you can switch to a new empty screen. when the last window in a screen is closed the screen automatically closes. multiple physical screens should work but have no experience
meine
XQQ, ment
Mod-key + number
Sergio
Ok, Tanks!
William Moreno
Yes, it does, one the goals of the project is to have multiscreens working right and i3 do a nice work with multiscreens.
Sergio
ok, Thanks!
Metcomm
Many thanks for this insight to a light and low resource desktop. I have started to use it extensively over the past days on my laptop and what a difference to my battery life! I have several desktop environments installed although my preference has always returned to KDE (plasma). But the latter is heavy on my battery and the laptop fan is always whirling so I can only run it on ac power.
i3 on the other hand runs very cool and lightning fast on my machine even with several apps running simultaneously (notably Firefox on Plasma always runs my CPU into overdrive which is not the case with i3).
i3 is probably not for everyone, esp recent ex-Windows users …. but is seems very easy to learn and customize, even if you’re not a CLI geek!
Thanks again and good luck.
meine
i3 really is my favorite WM, nice to see this article posted. i3’s advantage is that it is very fast, customable and can be used from the keyboard. using the keyboard needs some adaption at first but is faster than using the mouse after a few sessions.
i3 on top of Gnome applications still has heavy demands on your computer’s CPU. installing la lighter version of Fedora helps a lot — i3 as a WM based on a LXDE, MATE or XFCE spin is a huge improvement.
with lightdm display manager you can choose between desktop environments, your choice is kept in memory for the next time. this is practical sharing your Fedora box with multiple users. every user can set its preferred WM in lightdm, so you can use i3 while less tech users can still use the basic MATE desktop.
meine
nice to see my favorite i3 here on Fedora Magazine! although i3 has some time to adapt to keyboard navigating it really is a swift way to work. i3 is the best counter reaction to overly tiled and bannered modern desktop environments — it maximizes your working space.
the low demands on CPU are great. a fast computer even becomes faster. using a Gnome installation as a base still is a bit CPU hungry because of the Gnome software. using one of the lighter Fedora Spins like LXDE, MATE or XFCE as a base gives you a faster machine because basic applications are leaner. just use i3 on top of one of these spins and you’ll be amazed!
I installed LightDM Display Manager so I can use i3 after logging in and the other users on my box use their less techie MATE. LightDM keeps your choice for future sessions.
Sevag H
i3 is great.
Check out pa-applet (you can find it on GitHub) for a simple status bar volume control and device selector in the i3 status bar. Download it from sources, compile it, and add “exec –no-startup-id /path-to-pa-applet-bin/pa-applet” to your i3 config.
You can also run i3 without a display manager, directly on X, for a really lean setup.
Ryan McCoskrie
Thanks for pointing that out. This is the kind of knowledge needed to not feel like a Caveman without a full blown DE
Ryan McCoskrie
I’m definately going to try i3 now!
… And maybe come back to Fedora as well…
Gringao
Hi,
Nice article, just to notice there is an improve i3status in python : py3status
https://github.com/ultrabug/py3status/wiki
Have Fun.
William Moreno
It is packaged in Fedora, I know because I did the package review:
https://admin.fedoraproject.org/pkgdb/package/rpms/py3status/
Hiisi
I have installed i3 as described in the article. However on the login screen I don’t have an option to choose i3. Only GNOME/GNOME classic/GNOME en waywland is there. What should I do?
Hiisi
My problem is solved by reboot.
Allen
Thank you for this great article! It got me trying out i3 and I simply love how minimal it is. Especially with its default ability to place windows side-by-side, tabbed and stacked.
I am currently using a x220 with Fedora Gnome (My First Linux DE) while trying out i3.
I am wondering if there are any things that I need to configure when I am using dual batteries (With the slice battery) such that the power would be discharging from the internal battery when the slice battery empties out.
This behavior was taken care by Gnome and from my understanding that i3 is only a Window Manager hence thinking whether if there are any additional configurations that I would need to be doing when I am using i3.
Any ideas?
Ingo Bürk
Saying i3 is “relatively” new is “relatively” odd; it has been around for some seven years now.
A window manager by no means has to be “flat”, “terminal-like” or use tiles. That’s just plain wrong.
Please DO NOT use xkill to close windows. xkill should be used for unresponsive windows. It entirely bypasses the WM_CLOSE protocol and instead just forcefully kills (hence the name) the window. Applications are fully expected to misbehave in this case. The xkill man page is quite clear on it being a dangerous way to close windows.
The correct term is to “(in-place) restart” i3, not “reload” i3. “reload” in the i3 terminology means to reload the config without restarting i3. Also, you could use “i3 -C” to see whether there are errors in the config before restarting as restarting with a broken config could give a new user a hard time recovering.