📜 ⬆️ ⬇️

I3 Window Manager

I would like to continue the theme of tile window managers begun yesterday by JagaJaga with a story about another representative of them - i3wm . Unlike awesome, its settings are recorded in a plain text file.

Features of i3wm for the user: correct support for multiple monitors (see the screen at the end), a simple text config file, no need to recompile wm after changing settings, three window layout modes, the dmenu application launch menu, creates desktops as needed and deletes empty ones, Out of the box has an excellent information panel showing the level of Wi-Fi network, battery power and a lot more then.


Demonstration from the author i3



')

Installation


i3wm is available in Debian, Arch, Gentoo, Ubunto, FreeBSD, NetBSD, OpenBSD, OpenSUSE, Mageia, Fedora, and Exerbo repositories. I will tell on the example of Ubuntu 12.04.

The required package is called i3, therefore:
# apt-get install i3 

Now on the user input and password screen, you can select “i3” as the window manager.

Customization


When you first start you will be prompted to select a modifier key. I chose win for compatibility with most applications.

Add a switch to the Russian layout by Alt + Shift, a dropbox autoload, switching between desktops mod + Control + Left / Right, screen lock mod + Control + l and sleep mode with screen lock when it leaves mod + Control + s .

Keyboard layout switching is configured with setxkbmap. For this serves
 $ setxkbmap "us,ru" ",winkeys" "grp:alt_shift_toggle" 

In order not to enter it every time after a reboot, create an .xsessionrc file in the user's root folder, make it executable, and bring it to the form:
 #!/bin/sh exec setxkbmap "us,ru" ",winkeys" "grp:alt_shift_toggle" 

For autoloading, Dropbox .xsessionrc will look like this:
 #!/bin/sh exec setxkbmap "us,ru" ",winkeys" "grp:alt_shift_toggle" & dropbox start & 

Now the next time you log into i3wm, the Russian and English keyboards will be available.

Setting up i3 is usually done using a user config. Create a folder ~ / .i3 and copy the configuration template into it:
 $ cp /etc/i3/config ~/.i3/config 

Now you can select settings for yourself based on the documentation . I added the following lines:
 # lock screen bindsym $mod+Control+l exec i3lock # lock screen and suspend bindsym $mod+Control+s exec i3lock && dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend # switch workspaces by mod+ctrl+left/right bindsym $mod+Control+Left workspace prev bindsym $mod+Control+Right workspace next 


My config .

Using


Some standard default hotkeys:

mod + Enter opens terminal
mod + d starts dmenu (a menu at the top of the screen that, as you type the name of the application from the keyboard, offers options for starting
mod + Shift + Q closes the active window

mod + v turns on vertical tiling mode (the screen will be divided horizontally)
mod + h turns on horizontal tiling mode (the screen will be divided vertically)

mod + w turns on the tabs mode (each window on the desktop occupies the entire screen, tabs are visible from above)
mod + s turns on the stack mode (the window titles are one below the other, each window occupies the entire screen)
mod + e returns standard mode
mod + Shift + Space switches the window to the floating mode and back

mod + Left / Right / Up / Down moves the focus within the desktop
mod + Shift + Left / Right / Up / Down moves the current window within the desktop

mod + 1 , etc. switches to the desktop with the specified number

mod + Shift + C reads settings from a configuration file
mod + Shift + E exits i3wm to username and password input screen

Full features for setting up and using i3wm are described in the documentation .

Cheatsheet with hot keys, handy thumbnails from the author’s site:





Bonus


If you have two monitors, or a built-in netbook screen and an external monitor, like mine, then i3wm will work fine for them. Most importantly, this does not require any additional settings.

The list of available monitors:
 $ xrandr -q 

Let's configure their work in pairs:
 $ xrandr --output LVDS1 --mode 1366x768 --pos 0x0 --output VGA1 --mode 1280x1024 --pos 1366x0 

where LVD1 is a monitor embedded in a netbook, its resolution is 1366x768 and it is pressed against the upper left corner, VGA1 is an external monitor, its resolution is 1280x1024 and it is offset 1366 pixels to the right relative to the left upper corner.

Is there a result! On the left, the built-in screen netbook, on the right external monitor:


Burjui Hubrazhitel shared a link to a video about i3 with GoogleTechTalks .

Source: https://habr.com/ru/post/150100/


All Articles