DragonFly BSD

i3

Getting Started with the i3 Window Manager

i3 is a tiling window manager. Tiling means no windows overlap each other.

This page will get you started with a basic configuration for i3.

Install

Here are the packages you will need installed for the simple config file that is referenced below.

pkg install i3 i3status dmenu xterm

Launch

When you first launch i3 not all the pieces are going to work yet. But go ahead and launch it to see what it looks like.

echo 'i3' > ~/.xinitrc
startx

It will ask you whether to generate a config (Yes). It will also ask which modifier key (ALT or WINDOWS) you want to use.

Now you will see the i3 desktop. But it's not really functional yet because some of the programs referenced in the default config file are not available on your system. We can fix that by updating the configuration file.

If your cursor switches to look like a clock, that means i3 encountered something in your config that it could not find. For example, if the config says to launch the unobtanium terminal emulator, and unobtanium is not installed on your system, you will get the clock cursor when you press MOD + Enter.

XXX Insert Photo

Configuration

After launching i3 for the first time, go in and edit the config file located at ~/.config/i3/config

Start a terminal

Change this to replace i3-sensible-terminal with xterm or whichever terminal emulator you have installed

xterm -bg black -fg white

Remove Some Lines

I don't have these working yet, so we'll remove them. Comment out any lines with with:

Add some lines

# Status bar
bar {
    status_command i3status
    position bottom
}

Complete Config

Here is the complete config file that will get you started.

# Minimal i3 config for DragonflyBSD
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!


set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 10

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# start a terminal
bindsym $mod+Return exec xterm -bg black -fg white

# Launch application
bindsym $mod+d exec dmenu_run

# kill focused window
bindsym $mod+Shift+q kill


# Switch between workspaces
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10

# Move window to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right


# Status Bar
bar {
    status_command i3status
    position bottom
}