User Tools

Site Tools


linux:i3_tiling_window_manager

i3 tiling window manager

What is a tiling window manager and why would you want to use one.

A tiling window manager is a different way for your desktop to manage the open windows in your desktop, it will setup the windows in tiles (well there is a surprise from the name). This means that the open windows will split themself into a grid depending on the “available” space on your screen.

A normal desktop environment will open windows in a floating state where you then can “snap” them to a space on your screen, this is what a tiling window manager automatically will do for you.

Now a important note is that a tiling window manager is not a desktop environment, you do not get full functional environment that you can just start working in. You will need to install and configure almost everything your self. It's more work and requires a lot more time to think about what you actually need.

what tiling window manager to use

There is a ton of tiling window manager out there that you can use, here is a small list

i3 bspwm awesome Xmonad sway dwm hyprland

Now what is different between all of those. Mostly its how you configure them and what display server you need, either Xorg(X11) or wayland. Now I will say that I have not tried all of the ones listed, mostly because I have not seen the need to because most of them are the same, but just with different config files.

Witch ones have I tried: I have tried i3, sway and hyprland.

i3 is simple to configure and setup, you can use it with any brand of GPU since it uses X11. It was the first tiling window manager I tried, and it's where I stopped exploring for another X11 tiling window manager because it's so simple to configure. The default status bar is good enough as it is, you don't need to configure a ton a stuff and write scripts to get basic functionality (Yes this is a shoot at hyprland and waybar) Both are so simple that someone that can't even write a basic bash script can configure it just as they want it.

Sway is for all intents and purposes a wayland i3. If you use i3 and want to switch to wayland instead of X11 then are able to just reuse your i3 config files and bob's your uncle, you are up and running.

Now why don't I use sway then if its just i3 with wayland. It's because there are a few features missing, number 1: There are no official nvidia GPU support, so in case you either have a nvidia GPU or like to test things that might be different between nvidia and amd GPU's then sway is a bad choice. Number 2: pulseaudio screen share and other pulseaudio features other then audio can be really problematic to figure out and get them to work. If or when they get figured out I will probably switch to sway

Hyprland is the “newest” kid on the block, and IMO its more about looks and “ricing” then actually getting a stable and efficient workflow. There is a ton of default setting that are about the looks like animations, a rim around the window that keeps changing the colors (It's like having a RGB keyboard around all of your in focus windows) there are gaps enabled default, which puts a gap (what a shocker) between everything which just leads to a ton of “wasted space” just for the “nice looks” Now the default config is simple, but getting into actually setting up a status bar and all the other things you would need, you have to start messing with json files just for the looks of things. One awesome feature of hyprland is that as soon as you save the config file it apply's the setting right away.

Installing i3

To start with we need to install i3 and the things you need to actually run i3.

on fedora you can run

 
dnf install i3 

and all the things you need will be installed.

On ubuntu you swap out dnf with apt.

Generate i3 config file

The first time you start up i3 after it has been installed you will be asked if you want to generate a i3 config, here you will also be asked if you want to use alt or super/windows key as your modifier key. The modifier key is a important key in your i3 config, It's one of the main ways you will interact with i3.

I personally use the super key as the modifier key because when I interact with a browser I use ALT, this way I can fx. jump to one if the open tabs, I'm able to go back in a tab witch you normally use the bottoms on a mouse to do.

Config files

There are 2 main config files in i3 that you need to know about, there is the main i3 config that allows you to customize the way you use and experience i3. that can be found at

 
~/.config/i3/config

And then there is the i3 status bar config file found at

 
/etc/i3status.conf

Application picker

The default application menu is dmenu, default it will show application names as you will find them in the terminal is you try and run applications from it. You can get it to show application names “normally” and its described in the i3 config file. Even tho its nice and neat to use as it never really gets in your way there is also rofi, It serves the same purpose as dmenu, its just a bit more in your face because its opens in the middle is your screen. It also has the feature where you can hold Ctrl and then backspace to delete the entire word, it's not a feature that I need, but its a nice to have.

To bind rofi in the config add

 
bindsym $mod+d exec --no-startup-id rofi -show drun

Set a wallpaper

With a compleatly clean i3 config you will load into a black screen, now if you want a nice wallpaper to look at when you are at a empty workspace, and can install feh. This is a image viwer that also allows you to set a wallpaper. Simply run

 
sudo dnf install feh

Now you are ready to view or set a wallpaper, this can be down with the command

 
feh --bg-fill ~/Pictures/wallpaper

Now if you run this command it will set a wallpaper in your session, but next time you login it will be gone again. So because of that you can set the command to run every time you login to i3 by adding this to your i3 config

 
exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpaper

Monitor configuration

If you have a nvivia GPU you can use the nvidia settings panel to set your monitor settings, granted it's not always it will apply those settings at startup, and that is where xrandr and autorandr come in to save the day. xrandr is a tool setup your monitors thru the terminal, it gives a ton of options but is has some pitfalls/problems you need to figure out as you set things up, one of the main problems can be monitor placement. Now xrandr does not save the configuration from session to session, and that is where autorandr comes in. With autorandr you can setup things as you like them and then save the configuration. And then when you login the next time you will have the same config. With autorandr you can save multiple configs with different names, this allows you to fx setup a laptop and then load a fitting config for each place you are.

linux/i3_tiling_window_manager.txt · Last modified: by Tobias