bugfix: config-parser: bind is a synonym for bindcode

This commit is contained in:
Michael Stapelberg 2012-10-08 13:40:44 +02:00
parent 040a441101
commit ee36c8507e
2 changed files with 28 additions and 26 deletions

View File

@ -15,32 +15,32 @@ state INITIAL:
# We have an end token here for all the commands which just call some # We have an end token here for all the commands which just call some
# function without using an explicit 'end' token. # function without using an explicit 'end' token.
end -> end ->
'#' -> IGNORE_LINE '#' -> IGNORE_LINE
'set' -> IGNORE_LINE 'set' -> IGNORE_LINE
bindtype = 'bindsym', 'bindcode' -> BINDING bindtype = 'bindsym', 'bindcode', 'bind' -> BINDING
'bar' -> BARBRACE 'bar' -> BARBRACE
'font' -> FONT 'font' -> FONT
'mode' -> MODENAME 'mode' -> MODENAME
'floating_minimum_size' -> FLOATING_MINIMUM_SIZE_WIDTH 'floating_minimum_size' -> FLOATING_MINIMUM_SIZE_WIDTH
'floating_maximum_size' -> FLOATING_MAXIMUM_SIZE_WIDTH 'floating_maximum_size' -> FLOATING_MAXIMUM_SIZE_WIDTH
'floating_modifier' -> FLOATING_MODIFIER 'floating_modifier' -> FLOATING_MODIFIER
'default_orientation' -> DEFAULT_ORIENTATION 'default_orientation' -> DEFAULT_ORIENTATION
'workspace_layout' -> WORKSPACE_LAYOUT 'workspace_layout' -> WORKSPACE_LAYOUT
windowtype = 'new_window', 'new_float' -> NEW_WINDOW windowtype = 'new_window', 'new_float' -> NEW_WINDOW
'hide_edge_borders' -> HIDE_EDGE_BORDERS 'hide_edge_borders' -> HIDE_EDGE_BORDERS
'for_window' -> FOR_WINDOW 'for_window' -> FOR_WINDOW
'assign' -> ASSIGN 'assign' -> ASSIGN
'focus_follows_mouse' -> FOCUS_FOLLOWS_MOUSE 'focus_follows_mouse' -> FOCUS_FOLLOWS_MOUSE
'force_focus_wrapping' -> FORCE_FOCUS_WRAPPING 'force_focus_wrapping' -> FORCE_FOCUS_WRAPPING
'force_xinerama', 'force-xinerama' -> FORCE_XINERAMA 'force_xinerama', 'force-xinerama' -> FORCE_XINERAMA
'workspace_auto_back_and_forth' -> WORKSPACE_BACK_AND_FORTH 'workspace_auto_back_and_forth' -> WORKSPACE_BACK_AND_FORTH
'fake_outputs', 'fake-outputs' -> FAKE_OUTPUTS 'fake_outputs', 'fake-outputs' -> FAKE_OUTPUTS
'force_display_urgency_hint' -> FORCE_DISPLAY_URGENCY_HINT 'force_display_urgency_hint' -> FORCE_DISPLAY_URGENCY_HINT
'workspace' -> WORKSPACE 'workspace' -> WORKSPACE
'ipc_socket', 'ipc-socket' -> IPC_SOCKET 'ipc_socket', 'ipc-socket' -> IPC_SOCKET
'restart_state' -> RESTART_STATE 'restart_state' -> RESTART_STATE
'popup_during_fullscreen' -> POPUP_DURING_FULLSCREEN 'popup_during_fullscreen' -> POPUP_DURING_FULLSCREEN
exectype = 'exec_always', 'exec' -> EXEC exectype = 'exec_always', 'exec' -> EXEC
colorclass = 'client.background' colorclass = 'client.background'
-> COLOR_SINGLE -> COLOR_SINGLE
colorclass = 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent' colorclass = 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent'

View File

@ -179,6 +179,7 @@ CFGFUN(font, const char *font) {
// TODO: refactor with mode_binding // TODO: refactor with mode_binding
CFGFUN(binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) { CFGFUN(binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) {
Binding *new_binding = scalloc(sizeof(Binding)); Binding *new_binding = scalloc(sizeof(Binding));
DLOG("bindtype %s, modifiers %s, key %s, release %s\n", bindtype, modifiers, key, release);
new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS); new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS);
if (strcmp(bindtype, "bindsym") == 0) { if (strcmp(bindtype, "bindsym") == 0) {
new_binding->symbol = sstrdup(key); new_binding->symbol = sstrdup(key);
@ -200,6 +201,7 @@ static struct bindings_head *current_bindings;
CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) { CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *command) {
Binding *new_binding = scalloc(sizeof(Binding)); Binding *new_binding = scalloc(sizeof(Binding));
DLOG("bindtype %s, modifiers %s, key %s, release %s\n", bindtype, modifiers, key, release);
new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS); new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS);
if (strcmp(bindtype, "bindsym") == 0) { if (strcmp(bindtype, "bindsym") == 0) {
new_binding->symbol = sstrdup(key); new_binding->symbol = sstrdup(key);