i3bar: implement custom workspace numbers config
Implement the configuration option within the bar config directive for custom workspace numbers with the directive `strip_workspace_numbers yes`. This directive strips the workspace name of the number prefix and delimiter. When the workspace name consists only of the number, it will default to show the number. For example: * "2:5" -> "5" * "4:$" -> "$" * "8" -> "8" This allows customization of i3bar for alternate ordering of workspaces which has a legitimate use for alternate keyboard layouts such as Dvorak. fixes #1131
This commit is contained in:
committed by
Michael Stapelberg
parent
e2f47ef466
commit
e707e0a5fa
@ -358,6 +358,7 @@ state BAR:
|
||||
'font' -> BAR_FONT
|
||||
'binding_mode_indicator' -> BAR_BINDING_MODE_INDICATOR
|
||||
'workspace_buttons' -> BAR_WORKSPACE_BUTTONS
|
||||
'strip_workspace_numbers' -> BAR_STRIP_WORKSPACE_NUMBERS
|
||||
'verbose' -> BAR_VERBOSE
|
||||
'colors' -> BAR_COLORS_BRACE
|
||||
'}'
|
||||
@ -420,6 +421,10 @@ state BAR_WORKSPACE_BUTTONS:
|
||||
value = word
|
||||
-> call cfg_bar_workspace_buttons($value); BAR
|
||||
|
||||
state BAR_STRIP_WORKSPACE_NUMBERS:
|
||||
value = word
|
||||
-> call cfg_bar_strip_workspace_numbers($value); BAR
|
||||
|
||||
state BAR_VERBOSE:
|
||||
value = word
|
||||
-> call cfg_bar_verbose($value); BAR
|
||||
|
Reference in New Issue
Block a user