Your guide to a damn light Arch Linux with i3 and text apps

This guide assumes you have installed Arch Linux and you have been able to start X. If you are unable to achieve this, please read the Arch Wiki. The Beginner’s Guide is incredibly helpful if this is your first (or third, or fifth) time installing Arch.

Now, you may as well go ahead and install GNOME or Unity at this point. It’s probably the easier path. But if you are installing Arch you probably shouldn’t be are not a new Linux user. Why don’t you try i3 and try to configure it without all those programs desktop environments usually throw at you? It’ll be fun, I promise. Kind of.

First of. What is i3? i3 is a tiling window manager. It is extremely fast and customizable. If you combine i3 with terminal apps and get used to them, you’ll find that your system is simpler, faster almost totally mouse independent: i3 and most of these apps are designed to work with the keyboard.

[caption id=”attachment_26" align=”aligncenter” width=”700"]

i3 with vim + ranger + gpicview + zathura[/caption]

Getting i3 installed

Well, when you get to the point of getting startx to work, there isn’t much mystery to getting i3 installed, just do:

sudo pacman -S i3

You should install all the optional dependencies too, they will come in pretty handy. Now, once you have .i3 installed, just go to your ~/.xinitrc and add:

exec i3

Save the changes. When you startx again, you should log in to i3. It will ask if you want it to create a default settings file for you. You should say yes unless you really know what you’re doing. If you, for some reason, miss this step or want to repeat it, you can at any moment go into a terminal and type:

i3-config-wizard

Now, you have i3 configured. Your config should be located at

~/.i3/config

Here are some useful beginners commands for i3. You will need them. Please do check out the i3 docs! They are second to the Arch Wiki in clarity and usefulness.

$mod is either CTRL or ALT, depending on what you chose when the wizard asked.
* $mod + return: opens a new terminal
* $mod + d: dmenu, minimal launcher, defaults with i3.
* $mod + f: toggle fullscreen
* $mod + shift + q: kills app
* $mod + number: changes virtual desktop

Getting your wifi right

If you want to use wi-fi, you can install NetworkManager, wicd or just stick to netctl, which is the systemd network manager.

netctl has the advantage of being really lightweight and ships with arch (wifi-menu is part of it).

NetworkManager may be the best known to you, as it is used by many distros and works with nm-applet, which will probably also be familiar to you.

In any case, you should read the Arch Wiki on the topic and decide.

Remember you shouldn’t run two daemons at once! They will conflict and everything will explode.

Setting up the AUR

AUR stands for Arch User Repository, According to the wiki…

(the AUR) is a community-driven repository for Arch users. It contains package descriptions (PKGBUILDs) that allow you to compile a package from source with makepkg and then install it via pacman.

The description can be a bit daunting, but it is incredibly simple to use provided you get your hands on something like yaourt, a script providing integration to the AUR and also shares syntax with pacman.

Installing yaourt is easy enough, either from the AUR itself (via the non-integrated, classical process) or by adding a repository. I’ll describe the former, as it is probably the most familiar if you come from Ubuntu or other distros.

Just edit your /etc/pacman.conf and add:

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

Then refresh pacman sources and install yaourt, all in this command:

pacman -Sy yaourt

Now you can use the script. It is basically the same than pacman. What? You haven’t read about the use of pacman yet? DO. NOW.

BUT REMEMBER: the AUR is a user repository. You should read carefully every output from yaourt. Read the comments in the AUR. Packages could be broken or outdated. Just installing from the AUR is not a good idea. Do some research before.

Getting your multimedia keys to work.

i3 doesn’t recognize your multimedia keys. It shouldn’t have to. i3 is a window manager, not a desktop environment.

But don’t you run! There’s a simple way to make them work. Just install playerctl from the AUR (yes! with yaourt!). Remember to pay attention though!

yaourt -S playerctl
Then you can add this lines to your ~/.i3/config.
# Multimedia Keys
# increase volume
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
# decrease volume
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
# mute volume
bindsym XF86AudioMute exec amixer -q set Master mute
# pause / play / next / previous
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
NOTE: You don't necessarily have to use playerctl, but it works for most players. If you want it to keep it really simple, you could just write the command for your specific media player. For example:
# play - pause
bindsym XF86AudioPlay exec banshee --toggle-playing

Fonts!

Now, when I just installed Arch, fonts were almost unreadable. Luckily, after some reading the Arch Wiki (can't recommend it enough), I found Infinality, which greatly improved my fonts. To install it, we shall add a repository to /etc/pacman.conf and sign it.
The Arch Wiki on Infinality covers the installation processes perfectly, so I won't repeat it here.
Customizing GTK
Configuring GTK without a GUI can be a pain in the ass, but we don't want to install GNOME just to have access to gnome-tweaks-tools and such. We instead will use lxappearance, which can be installed as easily as:
sudo pacman -S lxappearance
Do read the Arch Wiki on GTK+! It will tell you more about how to customize it.
There are lots of icons and gtk themes in the official repositories and in the AUR. Check them out, but be careful: don't bloat your system.
Some extra tips and tricks!
So, you now have a wifi process running, fonts that are readable, your multimedia keys are working and you've got access to the AUR.
I assume you have learned something about pacman to in the process and you've probably installed firefox or some other software you find useful.
Now, some tips and tricks:
  • you can set a wallpaper for i3 with feh! feh is an image viewing program. Although I prefer gpicview, i have feh installed because it allows me to add a line to my ~/.i3/config that sets a wallpaper. More info on the topic
  • you can use scrot to take your screenshots! even when scrot is not developed anymore, it works great. Just install it and set a line in your .i3/config that looks like this:
bindsym Print exec scrot -e 'mv $f ~/Pictures/Screenshots'
  • $mod+shift+c reloads i3 (useful when you change configs)
  • $mod+shift+e ends session
And what about the apps?
You probably have noticed you are missing some basic equipment though. You don't even have a file manager. Nor an image viewer. Nor a music player. We shall install them. Some of them will be text-based. That means they'll run in a terminal and there will be no graphical environment. This may seem weird if you are used to a GUI for everything, but you'll see that having some text-based apps increases your productivity. Besides, they are incredibly fast! And they can look very nice too.
vim: our text editor
2014-11-25-003032_1680x1050_scrot.png
vim
You can install it with sudo pacman -S vim
There are pages and pages written about vim. I won't talk about it much here because I myself am no master at it, and also because there so much else written. I'll just say it is a very cool tool to learn, specially if you code. I'll just leave some links for you to do the reading.
I will tell you how to make it your default editor, thought. It is pretty easy. Just go to ~/.bashrc:
export VISUAL=vim
export EDITOR=vim
Here are some useful links about vim. It does require some getting used to and some configuration, but it is absolutely worth it.
* Why vim?
* Vim for beginners
* Learn vim progressively
ranger: our file manager
screen-res.png
ranger
ranger is a fast, customizable file manager that has vim-like keybindings. It is easily installable via the official repositories with:
pacman -S ranger
You should read the ranger docs. Configuring is not difficult. You can find more info on it in the ranger Arch Linux Wiki page.
gpicview: our image viewer
2014-11-25-004911_1680x1050_scrot.png
gpicview
Because it is the fastest I've tried, and I've tried several. Also has a lots of keyboard shortcuts, which is always nice. It is available on the official repositories.
feh is also a good option, though in my opinion it is not the best for a tiling window manager like i3 as it doesn't adjust the image to the windows size.
zathura: our pdf reader
2014-11-25-005402_1680x1050_scrot.png
I hadn't heard about this until recently, but it works great: really fast, has vim-like key bindings and can invert colors (white text on dark background makes my brain happy).
It is also available on the official repositories. You can learn more about it in its page.. If you know how to use vim, you shouldn't have much trouble.
Unfortunately, it doesn't support many formats, so you may want to install evince as well just in case.
cmus: our music player
2014-11-25-012042_1680x1050_scrot.png
I must confess I don't use cmus for my personal computer. I use Banshee. I have a 6.000+ song library organized by ratings, which and cmus doesn't support.
If you are a normal person (ie: not obsessed with ratings for your songs), then cmus is great: it is fast, it supports playlists and it has vim-like keybindings.
Note, though, that the method for getting your multimedia keys to work with i3 won't be useful with cmus, as it doesn't provide MPRIS control. You'll have to customize it por cmus. It is not difficult. cmus --help should give you all the commands you need.
Firefox + Vimperator: our web browser
2014-11-25-010857_1680x1050_scrot.png
I used Chrome until I found about Vimperator. Now I can't leave Firefox. Vimperator is a plugin that allows you to do pretty much about everything in Firefox with your keyboard: you can follow links, go back and forward in history, search in google, navigate through your tabs... everything with a few keystrokes.
As vim, it requires some learning, but you'll be amazed how quickly it becomes a must have.
You can download Firefox trough the official repositories. Vimperator is just a Firefox plugin, you can download it from here.
Vimperator will display some help as soon as you restart firefox after you install it.
SMPlayer: our video player
2014-11-25-010153_1680x1050_scrot.png
This is more of a bonus, but I cannot stop recommending it. After years with meh-like VLC, SMPlayer proved to be much much better at everything: it automatically creates playlists with other videos in the same folder, has the ability to search (and upload!) subtitles and is fast while having many, many capabilities and options.
It doesn't have vim-like keybindings or a beautiful interface. But who needs them when you are watching a video? You're supposed to be concentrated on the movie.
It is available on the official repositories. You can learn more on the MPlayer Arch Wiki page. SMplayer is just a front end of MPlayer, so...
That was it.
Now you have a running Arch Linux OS running i3 with some nice apps on top. Keep on investigating! Arch, i3, ranger, vim and vimperator are very special applications that let you customize an incredible amount of things. No single guide can tell you how to do that!
If you wanna do something, first recognize which program is in charge of that. Then google how to do it. Chances are someone can tell you.
Enjoy Arch and i3!