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 [<lock|logout|suspend|hibernate|reboot|shutdown>]

PARAMETERS

lock
    Locks screen immediately using i3lock

logout
    Exits i3 session via i3-msg exit

suspend
    Suspends system (systemctl suspend)

hibernate
    Hibernates system (systemctl hibernate)

reboot
    Reboots system (systemctl reboot)

shutdown
    Powers off system (systemctl poweroff)

DESCRIPTION

i3exit is a lightweight shell script utility commonly used with the i3 tiling window manager on Linux. It presents a simple popup menu powered by tools like dmenu or rofi, offering quick access to essential session management actions: locking the screen, logging out, suspending or hibernating the system, rebooting, or powering off.

Invoked from a keybinding (e.g., Mod+Shift+E in i3 config), it streamlines shutdown workflows without needing a full desktop environment. The script parses user selection and executes corresponding commands, such as i3lock for locking or systemctl for power operations.

Customization is straightforward—users edit the script to change menu options, prompts, or backend tools. It's not part of core i3 but widely adopted via community repos like Arch User Repository (AUR) or manual installation. Ideal for minimal setups, it emphasizes speed and keyboard-driven interaction, enhancing i3's productivity focus.

CAVEATS

No menu shown with direct argument; requires dmenu/rofi, i3lock, and polkit/sudo for power actions. May fail without proper permissions.

DEPENDENCIES

Needs dmenu or rofi for menu, i3lock for lock, systemd/logind for power mgmt.

CONFIGURATION

Edit script source to customize menu text, colors, or actions; bind in ~/.config/i3/config e.g., bindsym $mod+Shift+e exec i3exit.

HISTORY

Originated as community script ~2012 alongside i3 v4.x growth; popularized via AUR/git repos. Evolved with systemd integration post-2015.

SEE ALSO

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

Copied to clipboard