aboutsummaryrefslogtreecommitdiff
path: root/parser-specs
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2020-05-07 09:22:03 +0200
committerGitHub <noreply@github.com>2020-05-07 09:22:03 +0200
commitf63a4bef5471d73428808ecc5b8dd76ff04a23f4 (patch)
treef43bb34e077997e064e227b5022864f956dd5035 /parser-specs
parent142b3fa945a12603d010e0b9f3cfd2adef86d973 (diff)
downloadi3-f63a4bef5471d73428808ecc5b8dd76ff04a23f4.tar.gz
i3-f63a4bef5471d73428808ecc5b8dd76ff04a23f4.zip
cmd_bar improvements (#4014)
- Split cmd_bar into 2 functions, improving errors and reducing strcmps - Only update barconfig when something has changed - Only update barconfig for the specific bar that has changed Fixes #3958
Diffstat (limited to 'parser-specs')
-rw-r--r--parser-specs/commands.spec14
1 files changed, 8 insertions, 6 deletions
diff --git a/parser-specs/commands.spec b/parser-specs/commands.spec
index ed9cf0f2..22fa4523 100644
--- a/parser-specs/commands.spec
+++ b/parser-specs/commands.spec
@@ -460,15 +460,17 @@ state BAR:
-> BAR_MODE
state BAR_HIDDEN_STATE:
- bar_value = 'hide', 'show', 'toggle'
- -> BAR_W_ID
+ bar_hidden_state = 'hide', 'show', 'toggle'
+ ->
+ bar_id = word
+ ->
+ end
+ -> call cmd_bar_hidden_state($bar_hidden_state, $bar_id)
state BAR_MODE:
bar_value = 'dock', 'hide', 'invisible', 'toggle'
- -> BAR_W_ID
-
-state BAR_W_ID:
+ ->
bar_id = word
->
end
- -> call cmd_bar($bar_type, $bar_value, $bar_id)
+ -> call cmd_bar_mode($bar_value, $bar_id)