CFGFUN(bar_modifier, const char *modifier);
CFGFUN(bar_wheel_up_cmd, const char *command);
CFGFUN(bar_wheel_down_cmd, const char *command);
+CFGFUN(bar_bindsym, const char *button, 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_binding_mode_indicator, const char *value);
CFGFUN(bar_workspace_buttons, const char *value);
CFGFUN(bar_strip_workspace_numbers, const char *value);
+CFGFUN(bar_start);
CFGFUN(bar_finish);
end
->
'{'
- -> BAR
+ -> call cfg_bar_start(); BAR
state BAR:
end ->
'modifier' -> BAR_MODIFIER
'wheel_up_cmd' -> BAR_WHEEL_UP_CMD
'wheel_down_cmd' -> BAR_WHEEL_DOWN_CMD
+ 'bindsym' -> BAR_BINDSYM
'position' -> BAR_POSITION
'output' -> BAR_OUTPUT
'tray_output' -> BAR_TRAY_OUTPUT
command = string
-> call cfg_bar_wheel_down_cmd($command); BAR
+state BAR_BINDSYM:
+ button = word
+ -> BAR_BINDSYM_COMMAND
+
+state BAR_BINDSYM_COMMAND:
+ command = string
+ -> call cfg_bar_bindsym($button, $command); BAR
+
state BAR_POSITION:
position = 'top', 'bottom'
-> call cfg_bar_position($position); BAR
current_bar.modifier = M_SHIFT;
}
+static void bar_configure_mouse_command(const char *button, const char *command) {
+}
+
CFGFUN(bar_wheel_up_cmd, const char *command) {
- FREE(current_bar.wheel_up_cmd);
- current_bar.wheel_up_cmd = sstrdup(command);
+ ELOG("'wheel_up_cmd' is deprecated. Please us 'bindsym button4 %s' instead.\n", command);
+ bar_configure_mouse_command("button4", command);
}
CFGFUN(bar_wheel_down_cmd, const char *command) {
- FREE(current_bar.wheel_down_cmd);
- current_bar.wheel_down_cmd = sstrdup(command);
+ ELOG("'wheel_down_cmd' is deprecated. Please us 'bindsym button5 %s' instead.\n", command);
+ bar_configure_mouse_command("button5", command);
+}
+
+CFGFUN(bar_bindsym, const char *button, const char *command) {
+ bar_configure_mouse_command(button, command);
}
CFGFUN(bar_position, const char *position) {
current_bar.strip_workspace_numbers = eval_boolstr(value);
}
+CFGFUN(bar_start) {
+ TAILQ_INIT(&(current_bar.mouse_commands));
+}
+
CFGFUN(bar_finish) {
DLOG("\t new bar configuration finished, saving.\n");
/* Generate a unique ID for this bar if not already configured */
$expected = <<'EOT';
cfg_bar_output(LVDS-1)
-ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'i3bar_command', 'status_command', 'socket_path', 'mode', 'hidden_state', 'id', 'modifier', 'wheel_up_cmd', 'wheel_down_cmd', 'position', 'output', 'tray_output', 'font', 'separator_symbol', 'binding_mode_indicator', 'workspace_buttons', 'strip_workspace_numbers', 'verbose', 'colors', '}'
+ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'i3bar_command', 'status_command', 'socket_path', 'mode', 'hidden_state', 'id', 'modifier', 'wheel_up_cmd', 'wheel_down_cmd', 'bindsym', 'position', 'output', 'tray_output', 'font', 'separator_symbol', 'binding_mode_indicator', 'workspace_buttons', 'strip_workspace_numbers', 'verbose', 'colors', '}'
ERROR: CONFIG: (in file <stdin>)
ERROR: CONFIG: Line 1: bar {
ERROR: CONFIG: Line 2: output LVDS-1