exectype = 'exec_always', 'exec' -> EXEC
colorclass = 'client.background'
-> COLOR_SINGLE
- colorclass = 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent'
+ colorclass = 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent', 'client.placeholder'
-> COLOR_BORDER
# We ignore comments and 'set' lines (variables).
state BINDING:
release = '--release'
->
+ whole_window = '--whole-window'
+ ->
modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch', '$mod'
->
'+'
state BINDCOMMAND:
release = '--release'
->
+ whole_window = '--whole-window'
+ ->
command = string
- -> call cfg_binding($bindtype, $modifiers, $key, $release, $command)
+ -> call cfg_binding($bindtype, $modifiers, $key, $release, $whole_window, $command)
################################################################################
# Mode configuration
state MODE_BINDCOMMAND:
release = '--release'
->
+ whole_window = '--whole-window'
+ ->
command = string
- -> call cfg_mode_binding($bindtype, $modifiers, $key, $release, $command); MODE
+ -> call cfg_mode_binding($bindtype, $modifiers, $key, $release, $whole_window, $command); MODE
################################################################################
# Bar configuration (i3bar)
'hidden_state' -> BAR_HIDDEN_STATE
'id' -> BAR_ID
'modifier' -> BAR_MODIFIER
+ 'wheel_up_cmd' -> BAR_WHEEL_UP_CMD
+ 'wheel_down_cmd' -> BAR_WHEEL_DOWN_CMD
'position' -> BAR_POSITION
'output' -> BAR_OUTPUT
'tray_output' -> BAR_TRAY_OUTPUT
modifier = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Control', 'Ctrl', 'Shift'
-> call cfg_bar_modifier($modifier); BAR
+state BAR_WHEEL_UP_CMD:
+ command = string
+ -> call cfg_bar_wheel_up_cmd($command); BAR
+
+state BAR_WHEEL_DOWN_CMD:
+ command = string
+ -> call cfg_bar_wheel_down_cmd($command); BAR
+
state BAR_POSITION:
position = 'top', 'bottom'
-> call cfg_bar_position($position); BAR
-> call cfg_bar_output($output); BAR
state BAR_TRAY_OUTPUT:
- output = string
+ output = word
-> call cfg_bar_tray_output($output); BAR
state BAR_FONT:
font_pattern = sstrdup(font);
}
-CFGFUN(binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) {
- configure_binding(bindtype, modifiers, key, release, command, DEFAULT_BINDING_MODE);
+CFGFUN(binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *whole_window, const char *command) {
+ configure_binding(bindtype, modifiers, key, release, whole_window, command, DEFAULT_BINDING_MODE);
}
/*******************************************************************************
static char *current_mode;
-CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) {
- configure_binding(bindtype, modifiers, key, release, command, current_mode);
+CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *whole_window, const char *command) {
+ configure_binding(bindtype, modifiers, key, release, whole_window, command, current_mode);
}
CFGFUN(enter_mode, const char *modename) {
}
if (strcmp(windowtype, "new_window") == 0) {
- DLOG("default tiled border style = %d and border width = %d\n", border_style, border_width);
+ DLOG("default tiled border style = %d and border width = %d (%d physical px)\n",
+ border_style, border_width, logical_px(border_width));
config.default_border = border_style;
- config.default_border_width = border_width;
+ config.default_border_width = logical_px(border_width);
} else {
- DLOG("default floating border style = %d and border width = %d\n", border_style, border_width);
+ DLOG("default floating border style = %d and border width = %d (%d physical px)\n",
+ border_style, border_width, logical_px(border_width));
config.default_floating_border = border_style;
- config.default_floating_border_width = border_width;
+ config.default_floating_border_width = logical_px(border_width);
}
}
* outputs */
struct Workspace_Assignment *assignment;
bool duplicate = false;
- TAILQ_FOREACH (assignment, &ws_assignments, ws_assignments) {
+ TAILQ_FOREACH(assignment, &ws_assignments, ws_assignments) {
if (strcasecmp(assignment->name, workspace) == 0) {
ELOG("You have a duplicate workspace assignment for workspace \"%s\"\n",
workspace);
APPLY_COLORS(focused);
APPLY_COLORS(unfocused);
APPLY_COLORS(urgent);
+ APPLY_COLORS(placeholder);
#undef APPLY_COLORS
}
current_bar.modifier = M_SHIFT;
}
+CFGFUN(bar_wheel_up_cmd, const char *command) {
+ FREE(current_bar.wheel_up_cmd);
+ current_bar.wheel_up_cmd = sstrdup(command);
+}
+
+CFGFUN(bar_wheel_down_cmd, const char *command) {
+ FREE(current_bar.wheel_down_cmd);
+ current_bar.wheel_down_cmd = sstrdup(command);
+}
+
CFGFUN(bar_position, const char *position) {
current_bar.position = (strcmp(position, "top") == 0 ? P_TOP : P_BOTTOM);
}
my $expected = <<'EOT';
cfg_enter_mode(meh)
-cfg_mode_binding(bindsym, Mod1,Shift, x, (null), resize grow)
-cfg_mode_binding(bindcode, Mod1, 44, (null), resize shrink)
-cfg_mode_binding(bindsym, Mod1, x, --release, exec foo)
+cfg_mode_binding(bindsym, Mod1,Shift, x, (null), (null), resize grow)
+cfg_mode_binding(bindcode, Mod1, 44, (null), (null), resize shrink)
+cfg_mode_binding(bindsym, Mod1, x, --release, (null), exec foo)
EOT
is(parser_calls($config),
client.focused_inactive #333333 #5f676a #ffffff #484e50
client.unfocused #333333 #222222 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
+ client.placeholder #000000 #0c0c0c #ffffff #000000
EOT
$expected = <<'EOT';
cfg_color(client.focused_inactive, #333333, #5f676a, #ffffff, #484e50)
cfg_color(client.unfocused, #333333, #222222, #888888, #292d2e)
cfg_color(client.urgent, #2f343a, #900000, #ffffff, #900000)
+ cfg_color(client.placeholder, #000000, #0c0c0c, #ffffff, #000000)
EOT
is(parser_calls($config),
EOT
my $expected_all_tokens = <<'EOT';
- ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', 'bar', 'font', 'mode', 'floating_minimum_size', 'floating_maximum_size', 'floating_modifier', 'default_orientation', 'workspace_layout', 'new_window', 'new_float', 'hide_edge_borders', 'for_window', 'assign', 'focus_follows_mouse', 'mouse_warping', 'force_focus_wrapping', 'force_xinerama', 'force-xinerama', 'workspace_auto_back_and_forth', 'fake_outputs', 'fake-outputs', 'force_display_urgency_hint', 'workspace', 'ipc_socket', 'ipc-socket', 'restart_state', 'popup_during_fullscreen', 'exec_always', 'exec', 'client.background', 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent'
+ ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', 'bar', 'font', 'mode', 'floating_minimum_size', 'floating_maximum_size', 'floating_modifier', 'default_orientation', 'workspace_layout', 'new_window', 'new_float', 'hide_edge_borders', 'for_window', 'assign', 'focus_follows_mouse', 'mouse_warping', 'force_focus_wrapping', 'force_xinerama', 'force-xinerama', 'workspace_auto_back_and_forth', 'fake_outputs', 'fake-outputs', 'force_display_urgency_hint', 'workspace', 'ipc_socket', 'ipc-socket', 'restart_state', 'popup_during_fullscreen', 'exec_always', 'exec', 'client.background', 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent', 'client.placeholder'
EOT
my $expected_end = <<'EOT';
$expected = <<'EOT';
cfg_enter_mode(yo)
-cfg_mode_binding(bindsym, (null), x, (null), resize shrink left)
+cfg_mode_binding(bindsym, (null), x, (null), (null), resize shrink left)
ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', '}'
ERROR: CONFIG: (in file <stdin>)
ERROR: CONFIG: Line 1: mode "yo" {
$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', 'position', 'output', 'tray_output', 'font', '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', 'position', 'output', 'tray_output', 'font', '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