In this blog, we will look at setting up i3 tiling window manager, and a status bar for i3 named i3status-rust. All of this is tested on Debian Bullseye. Some basic understanding of configuring i3 is expected.
This is part 2 in a series of 3 blogs regarding setup of Debian Bullseye on a Laptop with i3 window manager. Read part 1 here.
A display manager, or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell.
sudo apt-get install lightdm
This will also install the GTK greeter for LightDM. Next time we boot up, this is what will greet us during login instead of the command line prompt.
Next, lets install i3 and related components:
sudo apt-get install i3 i3lock dunst rofi
So what did we just install?
- i3 – The tiling window manager
- i3lock – Simple screen locker
- dunst – A notification daemon
- rofi – Window switcher & application launcher
For i3lock, dunst and rofi I use the default configuration that comes out of the box but all of these are quite configurable.
- i3lock: this man page lists supported arguments.
- rofi: I found this blog that has a series of posts describing what rofi can do.
- dunst: ArchWiki goes into some configuration details.
Before starting with the next step, let’s confirm that everything done till now works well. Restart the machine, and we should first be greeted with the drive decryption prompt, followed by the login manager. Once we login, we should see i3 with the default configuration.
My entire dot-config is available here and the i3 configuration is available here. It utilizes various scripts present in the
bin folder at the root of the repository. It also references a few applications that I will be outlining in the next blog.
Here’s how my desktop looks with a single monitor:
In i3, workspaces are an easy way to group a set of windows.
I have 5 workspace dedicated to:
- Social apps (In screenshot),
- Terminal / Editor,
- Media / Others.
Commonly used applications are mapped to specific workspace via the i3 configuration file. The workspace
2: Browsing and
5: Media / Others appear on the secondary monitory if it is connected. All of this is configured using the i3 config file. The social workspace has a slightly complicated layout defined in it’s layout file, generated using the i3-save-tree utility.
i3 status bar configuration
I use the i3status-rust status bar’s toggle icons to make common actions easier to perform. The associated scripts for these toggle icons are located here and the i3rust bar configuration is here. The touch pad toggle also has a global keyboard shortcut configured via xbindkeys. I’ll discuss this in some more detail later. When the external display is connected another i3rust bar is displayed with additional information. The configuration for that can be found here.
Custom scripts / Toggles
My i3status bar links has a few toggles that trigger custom scripts. Here’s a brief description of these:
- Limit BAT – I often have my laptop connected to AC power. To preserve battery life it’s generally a good idea to limit the maximum battery charge to about 70-80%. Enabling this switch limits the battery charging to 75%.
- HDMI – Toggles the external monitor if connected. Two scripts are used here:
activate_hdmi.shenables the HDMI display, and
laptop_only.shdisables it. Modify the scripts using
xrandrto configure it as per your setup.
- VPN – Uses
wg-quickto toggle the Wireguard interface.
- Touchpad – This uses 2 scripts: 1.
toggle_touchpad.sh. The touchpad’s current state is determined by the first script, and the second one is used to toggle it’s state.
The custom scripts work with my laptop, but may need tweaks to work with your hardware. I’ve found ArchWiki to be a good source of information regarding specific laptops.
In the next blog, we will discuss Laptop keybindings and the applications that I use daily.