13 #include <xkbcommon/xkbcommon.h> 27 DLOG(
"Ungrabbing all keys\n");
28 xcb_ungrab_key(conn, XCB_GRAB_ANY,
root, XCB_BUTTON_MASK_ANY);
51 die(
"Unable to find the configuration file (looked at " 52 "~/.i3/config, $XDG_CONFIG_HOME/i3/config, " SYSCONFDIR
"/i3/config and $XDG_CONFIG_DIRS/i3/config)");
55 LOG(
"Parsing configfile %s\n", path);
60 if (!use_nagbar &&
bindings == NULL) {
186 #define REQUIRED_OPTION(name) \ 187 if (config.name == NULL) \ 188 die("You did not specify required configuration option " #name "\n"); 191 memset(&config, 0,
sizeof(config));
194 #define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \ 196 x.border = draw_util_hex_to_color(cborder); \ 197 x.background = draw_util_hex_to_color(cbackground); \ 198 x.text = draw_util_hex_to_color(ctext); \ 199 x.indicator = draw_util_hex_to_color(cindicator); \ 200 x.child_border = draw_util_hex_to_color(cbackground); \ 238 if (config.
font.
type == FONT_TYPE_NONE) {
239 ELOG(
"You did not specify required configuration option \"font\"\n");
char * urgent_workspace_border
struct Colortriple unfocused
char * focused_workspace_border
#define SLIST_REMOVE(head, elm, type, field)
struct Config::config_bar bar
struct Colortriple urgent
#define TAILQ_HEAD_INITIALIZER(head)
color_t draw_util_hex_to_color(const char *color)
Parses the given color in hex format to an internal color representation.
struct Colortriple placeholder
struct bindings_head * bindings
struct barconfig_head barconfigs
struct Colortriple urgent
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
#define TAILQ_EMPTY(head)
i3Font load_font(const char *pattern, const bool fallback)
Loads a font for usage, also getting its height.
char * focused_statusline
Holds the status bar configuration (i3bar).
A 'Con' represents everything from the X11 root window down to a single X11 window.
Holds part of the configuration (the part which is not already in dedicated structures in include/dat...
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
#define SLIST_EMPTY(head)
xcb_connection_t * conn
XCB connection and root screen.
void match_free(Match *match)
Frees the given match.
void switch_mode(const char *new_mode)
Switches the key bindings to the given mode, if the mode exists.
char * get_config_path(const char *override_configpath, bool use_system_paths)
Get the path of the first configuration file found.
char * active_workspace_bg
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator)
Defines a mouse command to be executed instead of the default behavior when clicking on the non-statu...
struct bindings_head * bindings
union Assignment::@19 dest
destination workspace/command, depending on the type
struct assignments_head assignments
char * command
The command which is to be executed for this button.
char * focused_workspace_bg
void x_deco_recurse(Con *con)
Recursively calls x_draw_decoration.
int num_outputs
Number of outputs in the outputs array.
char * i3bar_command
Command that should be run to execute i3bar, give a full path if i3bar is not in your $PATH...
void ipc_send_barconfig_update_event(Barconfig *barconfig)
For the barconfig update events, we send the serialized barconfig.
struct Colortriple focused_inactive
struct Colortriple focused
void grab_all_keys(xcb_connection_t *conn)
Grab the bound keys (tell X to send us keypress events for those keycodes)
struct Config::config_client client
int default_orientation
Default orientation for new containers.
char * active_workspace_text
struct Colortriple unfocused
char * focused_workspace_text
border_style_t default_border
The default border style for new windows.
#define TAILQ_FOREACH(var, head, field)
char * inactive_workspace_bg
#define TAILQ_FIRST(head)
char * urgent_workspace_bg
void set_font(i3Font *font)
Defines the font to be used for the forthcoming calls.
int default_floating_border_width
char * urgent_workspace_text
char * binding_mode_border
#define TAILQ_REMOVE(head, elm, field)
char * current_configpath
char * inactive_workspace_text
enum Font::@23 type
The type of font.
struct all_cons_head all_cons
void load_configuration(xcb_connection_t *conn, const char *override_configpath, bool reload)
Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
void update_barconfig()
Sends the current bar configuration as an event to all barconfig_update listeners.
void binding_free(Binding *bind)
Frees the binding.
void * scalloc(size_t num, size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
struct Colortriple focused
char * id
Automatically generated ID for this bar config.
char * focused_background
enum Assignment::@18 type
type of this assignment:
#define SLIST_INSERT_HEAD(head, elm, field)
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
char * font
Font specification for all text rendered on the bar.
void free_font(void)
Frees the resources taken by the current font.
bool show_marks
Specifies whether or not marks should be displayed in the window decoration.
float workspace_urgency_timer
By default, urgency is cleared immediately when switching to another workspace leads to focusing the ...
bool parse_file(const char *f, bool use_nagbar)
Parses the given file by first replacing the variables, then calling parse_config and launching i3-na...
char ** outputs
Outputs on which this bar should show up on.
void translate_keysyms(void)
Translates keysymbols to keycodes for all bindings which use keysyms.
char * fake_outputs
Overwrites output detection (for testing), see src/fake_outputs.c.
char * restart_state_path
The configuration file can contain multiple sets of bindings.
char * inactive_workspace_border
void regrab_all_buttons(xcb_connection_t *conn)
Release the button grabs on all managed windows and regrab them, reevaluating which buttons need to b...
#define SLIST_FIRST(head)
border_style_t default_floating_border
The default border style for new floating windows.
bool parse_configuration(const char *override_configpath, bool use_nagbar)
Finds the configuration file to use (either the one specified by override_configpath), the user’s one or the system default) and calls parse_file().
char * active_workspace_border
char * socket_path
Path to the i3 IPC socket.
char * status_command
Command that should be run to get a statusline, for example 'i3status'.
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
void ungrab_all_keys(xcb_connection_t *conn)
Ungrabs all keys, to be called before re-grabbing the keys because of a mapping_notify event or a con...
struct Barconfig::bar_colors colors
Match match
the criteria to check if a window matches