X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=parser-specs%2Fconfig.spec;h=43181c59e1bb96f52563e5063e719daa9a7848fe;hp=986086c7d27d90e06644d0d34610cc2f52ed0c58;hb=HEAD;hpb=79e7e699393507ff9d9a33dbb361b26d10d89d85 diff --git a/parser-specs/config.spec b/parser-specs/config.spec index 986086c7..43181c59 100644 --- a/parser-specs/config.spec +++ b/parser-specs/config.spec @@ -17,7 +17,9 @@ state INITIAL: end -> error -> '#' -> IGNORE_LINE - 'set' -> IGNORE_LINE + 'set ' -> IGNORE_LINE + 'set ' -> IGNORE_LINE + 'set_from_resource' -> IGNORE_LINE bindtype = 'bindsym', 'bindcode', 'bind' -> BINDING 'bar' -> BARBRACE 'font' -> FONT @@ -27,23 +29,27 @@ state INITIAL: 'floating_modifier' -> FLOATING_MODIFIER 'default_orientation' -> DEFAULT_ORIENTATION 'workspace_layout' -> WORKSPACE_LAYOUT - windowtype = 'new_window', 'new_float' -> NEW_WINDOW + windowtype = 'default_border', 'new_window', 'default_floating_border', 'new_float' + -> DEFAULT_BORDER 'hide_edge_borders' -> HIDE_EDGE_BORDERS 'for_window' -> FOR_WINDOW 'assign' -> ASSIGN 'no_focus' -> NO_FOCUS 'focus_follows_mouse' -> FOCUS_FOLLOWS_MOUSE 'mouse_warping' -> MOUSE_WARPING + 'focus_wrapping' -> FOCUS_WRAPPING 'force_focus_wrapping' -> FORCE_FOCUS_WRAPPING 'force_xinerama', 'force-xinerama' -> FORCE_XINERAMA + 'disable_randr15', 'disable-randr15' -> DISABLE_RANDR15 'workspace_auto_back_and_forth' -> WORKSPACE_BACK_AND_FORTH 'fake_outputs', 'fake-outputs' -> FAKE_OUTPUTS 'force_display_urgency_hint' -> FORCE_DISPLAY_URGENCY_HINT - 'delay_exit_on_zero_displays' -> DELAY_EXIT_ON_ZERO_DISPLAYS 'focus_on_window_activation' -> FOCUS_ON_WINDOW_ACTIVATION + 'title_align' -> TITLE_ALIGN 'show_marks' -> SHOW_MARKS 'workspace' -> WORKSPACE 'ipc_socket', 'ipc-socket' -> IPC_SOCKET + 'ipc_kill_timeout' -> IPC_KILL_TIMEOUT 'restart_state' -> RESTART_STATE 'popup_during_fullscreen' -> POPUP_DURING_FULLSCREEN exectype = 'exec_always', 'exec' -> EXEC @@ -102,32 +108,30 @@ state WORKSPACE_LAYOUT: layout = 'default', 'stacking', 'stacked', 'tabbed' -> call cfg_workspace_layout($layout) -# new_window -# new_float -# TODO: new_float is not in the userguide yet -# TODO: pixel is not in the userguide yet -state NEW_WINDOW: +# +# +state DEFAULT_BORDER: border = 'normal', 'pixel' - -> NEW_WINDOW_PIXELS + -> DEFAULT_BORDER_PIXELS border = '1pixel', 'none' - -> call cfg_new_window($windowtype, $border, -1) + -> call cfg_default_border($windowtype, $border, -1) -state NEW_WINDOW_PIXELS: +state DEFAULT_BORDER_PIXELS: end - -> call cfg_new_window($windowtype, $border, 2) + -> call cfg_default_border($windowtype, $border, 2) width = number - -> NEW_WINDOW_PIXELS_PX + -> DEFAULT_BORDER_PIXELS_PX -state NEW_WINDOW_PIXELS_PX: +state DEFAULT_BORDER_PIXELS_PX: 'px' -> end - -> call cfg_new_window($windowtype, $border, &width) + -> call cfg_default_border($windowtype, $border, &width) -# hide_edge_borders +# hide_edge_borders # also hide_edge_borders for compatibility state HIDE_EDGE_BORDERS: - hide_borders = 'none', 'vertical', 'horizontal', 'both' + hide_borders = 'none', 'vertical', 'horizontal', 'both', 'smart' -> call cfg_hide_edge_borders($hide_borders) hide_borders = '1', 'yes', 'true', 'on', 'enable', 'active' -> call cfg_hide_edge_borders($hide_borders) @@ -141,7 +145,7 @@ state FOR_WINDOW_COMMAND: command = string -> call cfg_for_window($command) -# assign [→] workspace +# assign [→] [workspace | output] state ASSIGN: '[' -> call cfg_criteria_init(ASSIGN_WORKSPACE); CRITERIA @@ -149,8 +153,22 @@ state ASSIGN: state ASSIGN_WORKSPACE: '→' -> + 'output' + -> ASSIGN_OUTPUT + 'workspace' + -> + 'number' + -> ASSIGN_WORKSPACE_NUMBER workspace = string - -> call cfg_assign($workspace) + -> call cfg_assign($workspace, 0) + +state ASSIGN_OUTPUT: + output = string + -> call cfg_assign_output($output) + +state ASSIGN_WORKSPACE_NUMBER: + number = string + -> call cfg_assign($number, 1) # no_focus state NO_FOCUS: @@ -172,6 +190,9 @@ state CRITERIA: ctype = 'con_mark' -> CRITERION ctype = 'title' -> CRITERION ctype = 'urgent' -> CRITERION + ctype = 'workspace' -> CRITERION + ctype = 'tiling', 'floating' + -> call cfg_criteria_add($ctype, NULL); CRITERIA ']' -> call cfg_criteria_pop_state() @@ -192,6 +213,11 @@ state MOUSE_WARPING: value = 'none', 'output' -> call cfg_mouse_warping($value) +# focus_wrapping +state FOCUS_WRAPPING: + value = '1', 'yes', 'true', 'on', 'enable', 'active', '0', 'no', 'false', 'off', 'disable', 'inactive', 'force' + -> call cfg_focus_wrapping($value) + # force_focus_wrapping state FORCE_FOCUS_WRAPPING: value = word @@ -202,6 +228,11 @@ state FORCE_XINERAMA: value = word -> call cfg_force_xinerama($value) +# disable_randr15 +state DISABLE_RANDR15: + value = word + -> call cfg_disable_randr15($value) + # workspace_back_and_forth state WORKSPACE_BACK_AND_FORTH: value = word @@ -218,6 +249,11 @@ state FORCE_DISPLAY_URGENCY_HINT: duration_ms = number -> FORCE_DISPLAY_URGENCY_HINT_MS +# title_align [left|center|right] +state TITLE_ALIGN: + alignment = 'left', 'center', 'right' + -> call cfg_title_align($alignment) + # show_marks state SHOW_MARKS: value = word @@ -229,17 +265,6 @@ state FORCE_DISPLAY_URGENCY_HINT_MS: end -> call cfg_force_display_urgency_hint(&duration_ms) -# delay_exit_on_zero_displays ms -state DELAY_EXIT_ON_ZERO_DISPLAYS: - duration_ms = number - -> DELAY_EXIT_ON_ZERO_DISPLAYS_MS - -state DELAY_EXIT_ON_ZERO_DISPLAYS_MS: - 'ms' - -> - end - -> call cfg_delay_exit_on_zero_displays(&duration_ms) - # focus_on_window_activation state FOCUS_ON_WINDOW_ACTIVATION: mode = word @@ -255,7 +280,7 @@ state WORKSPACE_OUTPUT: -> WORKSPACE_OUTPUT_STR state WORKSPACE_OUTPUT_STR: - output = word + output = string -> call cfg_workspace($workspace, $output) # ipc-socket @@ -263,6 +288,11 @@ state IPC_SOCKET: path = string -> call cfg_ipc_socket($path) +# ipc_kill_timeout +state IPC_KILL_TIMEOUT: + timeout = number + -> call cfg_ipc_kill_timeout(&timeout) + # restart_state (for testcases) state RESTART_STATE: path = string @@ -293,9 +323,15 @@ state COLOR_TEXT: state COLOR_INDICATOR: indicator = word - -> call cfg_color($colorclass, $border, $background, $text, $indicator) + -> COLOR_CHILD_BORDER end - -> call cfg_color($colorclass, $border, $background, $text, NULL) + -> call cfg_color($colorclass, $border, $background, $text, NULL, NULL) + +state COLOR_CHILD_BORDER: + child_border = word + -> call cfg_color($colorclass, $border, $background, $text, $indicator, $child_border) + end + -> call cfg_color($colorclass, $border, $background, $text, $indicator, NULL) # [--no-startup-id] command state EXEC: @@ -317,7 +353,9 @@ state BINDING: -> whole_window = '--whole-window' -> - modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch', '$mod' + exclude_titlebar = '--exclude-titlebar' + -> + modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch', 'Group1', 'Group2', 'Group3', 'Group4', '$mod' -> '+' -> @@ -331,16 +369,20 @@ state BINDCOMMAND: -> whole_window = '--whole-window' -> + exclude_titlebar = '--exclude-titlebar' + -> command = string - -> call cfg_binding($bindtype, $modifiers, $key, $release, $border, $whole_window, $command) + -> call cfg_binding($bindtype, $modifiers, $key, $release, $border, $whole_window, $exclude_titlebar, $command) ################################################################################ # Mode configuration ################################################################################ state MODENAME: + pango_markup = '--pango_markup' + -> modename = word - -> call cfg_enter_mode($modename); MODEBRACE + -> call cfg_enter_mode($pango_markup, $modename); MODEBRACE state MODEBRACE: end @@ -370,7 +412,9 @@ state MODE_BINDING: -> whole_window = '--whole-window' -> - modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch', '$mod' + exclude_titlebar = '--exclude-titlebar' + -> + modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch', 'Group1', 'Group2', 'Group3', 'Group4', '$mod' -> '+' -> @@ -384,8 +428,10 @@ state MODE_BINDCOMMAND: -> whole_window = '--whole-window' -> + exclude_titlebar = '--exclude-titlebar' + -> command = string - -> call cfg_mode_binding($bindtype, $modifiers, $key, $release, $border, $whole_window, $command); MODE + -> call cfg_mode_binding($bindtype, $modifiers, $key, $release, $border, $whole_window, $exclude_titlebar, $command); MODE ################################################################################ # Bar configuration (i3bar) @@ -395,7 +441,7 @@ state BARBRACE: end -> '{' - -> BAR + -> call cfg_bar_start(); BAR state BAR: end -> @@ -411,14 +457,17 @@ state BAR: '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 + 'tray_padding' -> BAR_TRAY_PADDING 'font' -> BAR_FONT 'separator_symbol' -> BAR_SEPARATOR_SYMBOL 'binding_mode_indicator' -> BAR_BINDING_MODE_INDICATOR 'workspace_buttons' -> BAR_WORKSPACE_BUTTONS 'strip_workspace_numbers' -> BAR_STRIP_WORKSPACE_NUMBERS + 'strip_workspace_name' -> BAR_STRIP_WORKSPACE_NAME 'verbose' -> BAR_VERBOSE 'colors' -> BAR_COLORS_BRACE '}' @@ -454,8 +503,14 @@ state BAR_ID: -> call cfg_bar_id($bar_id); BAR state BAR_MODIFIER: - modifier = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Control', 'Ctrl', 'Shift' - -> call cfg_bar_modifier($modifier); BAR + 'off', 'none' + -> call cfg_bar_modifier(NULL); BAR + modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl' + -> + '+' + -> + end + -> call cfg_bar_modifier($modifiers); BAR state BAR_WHEEL_UP_CMD: command = string @@ -465,6 +520,18 @@ state BAR_WHEEL_DOWN_CMD: command = string -> call cfg_bar_wheel_down_cmd($command); BAR +state BAR_BINDSYM: + release = '--release' + -> + button = word + -> BAR_BINDSYM_COMMAND + +state BAR_BINDSYM_COMMAND: + release = '--release' + -> + command = string + -> call cfg_bar_bindsym($button, $release, $command); BAR + state BAR_POSITION: position = 'top', 'bottom' -> call cfg_bar_position($position); BAR @@ -477,6 +544,16 @@ state BAR_TRAY_OUTPUT: output = word -> call cfg_bar_tray_output($output); BAR +state BAR_TRAY_PADDING: + padding_px = number + -> BAR_TRAY_PADDING_PX + +state BAR_TRAY_PADDING_PX: + 'px' + -> + end + -> call cfg_bar_tray_padding(&padding_px); BAR + state BAR_FONT: font = string -> call cfg_bar_font($font); BAR @@ -497,6 +574,10 @@ state BAR_STRIP_WORKSPACE_NUMBERS: value = word -> call cfg_bar_strip_workspace_numbers($value); BAR +state BAR_STRIP_WORKSPACE_NAME: + value = word + -> call cfg_bar_strip_workspace_name($value); BAR + state BAR_VERBOSE: value = word -> call cfg_bar_verbose($value); BAR @@ -511,9 +592,9 @@ state BAR_COLORS: end -> '#' -> BAR_COLORS_IGNORE_LINE 'set' -> BAR_COLORS_IGNORE_LINE - colorclass = 'background', 'statusline', 'separator' + colorclass = 'background', 'statusline', 'separator', 'focused_background', 'focused_statusline', 'focused_separator' -> BAR_COLORS_SINGLE - colorclass = 'focused_workspace', 'active_workspace', 'inactive_workspace', 'urgent_workspace' + colorclass = 'focused_workspace', 'active_workspace', 'inactive_workspace', 'urgent_workspace', 'binding_mode' -> BAR_COLORS_BORDER '}' -> BAR