Raspberry Pi and i3 window manager

I am really liking the combination of Raspbian and i3. I’ve always liked tiling windows; let the computer do the work for me to maximize the screen size of what I can get done. Me messing with window sizes is a waste of my time. Windows got particularly bad when the “tile” function added an extra blank column for people with touch-screens. I don’t have a touch-screen; so why‽‽‽ But I digress.

Novaspirit Tech has a nice video about how to add i3 to Raspbian.

The short form list of steps is:

  1. cd Downloads
  2. git clone https://github.com/Airblader/i3
    1. So this one turned out to be a little more difficult than it is portrayed in the video, because since then, Git Hub has decided that passwords are bad, and I should have to log in, create a token, and use the token in place of the password. Okay, I jumped through those hoops.
  3. sudo apt install meson
  4. sudo apt install dh-autoreconf libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev xcb libxcb1-dev libxcb-icccm4-dev libyajl-dev libev-dev libxcb-xkb-dev libxcb-cursor-dev libxkbcommon-dev libxcb-xinerama0-dev libxkbcommon-x11-dev libstartup-notification0-dev libxcb-randr0-dev libxcb-xrm0 libxcb-xrm-dev libxcb-shape0 libxcb-shape0-dev
  5. cd i3
  6. mkdir build; cd build
  7. meson ..
  8. ninja
  9. sudo ninja install
  10. cd /etc/xdg
  11. cd lxsession
  12. cd LXDE-pi
    1. One quibble I have with this video is that using tab completion is a good thing, and this step was an excellent opportunity to demonstrate it. Essentially, we have done cd /etc/xdg/lxsession and now would be the right time to do ll
      1. Well, I do ll because I have set up an alias for ls -l
      2. There are two directories listed, and both begin with “LXDE”
      3. cd (space) and just hit the tab key is the answer here. The result is the same as typing cd LXDE (without hitting the Enter key). If the plain LXDE directory was the right one (it is not) I could just hit the Enter key. Since it is the other one I want, I type the next character (the dash) and hit the Tab key again. Then I hit Enter. I never had to hit the Shift key to get to that uppercase L for LXDE. The computer did the work for me.
  13. Edit both desktop.conf and autostart
    1. Near the top of desktop.conf, change window_manager=i3 then save and exit.
    2. In autostart, comment out @lxpanel and @pcmanfm, then save and exit.
  14. sudo reboot
  15. On start, you will be prompted to configure i3. Yes, generate a config
  16. Pick your modifier key. I do like the key on the left between Ctrl and Alt. I also like the little stickers that put a proper penguin over the Winders logo. I’m going to write this as $mod although the $ is not typed; it is just an indicator that whichever key is the the modifier key is variable and can change depending on your choice.
  17. sudo apt install i3status
  18. $mod+shift+r for restart i3
    1. This gets us the i3 status line at the bottom.
  19. sudo apt install dmenu
  20. sudo apt install rofi
  21. cd .config/i3
    1. because of the reboot above, we started in our home directory. .config is a hidden directory (because of the leading dot in the file name). i3 is the sub-directory underneath, where the file config exists.
  22. edit the file config
    1. There is some good instruction in the video here about checking out which keys do what. For example, seeing that $mod+Enter launches a terminal is important; ditto $mod+d launches drun (which is apparently desktop run ?)
      1. $mod+arrow keys switch the focus between active windows.
    2. Find your way to bindsym $mod+d exec --no-startup-id and replace the end dmenu_run with rofi -show drun -width 400 -lines 5
    3. Save and exit config
    4. $mod+shift+r to restart i3
      1. Now $mod+d brings up a searchable list of things to run (like Firefox).

And now I have a beautiful set up to install WordPress on my Raspberry Pi. I’ve got a terminal side-by-side with the web browser instructions, and I didn’t have to mess with screen sizing at all. The windows are as useful as possible, and the computer did that work for me.

I may have enjoyed this somewhat more than normal because of also listening to Noisestorm on YouTube. 😀

Leave a Reply