Skip to main content

somewm-client Reference somewm-only

IPC command-line tool for controlling SomeWM. This is SomeWM's equivalent to AwesomeWM's awesome-client, but uses a different protocol and command set.

Usage

somewm-client <command> [arguments...]

General Commands

CommandDescription
pingCheck if SomeWM is running
versionShow SomeWM version
eval <code>Evaluate Lua code and return result

Client Commands

Commands for window management. Client IDs are simple integers (1, 2, 3...) assigned when windows open. IDs increment but don't reuse within a session, and reset when the compositor restarts.

CommandDescription
client listList all clients (windows)
client focus <id>Focus client by ID
client close <id>Close client by ID
client minimize <id>Minimize client
client maximize <id>Maximize client
client fullscreen <id>Toggle fullscreen
client floating <id>Toggle floating
client ontop <id>Toggle always-on-top
client sticky <id>Toggle sticky (visible on all tags)

Tag Commands

CommandDescription
tag listList all tags
tag view <name>View tag by name
tag viewidx <n>View tag by index (1-based)

Screen Commands

CommandDescription
screen listList all screens
screen focus <n>Focus screen by index

Input Commands

Commands for input device configuration.

CommandDescription
input <property>Get input property value
input <property> <value>Set input property value

Available properties: tap_to_click, tap_and_drag, drag_lock, tap_3fg_drag, natural_scrolling, disable_while_typing, dwtp, left_handed, middle_button_emulation, scroll_method, scroll_button, scroll_button_lock, click_method, send_events_mode, accel_profile, accel_speed, tap_button_map, clickfinger_button_map, keyboard_repeat_rate, keyboard_repeat_delay, xkb_layout, xkb_variant, xkb_options, numlock

note

These commands set global input defaults. Per-device rules configured via awful.input.rules take priority over global settings. See awful.input Reference for details.

Screenshot Commands

CommandDescription
screenshotTake full screenshot
screenshot <filename>Save screenshot to file

Session Commands

CommandDescription
lockLock the session

Examples

# Check connection
somewm-client ping

# List windows
somewm-client client list
# Output:
# id=1 title="Firefox" class="firefox" tags=1 floating=false
# id=2 title="Terminal" class="Alacritty" tags=1 floating=false

# Focus window by ID
somewm-client client focus 1

# Enable tap-to-click
somewm-client input tap_to_click 1

# Evaluate Lua
somewm-client eval "return client.focus and client.focus.name"

# View tag 3
somewm-client tag viewidx 3

# Lock the session
somewm-client lock

Exit Codes

CodeMeaning
0Success
1Connection failed
2Command failed
3Invalid arguments

See Also