I3 Cheat Sheet



H4xx0r Mode Engaged

I love using i3 + i3-gaps on my minimal Debian builds as not only does it look super 1337 hackerman lvl 9000, it’s pretty easy to use and performance wise is fairly lightweight. So have I decided to try it out on Kali Linux.

Title: i3 Reference Card Author © Zeus Panchenko Subject: based on Keywords: i3, refcard Created Date: 7/31/2011 11:53:54 PM. M-S-r Restart i3 Workspaces M- Go to workspace N Windows M-S. My i3 shortcuts Cheat Sheet by evilinfu - Cheatography.com Created Date.

Install Kali

Download a Kali Linux NetInstaller iso and Load it onto a USB or DVD and proceed with installing it to your machine. The Kali Linux install is pretty straightforward and very similar to any other Debian based distro. Once you reach the ‘Select and Install Software’ screen of the install, deselect all the desktop environment options. We don’t want to install a graphical desktop environment because we will be using i3.

Update and Upgrade

Once the install is complete, log into your account, check that you are connected to the internet and do a full system update/upgrade and reboot:

sudo apt update && sudo apt full-upgrade -y
sudo reboot

User Privileges

Instead of using the root account and to avoid having to type your password every time you execute a command with sudo, run visudo and append your username to the file to get superuser privileges:

sudo visudo
username ALL=(ALL) NOPASSWD:ALL

Install i3

Now it is time to install the desktop environment and other pieces of software you might want to use (in this example Mozilla FireFox and VLC).

sudo apt install xorg xinit i3 suckless-tools firefox vlc

Once this is complete run this command so i3 starts when x begins and start the x session to enter the new desktop environment:

echo ‘exec i3’ > ~/.xsession
startx

When i3 starts for the first time, it will ask you to choose a modifier key and if you want to generate a default configuration file. Choose which modifier you want with the arrow keys and generate a new config file. For help using i3, use a cheat sheet.

Modify the i3 configuration as you see fit. It is located at:

~/.config/i3/config

Compile and Install i3-gaps

Cheat

Now we need to compile and install i3-gaps from source. Before we start this, we need to install some extra packages:

sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libsnack2-dev libxcb-shape0-dev autoconf libev-dev build-essential git

After they have installed, reboot the system. Once rebooted, clone the i3-gaps repository and move into the repos directory:

I3 Hotkeys

git clone https://github.com/Airblader/i3 i3-gaps
cd i3-gaps

Now compile and install i3-gaps by running the following commands:

autoreconf –force –install
rm -rf build/
mkdir -p build && cd build/
../configure –prefix=/usr –sysconfdir=/etc –disable-sanitizers
make && sudo make install

Finally add the following to the bottom of your i3 configuration file and restart i3 with your restart i3 keybinding (usually $modkey+Shift+R). Note the new keybindings set with the i3-gaps config.

I3 Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
  • $mod+shift+r restart i3 in place
  • $mod+shift+c reload config file
  • $mod+shift+q kill window (does normal close if application supports it)

Windows

  • $mod+w tabbed layout
  • $mod+e vertical and horizontal layout (switches to and between them)
  • $mod+s stacked layout
  • $mod+f fullscreen

Moving Windows

  • $mod+shift+<direction key> Move window in direction (depends on direction keys settings)