i3 Window Manager FTW
Fri 01 July 2016Tiling Window What ?!
Window Manager - Okay, lets clear the most basic thing first, a window manager is the program which generally draws the GUI of your computer. Most of the time the WM is not just one program, but a suite of programs designed to fulfill most of the daily requirements of the users.
Examples - GNOME, KDE, Unity, Mate
Tiling Window Managers
WMs like GNOME, KDE, Unity, Mate etc are what we call floating window managers, these are the types of window managers in which the windows are floating are draggable, resizeable, overlapping and all the frilly things.
Tiling window managers are a special class of window managers, where windows fit in the display just like tiles. The screen is organized into mutually non-overlapping frame.
A rough idea of how tiling window managers look like -
In tiling window managers you cannot just drag windows and stuff. Its very different from the usual desktop managers.
To be honest I was never a fan of tiling window managers, but one day out of the blue I decided to give tiling window managers a try. Thus began endless googling about which tiling window manager should I use ? , and I setteledd for i3wm.
Here are some of the conditions I had in my mind when evaluating various wms’ and how i3wm is fulfulling all of these -
- There should be ample and easy to understand documentation - i3 has excellent documentation, infact having ample and understandable documentation is one of the design philosophies of this wm.
- Configuration should be simple, as I did not want to learn another scripting language, just to configure my window manager - Configuration is done using plaintext configuration files using human readable language, keywords.
- Easy installation, it should not result in any downtime of my machine
- i3wm package is available for almost all of the distros, and its strctly a wm, no extra package is installed, only one kickass window manager
- Good tutorials, and user base - Tons of information on reddit, forums and youtube tutorials are available.
- Excellent support for multiple monitors - Most screen efficient display.
- Support for good keybindings, hence minimizing the use for mouse - Has vim like keybindings What else can I want more ?
To give you a overview of how I am using i3wm, here is what my screens look like - (I use triple displays)
The blank space is because two of my screens are set to 1366x768 px and one is set to 1920x1080px, but that’s not the point.
Here are some official videos about i3wm and the containers and tree data strucutres it uses -
- i3 Basics - This video covers the bare basics of i3wm and various modes Before we get out hands dirty with it supports
- Containers and tree data structure of i3 - Great video which covers how the windows are handled in i3 using tree data structure. Must watch if you want to understand how to manipulate containers and other stuff.
i3 Conf - Out of the box, i3 is okay-ish. But with the right configuration this WM becomes very powerful.
Here is my i3 conf file
The default location for this file is ~/.i3/config
-
The first screen has one vertical container and two horizontally tiled containers
-
The second screen has only one program open, vim.
-
The third screen has tabbed layout, with multiple tabs open.
dmenu - dmenu is the built in i3 launcher. Its activated my pressing $mod
+ d
, and is used for launching various applications and stuff. You can also
use other launchers. I find dmenu to be sufficient and use it most of the
time. You might want to check out rofi, its an excellent alternative and is
feature filled.
i3bar - The bar at the bottom of each screen is i3bar, its a simple program which shows the output of either the inbuilt or third party program. It shows the system status and other things.
I use py3status for outputting the status. You can install py3status using pip or your distributions package manager.
The status line is configured using the i3status.conf file. Here is my configuration file.
Marks - Marks allow you to mark a window and then you can easily do a goto on that mark from any random window that you are on.
Keybindings - I have kept the keybingds similar to that of vim. Its very handy and easy to remember.
Managing Audio, Networks and other stuff
Managing audio and networks can be cumbersome from the terminal. For this I use two excellent programs -
- nm-applet - Used for managing the wireless networks.
- pavucontrol - Pulse audio volume control, this software is really great and allows to manage your audio and card from a nice GUI.
While I manually execute pavucontrol
, I have added nm-applet
to the
startup entry.
exec nm-applet
File manager - Its unwise to file managers like Files (Gnome) or Nautilus(Ubuntu) on i3, as they try to manage your desktop as well. I use pcman file manager as my file manager. Its extremely lightweigt and does the job.
GTk themes - Install lxappearance
, if you want to tinker with GTK
themes and stuff.
VLC - This is one my favourite tasks, you can fill applications like VLC,
and other players in the containers. To do this, first go to full screen, and
then press $MOD + F
, the program will now fill the container in which it is in.
Adjusting sound and brightness - I use custom keyboard shortcuts for changing sound and brightness.
Using multiple monitors
i3wm is great for people using multiple monitors. It detects all the connected displays right of the box. There is no extra program to manage your monitors, so you have to learn to configure xrandr options to make full use of your multiple monitors.
By having to configure xrandr, it becomes a good learning exercise as well.
Here is one command that I execute with every startup -
exec --no-startup-id xrandr --output HDMI1 --left-of eDP1
[My multiple monitor setup] (http://abstatic.github.io/my-current-configuration.html)
Managing wallpapers
I use nitrogen for for managing wallpapers on my different displays. Its awesome.
exec --no-startup-id nitrogen --restore
Conclusions
Till now my experience with i3wm has been awesome. Its minamilist nature is really good. You get all of the screen space to yourself and can utilize it any way you want.
Comments