16#include <xkbcommon/xkbcommon.h>
30 DLOG(
"Ungrabbing all keys\n");
31 xcb_ungrab_key(
conn, XCB_GRAB_ANY,
root, XCB_BUTTON_MASK_ANY);
103 TAILQ_REMOVE(&(barconfig->tray_outputs), tray_output, tray_outputs);
189#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \
191 x.border = draw_util_hex_to_color(cborder); \
192 x.background = draw_util_hex_to_color(cbackground); \
193 x.text = draw_util_hex_to_color(ctext); \
194 x.indicator = draw_util_hex_to_color(cindicator); \
195 x.child_border = draw_util_hex_to_color(cbackground); \
241 die(
"Unable to find the configuration file (looked at "
242 "$XDG_CONFIG_HOME/i3/config, ~/.i3/config, $XDG_CONFIG_DIRS/i3/config "
243 "and " SYSCONFDIR
"/i3/config)");
256 char resolved_path[PATH_MAX] = {
'\0'};
265 LOG(
"Parsing configfile %s\n", resolved_path);
276 die(
"Could not open configuration file: %s\n", strerror(errno));
283 ELOG(
"You did not specify required configuration option \"font\"\n");
292 if (current->
font != NULL) {
void binding_free(Binding *bind)
Frees the binding.
void grab_all_keys(xcb_connection_t *conn)
Grab the bound keys (tell X to send us keypress events for those keycodes)
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...
void switch_mode(const char *new_mode)
Switches the key bindings to the given mode, if the mode exists.
void reorder_bindings(void)
Reorders bindings by event_state_mask descendingly so that get_binding() correctly matches more speci...
void translate_keysyms(void)
Translates keysymbols to keycodes for all bindings which use keysyms.
static void free_configuration(void)
struct includedfiles_head included_files
bool load_configuration(const char *override_configpath, config_load_t load_type)
(Re-)loads the configuration file (sets useful defaults before).
struct barconfig_head barconfigs
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator)
char * current_configpath
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...
parse_file_result_t parse_file(struct parser_ctx *ctx, const char *f, IncludedFile *included_file)
Parses the given file by first replacing the variables, then calling parse_config and launching i3-na...
void free_variables(struct parser_ctx *ctx)
Releases the memory of all variables in ctx.
void gaps_reapply_workspace_assignments(void)
Re-applies all workspace gap assignments to existing workspaces after reloading the configuration fil...
void match_free(Match *match)
Frees the given match.
struct all_cons_head all_cons
void tree_render(void)
Renders the tree, that is rendering all outputs using render_con() and pushing the changes to X11 usi...
void extract_workspace_names_from_bindings(void)
Extracts workspace names from keybindings (e.g.
static xcb_cursor_context_t * ctx
xcb_connection_t * conn
XCB connection and root screen.
const char * current_binding_mode
struct assignments_head assignments
struct ws_assignments_head ws_assignments
struct bindings_head * bindings
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
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...
color_t draw_util_hex_to_color(const char *color)
Parses the given color in hex format to an internal color representation.
char * get_config_path(const char *override_configpath, bool use_system_paths)
Get the path of the first configuration file found.
void set_font(i3Font *font)
Defines the font to be used for the forthcoming calls.
i3Font load_font(const char *pattern, const bool fallback)
Loads a font for usage, also getting its height.
void free_font(void)
Frees the resources taken by the current font.
#define TAILQ_FOREACH(var, head, field)
#define SLIST_INSERT_HEAD(head, elm, field)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define SLIST_EMPTY(head)
#define TAILQ_FIRST(head)
#define SLIST_FIRST(head)
#define SLIST_REMOVE(head, elm, type, field)
#define TAILQ_REMOVE(head, elm, field)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
List entry struct for an included file.
char * variable_replaced_contents
The configuration file can contain multiple sets of bindings.
struct bindings_head * bindings
Holds part of the configuration (the part which is not already in dedicated structures in include/dat...
focus_wrapping_t focus_wrapping
When focus wrapping is enabled (the default), attempting to move focus past the edge of the screen (i...
char * restart_state_path
tiling_drag_t tiling_drag
uint32_t swap_modifier
The modifier which needs to be pressed in combination with the floating modifier and your mouse butto...
struct Config::config_client client
char * fake_outputs
Overwrites output detection (for testing), see src/fake_outputs.c.
int default_floating_border_width
int default_orientation
Default orientation for new containers.
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 ...
struct Config::config_bar bar
border_style_t default_border
The default border style for new windows.
border_style_t default_floating_border
The default border style for new floating windows.
struct Colortriple focused
struct Colortriple placeholder
struct Colortriple unfocused
bool got_focused_tab_title
struct Colortriple urgent
struct Colortriple focused_inactive
struct Colortriple focused
struct Colortriple unfocused
struct Colortriple urgent
Holds the status bar configuration (i3bar).
struct Barconfig::bar_colors colors
char * i3bar_command
Command that should be run to execute i3bar, give a full path if i3bar is not in your $PATH.
int num_outputs
Number of outputs in the outputs array.
char * font
Font specification for all text rendered on the bar.
char * id
Automatically generated ID for this bar config.
char * workspace_command
Command that should be run to get the workspace buttons.
char * status_command
Command that should be run to get a statusline, for example 'i3status'.
char ** outputs
Outputs on which this bar should show up on.
char * socket_path
Path to the i3 IPC socket.
char * focused_workspace_bg
char * binding_mode_border
char * active_workspace_bg
char * inactive_workspace_text
char * focused_workspace_text
char * urgent_workspace_text
char * active_workspace_text
char * focused_background
char * urgent_workspace_bg
char * urgent_workspace_border
char * focused_statusline
char * active_workspace_border
char * focused_workspace_border
char * inactive_workspace_bg
char * inactive_workspace_border
Defines a mouse command to be executed instead of the default behavior when clicking on the non-statu...
char * command
The command which is to be executed for this button.
Stores which workspace (by name or number) goes to which output and its gaps config.
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
Assignment ** ran_assignments
uint32_t nr_assignments
Pointers to the Assignments which were already ran for this Window (assignments run only once)
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Match match
the criteria to check if a window matches
union Assignment::@17 dest
destination workspace/command/output, depending on the type
enum Assignment::@16 type
type of this assignment:
A 'Con' represents everything from the X11 root window down to a single X11 window.
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
char * pattern
The pattern/name used to load the font.
enum Font::@21 type
The type of font.