DEV Community

Tamiz Uddin
Tamiz Uddin

Posted on • Originally published at tamiz.pro

Manjaro i3: Essential Shortcut Commands for Ultimate Productivity

Originally published on tamiz.pro.

Switching to i3 from a traditional desktop environment like GNOME or KDE is a paradigm shift. You trade mouse-driven convenience for keyboard-driven speed, precision, and resource efficiency. For Manjaro users, who often prioritize customization and bleeding-edge software, i3 offers a lean, highly performant base that lets you build your workflow from the ground up.

The power of i3 lies not in its GUI, but in its configuration file (~/.config/i3/config) and the muscle memory you build using keyboard shortcuts. This article serves as a definitive reference for the essential shortcut commands in Manjaro i3, helping you navigate, manage windows, and control your system without lifting your hands from the home row.

Prerequisites and Configuration

Before diving into the shortcuts, it is crucial to understand that i3 is not pre-configured with a massive set of default bindings out of the box. Manjaro's i3 spin provides a decent starting point, but many users tweak these. The master configuration file is located at:

~/.config/i3/config
Enter fullscreen mode Exit fullscreen mode

You can edit this file using your preferred text editor (e.g., nano, vim, or code):

nano ~/.config/i3/config
Enter fullscreen mode Exit fullscreen mode

After making changes, you must reload the i3 configuration to apply them. This is done using the default key combination (usually Super + Shift + c) or by restarting the i3 session. Always test new bindings in a safe context before relying on them.

The Super Key: Your Primary Modifier

In i3 terminology, the "Super" key typically refers to the Windows key or Command key on Mac keyboards. This is the primary modifier for almost all window management commands. If you are on a Manjaro installation with a standard keyboard layout, Super is your gateway to productivity.

Window Navigation and Layout

i3 uses a tiling model where windows are arranged automatically. Mastering how to move between these tiles is the first step.

Shortcut Action Description
Super + h Focus Left Move focus to the window on the left.
Super + j Focus Down Move focus to the window below.
Super + k Focus Up Move focus to the window above.
Super + l Focus Right Move focus to the window on the right.

These keys mimic the arrow keys but are designed for ergonomic efficiency. You do not need to move your hand to the arrow keys; your fingers remain on the home row.

Switching Layouts

i3 supports multiple tiling layouts. You can switch between them dynamically:

Shortcut Action Description
Super + d Toggle Split Toggle between horizontal and vertical splits in the currently focused container.
Super + e Toggle Stack Switch the focused container to stack layout (windows are stacked on top of each other, accessible via focus).
Super + s Toggle Tabbed Switch the focused container to tabbed layout (windows appear as tabs).
Super + f Toggle Fullscreen Toggle fullscreen mode for the currently focused window.

Moving and Resizing Windows

Once you have focus on a window, you can move it or resize the container it resides in.

Shortcut Action Description
Super + Shift + h Move Left Move the focused window to the left.
Super + Shift + j Move Down Move the focused window down.
Super + Shift + k Move Up Move the focused window up.
Super + Shift + l Move Right Move the focused window to the right.

Resizing Containers

To resize the space a window occupies, use the Shift modifier combined with the navigation keys:

Shortcut Action Description
Super + Shift + h Resize Left Shrink the current container horizontally to the left.
Super + Shift + j Resize Down Shrink the current container vertically downwards.
Super + Shift + k Resize Up Shrink the current container vertically upwards.
Super + Shift + l Resize Right Shrink the current container horizontally to the right.

Note: In i3, you resize the container (the split area), not just the window. This distinction is vital. If you want to make a window larger, you are shrinking the adjacent container.

Application Launching and Management

The ability to launch applications and switch between them instantly is where i3 shines. Manjaro i3 comes with rofi or dmenu pre-configured for application launching.

Shortcut Action Description
Super + d Run Command Launches the dmenu/rofi application launcher. Type the name of an application (e.g., firefox, code, terminal) and press Enter.
Super + Shift + e Exit i3 Prompts to log out, restart i3, or lock the screen.
Super + Shift + r Reload Config Reloads the i3 configuration file without restarting the session.
Super + Shift + q Kill Window Kills the currently focused window. Use this when a window freezes and cannot be closed normally.

Terminal Multiplexer Integration

Most Manjaro i3 users bind a specific key to open a terminal directly. The default is often:

Shortcut Action Description
Super + Enter Open Terminal Opens your default terminal emulator (usually Alacritty, Kitty, or xterm).

If you use tmux or screen inside your terminal, you can bind additional keys to create new splits within the terminal itself, effectively nesting your tiling environment.

Workspace Management

i3 uses workspaces as virtual desktops. You can have up to 20 workspaces, though most users stick to 10 or fewer.

Shortcut Action Description
Super + 1-0 Switch to Workspace 1-10 Jump directly to workspace 1 through 10.
Super + Shift + 1-0 Move Window to Workspace Move the currently focused window to workspace 1-10.
Super + Tab Cycle Through Workspaces Cycle forward through the list of workspaces that contain windows.
Super + Shift + Tab Cycle Backward Cycle backward through the list of workspaces.

Naming Workspaces

You can name workspaces for better organization. For example, you might bind Super + Shift + s to move a window to workspace "2:browser". You can then switch to it using Super + 2.

System Control and Power

i3 itself does not handle power management or volume control by default. You rely on external tools like playerctl, amixer, or brightnessctl. Manjaro i3 usually includes scripts for these.

Shortcut Action Description Notes
Super + Print Screenshot Takes a screenshot of the entire screen. Uses scrot or grim depending on setup.
Super + Shift + Print Screenshot Region Takes a screenshot of a selected region. Uses scrot -s or grim -g.
Super + m Toggle Mute Toggles audio mute. Requires amixer or pactl binding.
Super + Up Volume Up Increases volume. Requires amixer or pactl binding.
Super + Down Volume Down Decreases volume. Requires amixer or pactl binding.

Important: If these shortcuts do not work, you need to define them in your ~/.config/i3/config file. For example:

# Volume control
bindsym --release XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+
bindsym --release XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- 
bindsym --release XF86AudioMute exec --no-startup-id amixer set Master toggle
Enter fullscreen mode Exit fullscreen mode

You can replace XF86AudioRaiseVolume with Super + Up if you prefer custom bindings.

Advanced Tips for Manjaro i3 Users

1. Use i3-msg for Scripting

The i3-msg command is your friend. You can use it in shell scripts to automate tasks. For example, to kill all windows in the current workspace:

i3-msg kill
Enter fullscreen mode Exit fullscreen mode

Or to move all windows to a specific workspace:

i3-msg move container to workspace 3
Enter fullscreen mode Exit fullscreen mode

2. Configure i3status or polybar

The status bar is essential for monitoring system resources. Manjaro i3 often uses i3status or polybar. You can customize the output by editing ~/.config/i3status/config or ~/.config/polybar/config.ini. This allows you to display CPU usage, memory, network speed, and battery life directly in your header.

3. Window Rules

You can define rules for specific applications to open in specific workspaces or in fullscreen mode. Add these to your ~/.config/i3/config:

# Always open Firefox in workspace 2
for_window [class="Firefox"] move to workspace 2

# Always open VS Code in fullscreen
for_window [class="Code"] fullscreen
Enter fullscreen mode Exit fullscreen mode

4. Enable i3-sensible-terminal

If you change your terminal emulator, ensure your Super + Enter binding uses i3-sensible-terminal instead of a hardcoded terminal name. This makes your configuration portable across different setups.

bindsym --release Return exec --no-startup-id i3-sensible-terminal
Enter fullscreen mode Exit fullscreen mode

Frequently Asked Questions

How do I change the Super key to Alt or Ctrl?

Open ~/.config/i3/config and search for the line set $mod super. Change super to alt or ctrl as desired. Then, update all subsequent shortcuts in the file to reflect the new modifier. For example, change bindsym $mod+Return to bindsym $mod+Return (the variable handles the change automatically).

Why are my keyboard shortcuts not working?

First, ensure you have reloaded the configuration with Super + Shift + c. Second, check for conflicting bindings in your desktop environment or window manager. If you are using a hybrid setup, ensure i3 is the primary window manager. Third, verify that the key bindings are not commented out (lines starting with # are ignored).

How do I take a screenshot in Manjaro i3?

If the default screenshot shortcuts are not working, install scrot or grim and slurp (for region selection). Then, add the following to your ~/.config/i3/config:

bindsym --release Print exec --no-startup-id scrot ~/Pictures/screenshots/%Y-%m-%d-%T.png
bindsym --release Shift+Print exec --no-startup-id grim -g "$(slurp)" ~/Pictures/screenshots/region.png
Enter fullscreen mode Exit fullscreen mode

Conclusion

Mastering Manjaro i3 shortcuts is an investment in your workflow. Once the muscle memory kicks in, you will find that you can navigate your operating system faster than with any mouse-driven interface. Start with the basic navigation keys (h, j, k, l), gradually incorporate workspace switching, and finally customize your system control bindings. The key is consistency—use the keyboard, and eventually, your fingers will know exactly where to go.

For more insights on Linux customization and performance tuning, explore Tamiz's Insights for advanced guides on optimizing your Manjaro setup.

Top comments (0)