LinuxCommandLibrary

i3exit

Exit or restart the i3 window manager

TLDR

Log out of i3

$ i3exit logout
copy

Lock i3
$ i3exit lock
copy

Shut down the system
$ i3exit shutdown
copy

Suspend the system
$ i3exit suspend
copy

Switch to the login screen to log in as a different user
$ i3exit switch_user
copy

Hibernate the system
$ i3exit hibernate
copy

Reboot the system
$ i3exit reboot
copy

SYNOPSIS

i3exit [mode]

PARAMETERS

logout
    Logs out of the current i3 session.

reboot
    Reboots the system.

shutdown
    Shuts down the system completely.

suspend
    Suspens the system to RAM.

lock
    Locks the screen, typically using i3lock.

hibernate
    Hibernates the system to disk.

poweroff
    An alias for the shutdown action.

DESCRIPTION

i3exit is not a standalone binary but typically a shell script designed to facilitate various session and system power management actions within the i3 window manager environment. It serves as a convenient wrapper, often integrated with interactive menus like dmenu or rofi, to allow users to easily choose between actions such as logging out, rebooting, shutting down, suspending, or locking the screen. The script abstracts the underlying commands (e.g., systemctl, loginctl, i3lock) required for these operations, providing a consistent interface for i3 users. Its flexibility allows users to define custom actions or integrate it seamlessly into their i3 keybindings for quick access to critical system functions.

CAVEATS

i3exit is generally a user-contributed or custom shell script, not a standard distribution binary. Its functionality heavily depends on the underlying system utilities (e.g., systemctl, loginctl, i3lock) being available and correctly configured on the user's system. The specific actions and their implementations may vary significantly between different versions or user-customized scripts. Users might need to install i3lock separately for screen locking functionality.

CUSTOMIZATION AND INTEGRATION

i3exit scripts are highly customizable. Users often modify them to suit their specific needs, such as adding custom prompts, integrating different screen lockers, or defining unique actions. They are typically bound to specific key combinations within the i3 configuration file (e.g., bindsym $mod+Shift+e exec --no-startup-id i3exit) to provide quick access to the exit menu or direct actions.

DEPENDENCIES

The proper functioning of i3exit often relies on the presence of other command-line tools. For system power actions, systemctl or loginctl (part of systemd) are commonly used. For screen locking, i3lock is the most frequent choice, but others like xss-lock combined with slock or betterlockscreen can also be utilized depending on the script's implementation. Interactive menus typically use dmenu or rofi.

HISTORY

The concept of i3exit emerged organically within the i3 window manager community as a practical solution for unifying system exit operations. Given that i3 itself is a minimalistic window manager, it doesn't bundle such high-level system control utilities. Users and developers created various shell scripts named i3exit (or similar) to provide a consistent interface for session management (logout) and system power control (reboot, shutdown, suspend, lock). These scripts became common examples in i3 configuration files and community forums, demonstrating how to leverage external tools like dmenu and systemd's systemctl/loginctl for a complete desktop experience. Its development is decentralized, driven by community needs and contributions.

SEE ALSO

i3(1), systemctl(1), loginctl(1), dmenu(1), rofi(1), i3lock(1)

Copied to clipboard