⚙️ i3wm Installation Guide for Ubuntu #
In this guide, we will walk you through installing and customizing the i3 Window Manager (i3wm) on Ubuntu. i3wm is a lightweight, flexible, and minimalist window manager, ideal for those who want performance without sacrificing efficiency.
1. Installing Required Packages #
To install i3wm on Ubuntu, open the terminal and run the following commands to update your system and install the necessary packages:
sudo apt update && sudo apt upgrade -y
sudo apt install i3 i3status i3lock dmenu feh lxappearance -y
Explanation of each package:
i3
: The core window manager.i3status
: Displays system status on the status bar.i3lock
: Locks the screen.dmenu
: A simple application launcher.feh
: Image viewer and wallpaper setter.lxappearance
: Tool for managing GTK themes and icons.
2. Initial Setup of i3wm #
After installation, when you launch i3wm for the first time, it will ask if you want to create a configuration file. Approve the prompt to generate the default configuration.
The config file is usually located at:
~/.config/i3/config
Edit it using any text editor:
nano ~/.config/i3/config
3. Customization #
3.1. Keyboard Shortcuts #
You can modify or add new keyboard shortcuts. For example:
# Launch application
set $mod Mod4
bindsym $mod+d exec dmenu_run
# Open terminal
bindsym $mod+Return exec alacritty
# Lock screen
bindsym $mod+Shift+e exec i3lock
# Restart i3
bindsym $mod+Shift+r restart
3.2. Wallpaper Setup #
You can set a desktop wallpaper using feh
. Run this command in the terminal:
feh --bg-scale /path/to/your/image.jpg
To make it persistent across restarts, add the following line to your config:
exec --no-startup-id feh --bg-scale /path/to/your/image.jpg
3.3. Status Bar (i3status) #
To configure the status bar, edit the i3status
config file:
sudo nano /etc/i3status.conf
Example:
general {
interval = 5
}
order += "disk /"
order += "cpu_usage"
order += "load"
order += "tztime local"
cpu_usage {
format = "CPU: %usage%%"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}
4. Additional Tools and Packages #
4.1. Application Menu: rofi
#
rofi
is a more visual and powerful alternative to dmenu
:
sudo apt install rofi -y
Then, replace dmenu
in your config:
bindsym $mod+d exec rofi -show drun
4.2. Terminal Emulator: alacritty
#
To use a modern and faster terminal instead of the default one:
sudo apt install alacritty -y
And in your config:
bindsym $mod+Return exec alacritty
4.3. Volume Control: pavucontrol
#
For easier audio control, install:
sudo apt install pavucontrol -y
Add the following keybindings to your config to control volume:
bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume @DEFAULT_SINK@ +5%"
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume @DEFAULT_SINK@ -5%"
bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
4.4. Network Manager: nm-applet
#
For network management with GUI support:
sudo apt install network-manager-gnome -y
Add to your i3 config:
exec --no-startup-id nm-applet
5. Autostart Services #
To launch programs automatically at login, add them to the config file. Example:
exec --no-startup-id compton --config ~/.config/compton.conf
exec --no-startup-id pavucontrol
exec --no-startup-id xrandr --output HDMI-1 --primary --mode 1920x1080 --rate 60
6. Troubleshooting #
- i3wm Not Starting: Make sure you’ve selected the
i3
session from the login screen (LightDM or GDM). - Configuration Errors: i3wm will display an error message if something’s wrong with the config. Check
~/.config/i3/config
. - Missing Applications: Ensure all required packages are installed.
7. Final Notes #
This guide covered the basic installation and customization steps for i3wm. For advanced features and theming, refer to:
- Official Documentation: https://i3wm.org/docs/
- Community Forums: https://reddit.com/r/i3wm
Enjoy your minimal and efficient desktop experience!