implement bar { padding } config directive

related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/pull/4288
fixes https://github.com/i3/i3/issues/3721
This commit is contained in:
Michael Stapelberg
2022-10-30 22:04:05 +01:00
committed by Michael Stapelberg
parent 327bca26d8
commit 0b89d4b2a7
12 changed files with 296 additions and 10 deletions

View File

@ -511,6 +511,7 @@ state BAR:
'strip_workspace_name' -> BAR_STRIP_WORKSPACE_NAME
'verbose' -> BAR_VERBOSE
'height' -> BAR_HEIGHT
'padding' -> BAR_PADDING
'colors' -> BAR_COLORS_BRACE
'}'
-> call cfg_bar_finish(); INITIAL
@ -638,6 +639,40 @@ state BAR_HEIGHT:
value = number
-> call cfg_bar_height(&value); BAR
state BAR_PADDING:
top_or_all = number
-> BAR_PADDING_TOP
state BAR_PADDING_TOP:
'px'
->
right_or_right_and_left = number
-> BAR_PADDING_RIGHT
end
-> call cfg_bar_padding_one(&top_or_all); BAR
state BAR_PADDING_RIGHT:
'px'
->
bottom = number
-> BAR_PADDING_BOTTOM
end
-> call cfg_bar_padding_two(&top_or_all, &right_or_right_and_left); BAR
state BAR_PADDING_BOTTOM:
'px'
->
left = number
-> BAR_PADDING_LEFT
end
-> call cfg_bar_padding_three(&top_or_all, &right_or_right_and_left, &bottom); BAR
state BAR_PADDING_LEFT:
'px'
->
end
-> call cfg_bar_padding_four(&top_or_all, &right_or_right_and_left, &bottom, &left); BAR
state BAR_COLORS_BRACE:
end
->