What is i3?
i3 is a tiling window manger. That means it is like any normal window manager, but with keybindings. Most WMs are hard to use at first, but are super customizable and much lighter than any DE.
I like i3 because it has pretty easy to use keybindings, a great user guide and great customization. However, vanilla i3 without customization looks terrible.
Luckily Airblader has forked i3 to make i3-gaps. It has gaps functionality, which means you can see some of your background while you have open windows. It is pretty cool.
Note: This guide assumes you arch with GNOME installed. If you don't have it, that's fine, you will just have to figure some stuff out on your own.
i3-gaps is a package on Arch, so we can install it using pacman:
$ sudo pacman -S i3-gaps
Now that you have i3 installed, log out. You will find yourself in GDM. Put in your credentials. Before you log in, you will have to specify that you want to get into i3 and not GNOME. Click on the scroll wheel and click "i3". Login.
Now, when you go into i3, it will not look great. The bar probably isn't working, it's all dark, and it uses a terrible monospace font. To open up a terminal, you can usually press `alt +
but at the moment your config doesn't have that configured. Press
alt + d gnome-terminalor whatever your favorite term is. Open up the config located at
~/.config/i3/config`.
The first thing you want to do is change the $mod
to the super key. I like it that way, because it doesn't interfere with other app's keybinding.
- set $mod Mod1
+ set $mod Mod4
Now when I reference $mod in this guide I will say super.
Deleting i3bar
Find the bar{
part. Comment it all out.
#bar {
# status_command i3status
#}
Now if you save and restart i3 (Super + shift + r
), There will be no bar.
We will add a polybar in the last step.
Deleting titlebars
Titlebars are the text boxes at the top of every window. You can't have them in i3 if you want the gaps feature.
Add this line:
for_window [class=".*"] border pixel 3
adding gaps
Now we can enable gaps
add this to your config:
gaps inner 10
gaps outer 5
This will give a gap of 10px on the inner gap (in between two windows) and 15px on the outer sides.
Installing Scrot, Feh
If you are on Arch, run this:
$ pacman -S feh scrot
This will install scrot (a terminal screenshoting tool) and feh (a image viewer and background changer.)
Configuring feh
If you installed gnome along with me in this guide, you will already have backgrounds located at /usr/share/backgrounds/gnome
. To change the background, run this command:
$ feh --bg-scale /usr/share/backgrounds/gnome/Endless-shapes.jpg
This will change the backgound for that session. That means when you restart i3/shutdown, your background won't be the same. Luckily, feh has a file in your home directory that has the latest background command. You can run it when you start i3.
exec sh ~/.fehbg
Configuring scrot
Scrot is a screenshotting tool for the commandline. You can also make it a keybinding.
Now when you make a keybinding, I always look at the trusty keybinding cheatsheet.
I chose alt + z
. I guess I didn't think it through, because it's so close to the super key, and can be pressed easily.
You can choose any key on a white space.
type this into your config:
bindsym $mod+z exec "scrot '%Y-%m-%d-%a.png' --border --delay 10 -e 'mv %f ~/Pictures'"
Now when you press Super + z
and wait ten seconds you will find a screenshot in your ~/Pictures
.
Installing polybar
Exit the text editor and install the polybar
package from the AUR.
After installing it you can move the example config to the ~/.config/polybar
:
install -Dm644 /usr/local/share/doc/polybar/config $HOME/.config/polybar/config
Now if you type polybar example
, you will have a polybar at the top of your screen. Yet again, this bar won't be here when you restart i3.
Make this script at ~/.config/polybar/launch.sh
:
#!/usr/bin/env bash
# Terminate already running bar instances
killall -q polybar
#launch polybar
echo "---" | tee -a /tmp/toppolybar.log
polybar example >> /tmp/toppolybar.log
Now you can add this to the i3 config.
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
And that is my current i3 config. I know that I am using the default polybar but I like it.
My next blog post will be about adding an ^^(optional) compositor to add animations and other little goodies.
Comments
February 28, 2020 18:11
@CMM this was useful thanks! I didn't know I could set the background image with 'feh'
July 18, 2020 12:50
@CMM
Looks like you having a missing closing backtick after:
> «you can usually press `alt +»
Which kinda breaks the formatting of the rest of the document :)
November 28, 2023 03:15
The i3 tiling window manager must be resource efficient so as not to slow down the system. This means it must use less memory and CPU slither io than other window managers.
September 28, 2023 13:34
You might be allowed to submit brands, however, not back links, except if they may be accepted and also about matter. Personal trainer and nutrition coach Winter Park fl area
September 30, 2023 09:28
I’m stimulated when using the surpassing together with preachy showing that you choose to create in such bit of timing. ketonal
September 30, 2023 14:06
Concerning a short while ago going your site, the information you actually give on this site includes made it simpler for people considerably. With thanks to get your complete time frame & deliver the results. Find Jobs with KerBer
October 1, 2023 13:31
Thanks a lot for the purpose of rendering up to date update versions about the challenge, I just await read through further. acid
October 1, 2023 09:40
Great post. The particular submit has an effect on plenty of important difficulties individuals community. We all can’t be uninvolved to be able to these kinds of difficulties. This kind of submit offers guidelines and also principles. Extremely useful and also sensible. shaman transmogs
October 9, 2023 09:36
In the form of Inexperienced, Now i’m once and for good seeking via the internet just for articles or reviews which has been about help others. With thanks. 캡 사이트 클릭하세요
October 10, 2023 11:37
This particular is a superb publish We observed because of reveal this. It really is exactly what I needed to determine wish within long term you’ll carry on with regard to discussing this type of superb publish. ufabetvip168
October 10, 2023 13:05
It’s which means that amazing together with inspiring. We really enjoy any designs together with whoever should get it all during the post shall be grinning. ufabet1688
October 11, 2023 11:17
Ones own favorite songs is without a doubt astonishing. You have got various highly athletic animators. As i intend one the ideal in achieving success. เว็บหวยดีใจ