i3
configuration.h File Reference
#include "queue.h"
#include "i3.h"
#include "tiling_drag.h"
Include dependency graph for configuration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  context
 Used during the config file lexing/parsing to keep the state of the lexer in order to provide useful error messages in yyerror(). More...
 
struct  Colortriple
 Part of the struct Config. More...
 
struct  Variable
 Holds a user-assigned variable for parsing the configuration file. More...
 
struct  IncludedFile
 List entry struct for an included file. More...
 
struct  Mode
 The configuration file can contain multiple sets of bindings. More...
 
struct  Config
 Holds part of the configuration (the part which is not already in dedicated structures in include/data.h). More...
 
struct  Config::config_client
 
struct  Config::config_bar
 
struct  Barconfig
 Holds the status bar configuration (i3bar). More...
 
struct  Barconfig::bar_colors
 
struct  Barbinding
 Defines a mouse command to be executed instead of the default behavior when clicking on the non-statusline part of i3bar. More...
 
struct  tray_output_t
 

Typedefs

typedef struct IncludedFile IncludedFile
 
typedef struct Config Config
 
typedef struct Barconfig Barconfig
 

Enumerations

enum  config_load_t { C_VALIDATE , C_LOAD , C_RELOAD }
 

Functions

 SLIST_HEAD (modes_head, Mode) modes
 
 TAILQ_HEAD (barconfig_head, Barconfig) barconfigs
 
 TAILQ_HEAD (includedfiles_head, IncludedFile) included_files
 
bool load_configuration (const char *override_configfile, config_load_t load_type)
 (Re-)loads the configuration file (sets useful defaults before).
 
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 configuration file reload.
 

Variables

char * current_configpath
 
char * current_config
 
Config config
 

Typedef Documentation

◆ Barconfig

typedef struct Barconfig Barconfig

Definition at line 21 of file configuration.h.

◆ Config

typedef struct Config Config

Definition at line 20 of file configuration.h.

◆ IncludedFile

typedef struct IncludedFile IncludedFile

Definition at line 19 of file configuration.h.

Enumeration Type Documentation

◆ config_load_t

Enumerator
C_VALIDATE 
C_LOAD 
C_RELOAD 

Definition at line 436 of file configuration.h.

Function Documentation

◆ load_configuration()

bool load_configuration ( const char * override_configfile,
config_load_t load_type )

(Re-)loads the configuration file (sets useful defaults before).

If you specify override_configpath, only this path is used to look for a configuration file.

load_type specifies the type of loading: C_VALIDATE is used to only verify the correctness of the config file (used with the flag -C). C_LOAD will load the config for normal use and display errors in the nagbar. C_RELOAD will also clear the previous config.

Definition at line 169 of file config.c.

References Config::config_client::background, Config::bar, barconfigs, bindings, Mode::bindings, gaps_t::bottom, BS_NORMAL, C_RELOAD, C_VALIDATE, Config::client, config, conn, ctx, current_binding_mode, current_configpath, Config::default_border, Config::default_border_width, Config::default_floating_border, Config::default_floating_border_width, Config::default_orientation, die, draw_util_hex_to_color(), ELOG, extract_workspace_names_from_bindings(), Config::focus_wrapping, FOCUS_WRAPPING_ON, Config::config_bar::focused, Config::config_client::focused, Config::config_client::focused_inactive, Barconfig::font, Config::font, FREE, free_configuration(), free_variables(), Config::gaps, gaps_reapply_workspace_assignments(), get_config_path(), Config::config_client::got_focused_tab_title, grab_all_keys(), included_files, INIT_COLOR, gaps_t::inner, gaps_t::left, load_font(), LOG, logical_px(), modes, Mode::name, NO_ORIENTATION, parse_file(), IncludedFile::path, Font::pattern, Config::config_client::placeholder, IncludedFile::raw_contents, regrab_all_buttons(), reorder_bindings(), gaps_t::right, scalloc(), set_font(), Config::show_marks, SLIST_INIT, SLIST_INSERT_HEAD, sstrdup(), Config::swap_modifier, TAILQ_EMPTY, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, TAILQ_REMOVE, Config::tiling_drag, TILING_DRAG_MODIFIER, gaps_t::top, translate_keysyms(), tree_render(), Font::type, Config::config_bar::unfocused, Config::config_client::unfocused, Config::config_bar::urgent, Config::config_client::urgent, IncludedFile::variable_replaced_contents, and Config::workspace_urgency_timer.

Referenced by cmd_reload(), and main().

Here is the call graph for this function:

◆ SLIST_HEAD()

SLIST_HEAD ( modes_head ,
Mode  )
extern

◆ TAILQ_HEAD() [1/2]

TAILQ_HEAD ( barconfig_head ,
Barconfig  )
extern

◆ TAILQ_HEAD() [2/2]

TAILQ_HEAD ( includedfiles_head ,
IncludedFile  )
extern

◆ ungrab_all_keys()

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 configuration file reload.

Definition at line 29 of file config.c.

References conn, DLOG, and root.

Referenced by free_configuration(), handle_event(), handle_mapping_notify(), and switch_mode().

Variable Documentation

◆ config

◆ current_config

char* current_config
extern

◆ current_configpath

char* current_configpath
extern

Definition at line 18 of file config.c.

Referenced by IPC_HANDLER(), load_configuration(), translate_keysyms(), and x_set_i3_atoms().