i3
Macros | Functions
config_directives.h File Reference
#include <config.h>
#include "config_parser.h"
Include dependency graph for config_directives.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define I3_CFG   Match *current_match, struct ConfigResultIR *result
 The beginning of the prototype for every cfg_ function. More...
 
#define CFGFUN(name, ...)    void cfg_##name(I3_CFG, ##__VA_ARGS__)
 

Functions

i3_event_state_mask_t event_state_from_str (const char *str)
 A utility function to convert a string containing the group and modifiers to the corresponding bit mask. More...
 
 CFGFUN (criteria_init, int _state)
 
 CFGFUN (criteria_add, const char *ctype, const char *cvalue)
 
 CFGFUN (criteria_pop_state)
 
 CFGFUN (include, const char *pattern)
 
 CFGFUN (font, const char *font)
 
 CFGFUN (exec, const char *exectype, const char *no_startup_id, const char *command)
 
 CFGFUN (for_window, const char *command)
 
 CFGFUN (floating_minimum_size, const long width, const long height)
 
 CFGFUN (floating_maximum_size, const long width, const long height)
 
 CFGFUN (default_orientation, const char *orientation)
 
 CFGFUN (workspace_layout, const char *layout)
 
 CFGFUN (workspace_back_and_forth, const char *value)
 
 CFGFUN (focus_follows_mouse, const char *value)
 
 CFGFUN (mouse_warping, const char *value)
 
 CFGFUN (focus_wrapping, const char *value)
 
 CFGFUN (force_focus_wrapping, const char *value)
 
 CFGFUN (force_xinerama, const char *value)
 
 CFGFUN (disable_randr15, const char *value)
 
 CFGFUN (fake_outputs, const char *outputs)
 
 CFGFUN (force_display_urgency_hint, const long duration_ms)
 
 CFGFUN (focus_on_window_activation, const char *mode)
 
 CFGFUN (title_align, const char *alignment)
 
 CFGFUN (show_marks, const char *value)
 
 CFGFUN (hide_edge_borders, const char *borders)
 
 CFGFUN (assign_output, const char *output)
 
 CFGFUN (assign, const char *workspace, bool is_number)
 
 CFGFUN (no_focus)
 
 CFGFUN (ipc_socket, const char *path)
 
 CFGFUN (ipc_kill_timeout, const long timeout_ms)
 
 CFGFUN (restart_state, const char *path)
 
 CFGFUN (popup_during_fullscreen, const char *value)
 
 CFGFUN (color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator, const char *child_border)
 
 CFGFUN (color_single, const char *colorclass, const char *color)
 
 CFGFUN (floating_modifier, const char *modifiers)
 
 CFGFUN (default_border, const char *windowtype, const char *border, const long width)
 
 CFGFUN (workspace, const char *workspace, const char *output)
 
 CFGFUN (binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *border, const char *whole_window, const char *exclude_titlebar, const char *command)
 
 CFGFUN (enter_mode, const char *pango_markup, const char *mode)
 
 CFGFUN (mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *border, const char *whole_window, const char *exclude_titlebar, const char *command)
 
 CFGFUN (bar_font, const char *font)
 
 CFGFUN (bar_separator_symbol, const char *separator)
 
 CFGFUN (bar_mode, const char *mode)
 
 CFGFUN (bar_hidden_state, const char *hidden_state)
 
 CFGFUN (bar_id, const char *bar_id)
 
 CFGFUN (bar_output, const char *output)
 
 CFGFUN (bar_verbose, const char *verbose)
 
 CFGFUN (bar_modifier, const char *modifiers)
 
 CFGFUN (bar_wheel_up_cmd, const char *command)
 
 CFGFUN (bar_wheel_down_cmd, const char *command)
 
 CFGFUN (bar_bindsym, const char *button, const char *release, const char *command)
 
 CFGFUN (bar_position, const char *position)
 
 CFGFUN (bar_i3bar_command, const char *i3bar_command)
 
 CFGFUN (bar_color, const char *colorclass, const char *border, const char *background, const char *text)
 
 CFGFUN (bar_socket_path, const char *socket_path)
 
 CFGFUN (bar_tray_output, const char *output)
 
 CFGFUN (bar_tray_padding, const long spacing_px)
 
 CFGFUN (bar_color_single, const char *colorclass, const char *color)
 
 CFGFUN (bar_status_command, const char *command)
 
 CFGFUN (bar_binding_mode_indicator, const char *value)
 
 CFGFUN (bar_workspace_buttons, const char *value)
 
 CFGFUN (bar_workspace_min_width, const long width)
 
 CFGFUN (bar_strip_workspace_numbers, const char *value)
 
 CFGFUN (bar_strip_workspace_name, const char *value)
 
 CFGFUN (bar_start)
 
 CFGFUN (bar_finish)
 

Macro Definition Documentation

◆ CFGFUN

#define CFGFUN (   name,
  ... 
)     void cfg_##name(I3_CFG, ##__VA_ARGS__)

Definition at line 28 of file config_directives.h.

◆ I3_CFG

#define I3_CFG   Match *current_match, struct ConfigResultIR *result

The beginning of the prototype for every cfg_ function.

Definition at line 23 of file config_directives.h.

Function Documentation

◆ CFGFUN() [1/65]

CFGFUN ( assign  ,
const char *  workspace,
bool  is_number 
)

◆ CFGFUN() [2/65]

CFGFUN ( assign_output  ,
const char *  output 
)

◆ CFGFUN() [3/65]

CFGFUN ( bar_binding_mode_indicator  ,
const char *  value 
)

Definition at line 711 of file config_directives.c.

References boolstr(), current_bar, and Barconfig::hide_binding_mode_indicator.

Here is the call graph for this function:

◆ CFGFUN() [4/65]

CFGFUN ( bar_bindsym  ,
const char *  button,
const char *  release,
const char *  command 
)

Definition at line 637 of file config_directives.c.

References bar_configure_binding(), Barbinding::command, and Barbinding::release.

Here is the call graph for this function:

◆ CFGFUN() [5/65]

CFGFUN ( bar_color  ,
const char *  colorclass,
const char *  border,
const char *  background,
const char *  text 
)

Definition at line 650 of file config_directives.c.

References APPLY_COLORS.

◆ CFGFUN() [6/65]

CFGFUN ( bar_color_single  ,
const char *  colorclass,
const char *  color 
)

◆ CFGFUN() [7/65]

CFGFUN ( bar_finish  )

Definition at line 739 of file config_directives.c.

References barconfigs, config, current_bar, DLOG, Barconfig::font, font_pattern, Barconfig::id, Config::number_barconfigs, sasprintf(), sstrdup(), and TAILQ_INSERT_TAIL.

Here is the call graph for this function:

◆ CFGFUN() [8/65]

CFGFUN ( bar_font  ,
const char *  font 
)

Definition at line 562 of file config_directives.c.

References current_bar, Barconfig::font, FREE, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [9/65]

CFGFUN ( bar_hidden_state  ,
const char *  hidden_state 
)

Definition at line 576 of file config_directives.c.

References current_bar, and Barconfig::hidden_state.

◆ CFGFUN() [10/65]

CFGFUN ( bar_i3bar_command  ,
const char *  i3bar_command 
)

Definition at line 645 of file config_directives.c.

References current_bar, FREE, Barconfig::i3bar_command, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [11/65]

CFGFUN ( bar_id  ,
const char *  bar_id 
)

Definition at line 580 of file config_directives.c.

References current_bar, Barconfig::id, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [12/65]

CFGFUN ( bar_mode  ,
const char *  mode 
)

Definition at line 572 of file config_directives.c.

References current_bar, and Barconfig::mode.

◆ CFGFUN() [13/65]

CFGFUN ( bar_modifier  ,
const char *  modifiers 
)

Definition at line 595 of file config_directives.c.

References current_bar, event_state_from_str(), and Barconfig::modifier.

Here is the call graph for this function:

◆ CFGFUN() [14/65]

CFGFUN ( bar_output  ,
const char *  output 
)

Definition at line 584 of file config_directives.c.

References current_bar, Barconfig::num_outputs, Workspace_Assignment::output, Barconfig::outputs, srealloc(), and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [15/65]

CFGFUN ( bar_position  ,
const char *  position 
)

Definition at line 641 of file config_directives.c.

References current_bar, and Barconfig::position.

◆ CFGFUN() [16/65]

CFGFUN ( bar_separator_symbol  ,
const char *  separator 
)

Definition at line 567 of file config_directives.c.

References current_bar, FREE, Barconfig::separator_symbol, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [17/65]

CFGFUN ( bar_socket_path  ,
const char *  socket_path 
)

Definition at line 676 of file config_directives.c.

References current_bar, FREE, Barconfig::socket_path, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [18/65]

CFGFUN ( bar_start  )

Definition at line 731 of file config_directives.c.

References current_bar, Barconfig::modifier, scalloc(), TAILQ_INIT, and Barconfig::tray_padding.

Here is the call graph for this function:

◆ CFGFUN() [19/65]

CFGFUN ( bar_status_command  ,
const char *  command 
)

Definition at line 706 of file config_directives.c.

References current_bar, FREE, sstrdup(), and Barconfig::status_command.

Here is the call graph for this function:

◆ CFGFUN() [20/65]

CFGFUN ( bar_strip_workspace_name  ,
const char *  value 
)

Definition at line 727 of file config_directives.c.

References boolstr(), current_bar, and Barconfig::strip_workspace_name.

Here is the call graph for this function:

◆ CFGFUN() [21/65]

CFGFUN ( bar_strip_workspace_numbers  ,
const char *  value 
)

Definition at line 723 of file config_directives.c.

References boolstr(), current_bar, and Barconfig::strip_workspace_numbers.

Here is the call graph for this function:

◆ CFGFUN() [22/65]

CFGFUN ( bar_tray_output  ,
const char *  output 
)

Definition at line 681 of file config_directives.c.

References current_bar, tray_output_t::output, scalloc(), sstrdup(), and TAILQ_INSERT_TAIL.

Here is the call graph for this function:

◆ CFGFUN() [23/65]

CFGFUN ( bar_tray_padding  ,
const long  spacing_px 
)

Definition at line 687 of file config_directives.c.

References current_bar, and Barconfig::tray_padding.

◆ CFGFUN() [24/65]

CFGFUN ( bar_verbose  ,
const char *  verbose 
)

Definition at line 591 of file config_directives.c.

References boolstr(), current_bar, Barconfig::verbose, and verbose.

Here is the call graph for this function:

◆ CFGFUN() [25/65]

CFGFUN ( bar_wheel_down_cmd  ,
const char *  command 
)

Definition at line 632 of file config_directives.c.

References bar_configure_binding(), Barbinding::command, and ELOG.

Here is the call graph for this function:

◆ CFGFUN() [26/65]

CFGFUN ( bar_wheel_up_cmd  ,
const char *  command 
)

Definition at line 627 of file config_directives.c.

References bar_configure_binding(), Barbinding::command, and ELOG.

Here is the call graph for this function:

◆ CFGFUN() [27/65]

CFGFUN ( bar_workspace_buttons  ,
const char *  value 
)

Definition at line 715 of file config_directives.c.

References boolstr(), current_bar, and Barconfig::hide_workspace_buttons.

Here is the call graph for this function:

◆ CFGFUN() [28/65]

CFGFUN ( bar_workspace_min_width  ,
const long  width 
)

Definition at line 719 of file config_directives.c.

References current_bar, and Barconfig::workspace_min_width.

◆ CFGFUN() [29/65]

CFGFUN ( binding  ,
const char *  bindtype,
const char *  modifiers,
const char *  key,
const char *  release,
const char *  border,
const char *  whole_window,
const char *  exclude_titlebar,
const char *  command 
)

Definition at line 177 of file config_directives.c.

References configure_binding(), and DEFAULT_BINDING_MODE.

Here is the call graph for this function:

◆ CFGFUN() [30/65]

CFGFUN ( color  ,
const char *  colorclass,
const char *  border,
const char *  background,
const char *  text,
const char *  indicator,
const char *  child_border 
)

Definition at line 469 of file config_directives.c.

References APPLY_COLORS, and focused.

◆ CFGFUN() [31/65]

CFGFUN ( color_single  ,
const char *  colorclass,
const char *  color 
)

Definition at line 464 of file config_directives.c.

References Config::config_client::background, Config::client, config, and draw_util_hex_to_color().

Here is the call graph for this function:

◆ CFGFUN() [32/65]

CFGFUN ( criteria_add  ,
const char *  ctype,
const char *  cvalue 
)

Definition at line 120 of file config_directives.c.

References current_match, and match_parse_property().

Here is the call graph for this function:

◆ CFGFUN() [33/65]

CFGFUN ( criteria_init  ,
int  _state 
)

Definition at line 103 of file config_directives.c.

References criteria_next_state, current_match, DLOG, match_free(), and match_init().

Here is the call graph for this function:

◆ CFGFUN() [34/65]

CFGFUN ( criteria_pop_state  )

Definition at line 111 of file config_directives.c.

References criteria_next_state.

◆ CFGFUN() [35/65]

CFGFUN ( default_border  ,
const char *  windowtype,
const char *  border,
const long  width 
)

◆ CFGFUN() [36/65]

CFGFUN ( default_orientation  ,
const char *  orientation 
)

Definition at line 249 of file config_directives.c.

References config, Config::default_orientation, HORIZ, NO_ORIENTATION, and VERT.

◆ CFGFUN() [37/65]

CFGFUN ( disable_randr15  ,
const char *  value 
)

Definition at line 332 of file config_directives.c.

References boolstr(), config, and Config::disable_randr15.

Here is the call graph for this function:

◆ CFGFUN() [38/65]

CFGFUN ( enter_mode  ,
const char *  pango_markup,
const char *  mode 
)

Definition at line 192 of file config_directives.c.

References current_mode, current_mode_pango_markup, DEFAULT_BINDING_MODE, DLOG, ELOG, FREE, modes, Mode::name, Mode::pango_markup, SLIST_FOREACH, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [39/65]

CFGFUN ( exec  ,
const char *  exectype,
const char *  no_startup_id,
const char *  command 
)

Definition at line 211 of file config_directives.c.

References autostarts, autostarts_always, Autostart::command, Autostart::no_startup_id, smalloc(), sstrdup(), and TAILQ_INSERT_TAIL.

Here is the call graph for this function:

◆ CFGFUN() [40/65]

CFGFUN ( fake_outputs  ,
const char *  outputs 
)

Definition at line 365 of file config_directives.c.

References config, Config::fake_outputs, outputs, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [41/65]

CFGFUN ( floating_maximum_size  ,
const long  width,
const long  height 
)

◆ CFGFUN() [42/65]

CFGFUN ( floating_minimum_size  ,
const long  width,
const long  height 
)

◆ CFGFUN() [43/65]

CFGFUN ( floating_modifier  ,
const char *  modifiers 
)

Definition at line 245 of file config_directives.c.

References config, event_state_from_str(), and Config::floating_modifier.

Here is the call graph for this function:

◆ CFGFUN() [44/65]

CFGFUN ( focus_follows_mouse  ,
const char *  value 
)

Definition at line 317 of file config_directives.c.

References boolstr(), config, and Config::disable_focus_follows_mouse.

Here is the call graph for this function:

◆ CFGFUN() [45/65]

CFGFUN ( focus_on_window_activation  ,
const char *  mode 
)

Definition at line 374 of file config_directives.c.

References config, DLOG, ELOG, and Config::focus_on_window_activation.

◆ CFGFUN() [46/65]

CFGFUN ( focus_wrapping  ,
const char *  value 
)

Definition at line 336 of file config_directives.c.

References boolstr(), config, Config::focus_wrapping, FOCUS_WRAPPING_FORCE, FOCUS_WRAPPING_OFF, FOCUS_WRAPPING_ON, and FOCUS_WRAPPING_WORKSPACE.

Here is the call graph for this function:

◆ CFGFUN() [47/65]

CFGFUN ( font  ,
const char *  font 
)

Definition at line 168 of file config_directives.c.

References config, Config::font, font_pattern, FREE, load_font(), set_font(), and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [48/65]

CFGFUN ( for_window  ,
const char *  command 
)

◆ CFGFUN() [49/65]

CFGFUN ( force_display_urgency_hint  ,
const long  duration_ms 
)

Definition at line 370 of file config_directives.c.

References config, and Config::workspace_urgency_timer.

◆ CFGFUN() [50/65]

CFGFUN ( force_focus_wrapping  ,
const char *  value 
)

Definition at line 348 of file config_directives.c.

References boolstr(), config, Config::focus_wrapping, FOCUS_WRAPPING_FORCE, and FOCUS_WRAPPING_ON.

Here is the call graph for this function:

◆ CFGFUN() [51/65]

CFGFUN ( force_xinerama  ,
const char *  value 
)

Definition at line 328 of file config_directives.c.

References boolstr(), config, and Config::force_xinerama.

Here is the call graph for this function:

◆ CFGFUN() [52/65]

CFGFUN ( hide_edge_borders  ,
const char *  borders 
)

Definition at line 300 of file config_directives.c.

References boolstr(), config, HEBM_BOTH, HEBM_HORIZONTAL, HEBM_NONE, HEBM_SMART, HEBM_VERTICAL, and Config::hide_edge_borders.

Here is the call graph for this function:

◆ CFGFUN() [53/65]

CFGFUN ( include  ,
const char *  pattern 
)

◆ CFGFUN() [54/65]

CFGFUN ( ipc_kill_timeout  ,
const long  timeout_ms 
)

Definition at line 552 of file config_directives.c.

References ipc_set_kill_timeout().

Here is the call graph for this function:

◆ CFGFUN() [55/65]

CFGFUN ( ipc_socket  ,
const char *  path 
)

Definition at line 444 of file config_directives.c.

References config, Config::ipc_socket_path, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [56/65]

CFGFUN ( mode_binding  ,
const char *  bindtype,
const char *  modifiers,
const char *  key,
const char *  release,
const char *  border,
const char *  whole_window,
const char *  exclude_titlebar,
const char *  command 
)

Definition at line 188 of file config_directives.c.

References configure_binding(), current_mode, and current_mode_pango_markup.

Here is the call graph for this function:

◆ CFGFUN() [57/65]

CFGFUN ( mouse_warping  ,
const char *  value 
)

◆ CFGFUN() [58/65]

CFGFUN ( no_focus  )

Definition at line 539 of file config_directives.c.

References assignments, current_match, DLOG, ELOG, Assignment::match, match_copy(), match_is_empty(), scalloc(), TAILQ_INSERT_TAIL, and Assignment::type.

Here is the call graph for this function:

◆ CFGFUN() [59/65]

CFGFUN ( popup_during_fullscreen  ,
const char *  value 
)

Definition at line 454 of file config_directives.c.

References config, and Config::popup_during_fullscreen.

◆ CFGFUN() [60/65]

CFGFUN ( restart_state  ,
const char *  path 
)

Definition at line 449 of file config_directives.c.

References config, Config::restart_state_path, and sstrdup().

Here is the call graph for this function:

◆ CFGFUN() [61/65]

CFGFUN ( show_marks  ,
const char *  value 
)

Definition at line 403 of file config_directives.c.

References boolstr(), config, and Config::show_marks.

Here is the call graph for this function:

◆ CFGFUN() [62/65]

CFGFUN ( title_align  ,
const char *  alignment 
)

Definition at line 391 of file config_directives.c.

References config, and Config::title_align.

◆ CFGFUN() [63/65]

CFGFUN ( workspace  ,
const char *  workspace,
const char *  output 
)

◆ CFGFUN() [64/65]

CFGFUN ( workspace_back_and_forth  ,
const char *  value 
)

Definition at line 361 of file config_directives.c.

References boolstr(), config, and Config::workspace_auto_back_and_forth.

Here is the call graph for this function:

◆ CFGFUN() [65/65]

CFGFUN ( workspace_layout  ,
const char *  layout 
)

Definition at line 258 of file config_directives.c.

References config, Config::default_layout, L_DEFAULT, L_STACKED, and L_TABBED.

◆ event_state_from_str()

i3_event_state_mask_t event_state_from_str ( const char *  str)

A utility function to convert a string containing the group and modifiers to the corresponding bit mask.

Definition at line 132 of file config_directives.c.

References I3_XKB_GROUP_MASK_1, I3_XKB_GROUP_MASK_2, I3_XKB_GROUP_MASK_3, and I3_XKB_GROUP_MASK_4.

Referenced by CFGFUN(), and configure_binding().