Skip to content
budRich edited this page Jul 13, 2023 · 6 revisions

NAME

i3var - get or set a i3 variable

SYNOPSIS

i3var     set VARNAME [VALUE] [--json JSON]
i3var     get VARNAME [--json JSON]
i3var     --help|-h --version|-v --verbose

OPTIONS

-h, --help         | print help and exit  
--json        JSON | Use JSON instead of the output of `i3-msg -t get_tree`  
--verbose          | print messages to stderr  
-v, --version      | print version info and exit  

USAGE

i3var is used to get or set a "variable" that is bound to the current i3wm session. The variable is actually the mark on the root container.

set [VALUE]
If VARNAME doesn't exist, a new window and mark will be created. If VARNAME exists, it's value will be replaced with VALUE.
If VALUE is not defined, VARNAME will get unset (the mark is removed).

get
if VARNAME exists, its value will be printed to STDOUT.

CONTACT

Send bugs and feature requests to:
https://github.com/budlabs/i3ass/issues

COPYRIGHT

Copyright (c) 2017-2023, budRich of budlabs
SPDX-License-Identifier: MIT

Clone this wiki locally