I3-MSG(1)
π i3-msg β bestie edition π
okay so real talk: this is the i3-msg page from the i3 Manual, and it's literally your group chat with the i3 window manager. You send messages, i3 replies. Iconic. Let's go π«Ά
β¨ NAME β¨
i3-msg β send messages to i3 window manager. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
i3-msg [-q] [-v] [-h] [-s socket] [-t type] [-r] [message]
π OPTIONS π
-q,--quietβ only sends the ipc message and suppresses the output of the response. no receipts, no drama, just send it π-v,--versionβ shows the version number and dips. bye! π-h,--helpβ shows a short help-message and exits. your little cheat sheet fr fr-s,--socketsock_path βi3-msgwill use the environment variableI3SOCK, or the socket path you hand it right here. If both of those fail? she tries to get the socket info from the root window, and then tries/tmp/i3-ipc.sock, and only after all of that does she exit with an error. she's persistent, she's thorough, she's not giving up on you πͺ-ttype β send an ipc message, see below. this option defaults to"command". so if you don't say anything, she assumes you mean command, lowkey a mind reader-m,--monitorβ instead of exiting right after receiving the first subscribed event, she waits indefinitely for all of them. can only be used with-t subscribe. see the"subscribe"IPC message type below for the details π-r,--rawβ displays the raw JSON reply instead of pretty-printing errors (for commands) or displaying the top-level config file contents (forGET_CONFIG). raw as in no filter, no glow-up, just the JSON as it is πmessageβ send ipc message, see below. yeah that's the whole description, she's mysterious like that
π₯ IPC MESSAGE TYPES π₯
commandβ the payload of the message is a command for i3 (like the commands you can bind to keys in the configuration file), and it gets executed directly after receiving it. so like, immediate. no waiting around β¨get_workspacesβ gets the current workspaces. the reply will be a JSON-encoded list of workspaces. all your lil spaces, listed out π¦get_outputsβ gets the current outputs. the reply will be a JSON-encoded list of outputs (see the reply section ofdocs/ipc, e.g. athttps://i3wm.org/docs/ipc.html#_receiving_replies_from_i3).get_treeβ gets the layout tree. i3 uses a tree as data structure which includes every container. the reply will be the JSON-encoded tree. yes bestie, a whole tree, every container, the entire family tree π³get_marksβ gets a list of marks (identifiers for containers to easily jump to them later). the reply will be a JSON-encoded list of window marks. bookmarking but make it i3 πget_bar_configβ gets the configuration (as JSON map) of the workspace bar with the given ID. if no ID is provided, an array with all configured bar IDs is returned instead. give her an ID or she gives you everything πget_binding_modesβ gets a list of configured binding modes. all the modes you set up, right there πget_versionβ gets the version of i3. the reply will be a JSON-encoded dictionary with themajor,minor,patchand human-readable version. numbers AND vibes β¨get_configβ gets the currently loaded i3 configuration. your config, as it currently stands, served fresh πsend_tickβ sends a tick to all IPC connections which subscribe to tick events. tick tock, everybody listening gets the memo β°subscribeβ the payload of the message describes the events to subscribe to. upon reception, each event will be dumped as a JSON-encoded object. see the-moption for continuous monitoring. set it and forget it, she'll keep you posted π
π DESCRIPTION π
i3-msg is a sample implementation for a client using the unix socket IPC interface to i3. she's the reference bestie, the demo girl, the one showing you how it's done π«Ά
π Exit status:
0: if OK1: if invalid syntax or unable to connect to ipc-socket2: if i3 returned an error processing your command(s)
okay so those numbers? memorize them, they're your vibe check on whether things actually worked π
β EXAMPLES β
# Use 1-px border for current client
i3-msg "border 1pixel"
# You can leave out the quotes
i3-msg border normal
# Dump the layout tree
i3-msg -t get_tree
# Monitor window changes
i3-msg -t subscribe -m '[ "window" ]'
see how the quotes are optional? she's flexible like that, she gets you π
π§ ENVIRONMENT π§
πΈ I3SOCK
if no ipc-socket is specified on the commandline, this variable is used to determine the path, at which the unix domain socket is expected, on which to connect to i3. so like, if you didn't say anything, she checks here first, iykyk π¦
π SEE ALSO π
π AUTHOR π
Michael Stapelberg and contributors β kings, legends, the whole squad π«Ά
and that's the whole page bestie, no notes, she ate π β¨
this was i3-msg from i3 4.25.1, dated 01/01/1980 β mwah, go send some messages π
π¦ where this page comes from
- fedora 43: i3 4.25.1-1.fc43 Β· BSD-3-Clause
- fedora 44: i3 4.25.1-1.fc44 Β· BSD-3-Clause
- nixpkgs unstable: i3 4.25.1
- ubuntu resolute: i3-wm 4.25.1-1 Β· BSD-3-Clause
- ubuntu stonking: i3-wm 4.25.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms