Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure and use the i3 window manager for Linux

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how Linux configures and uses the i3 window manager. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. Installation

First enter the Fedora system and open a terminal. Use dnf to install the required packages, as follows:

Note: in this command, I excluded the rxvt-unicode package because I prefer terminator as my terminal emulator.

Depending on the user's current system state, many dependencies may be installed during command execution. Wait for all dependencies to be installed, and then restart your computer.

2. Login and initialization for the first time

After your machine is rebooted, you can experience i3 for the first time. On the GNOME display Manager (GDM) screen, select your user name, then don't rush into your password, click on the pinion below the password input box, and then select i3 instead of GNOME, as shown below:

Enter your password and click "Sign In". After you log in for the first time, you will first see the configuration interface of i3:

Clicking the enter key will generate a configuration file on $HOME/.config/i3, which you can then use to customize some of i3's behavior.

On the next screen, you need to select your Mod key. This step is critical because the Mod key is usually used as the initiator of the i3 command shortcut. Pressing enter selects the Win key as the default Mod key. If your keyboard does not have the Win key, replace it with the Alt key, select it with the arrow key and press enter to confirm.

Now you are logged into i3's system. Because i3 is a minimalist window manager, you will see a black screen window and a status bar at the bottom of the screen:

Next, let's take a look at how i3 is actually used.

3. Shortcut keys

Now that you are logged into the i3 session, you need a few basic shortcuts to deal with the basic operations.

Here are some commonly used shortcut keys, of course, more than these, for complex requirements, you need to write your own scripts to implement.

Default shortcut key:

KeyCommand$mod + Enter launches virtual terminal $mod + A focus escape to parent window $mod + S stack layout $mod + W tag layout $mod + E default layout $mod + SpaceBar focus in tiled / floating conversion $mod + D launches dmenu$mod + H horizontal split window $mod + V Vertical split window $mod + J focus moves to the left window $mod + K focus moves down window $mod + L focus moves up window $mod + Focus moves to the right window $mod + Shift + Q kills the current window process $mod + Shift + E exits i3 $mod + Shift + C reloads i3config on the spot, no need to restart $mod + Shift + R restart i3 (also reloads i3config, but no exit process) $mod + Shift + J window moves left $mod + Shift + K window moves down $mod + Shift + L window moves up $mod + Shift +: window right moves $mod + Shift + SpaceBar window in tiling / floating conversion

Most i3 shortcuts use the previously configured Mod key. In the following example, when I mention the Mod key, please replace it with what you define as appropriate. You usually use the Win key or the Alt key.

First, to open a terminal, you can use Mod+ENTER. Open several terminals over and over again to see how i3 automatically arranges them on the desktop. By default, i3 splits the screen horizontally; use Mod + v to split vertically, and then press Mod + h to restore horizontal split mode.

When you need to start other applications, press Mod + d to open dmenu, a simple text application menu. By default, dmenu will render all the applications set in your $PATH. Use the arrow keys to select the application you want to launch, and you can type the name of the application to narrow the selection, and then press enter to start the selected application.

If your application does not provide an exit method, you can use i3 to close the corresponding window by pressing Mod + Shift + Q. Note that you may lose unsaved work.

Finally, when you want to close the session and exit i3, press Mod + Shift + e. You will then be prompted to exit at the top of the window. Click "Yes, exit i3" to exit, or select "X" to cancel.

These are the most basic shortcuts in i3.

In addition to the keyboard shortcuts, i3 also supports multiple displays very well, and the location of the new window depends on the monitor where the new window command is located.

I3 tiling supports both horizontal and vertical. Multiple rows or columns are supported. Window renaming is supported.

Although tiled window managers such as i3 are rare, they are an exciting "toy" for technology controllers.

4. Replace GDM

Using the i3 window manager will reduce your operating system's memory footprint; however, Fedora will still use GDM as the login screen. GDM loads several GNOME-related libraries to take up memory.

If you want to further reduce your memory footprint, you can replace GDM with some lighter display managers, such as lightdm:

Then restart your machine to use the Lightdm login interface.

Now you can continue to log in and use i3.

Unlike desktop software like Xfce,KDE,Gnome,Cinnamon, which focuses on gorgeous interfaces, window managers like i3 are more focused on keyboard control, and more efficient and customized.

Thank you for reading! This is the end of this article on "how to configure and use i3 window manager for Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 248

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report