Skip to content

Commit 2043138

Browse files
committed
fix(test): update bar schema roundtrip for dead_zone export
1 parent bcf640c commit 2043138

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

src/config/schema/config_schema.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,10 +1855,10 @@ namespace noctalia::config::schema {
18551855

18561856
const Schema<BarDeadZoneOverride>& barDeadZoneOverrideSchema() {
18571857
static const Schema<BarDeadZoneOverride> s = {
1858-
optionalStringField(&BarDeadZoneOverride::command, "command"),
1859-
optionalStringField(&BarDeadZoneOverride::rightCommand, "right_command"),
1860-
optionalStringField(&BarDeadZoneOverride::scrollUpCommand, "scroll_up_command"),
1861-
optionalStringField(&BarDeadZoneOverride::scrollDownCommand, "scroll_down_command"),
1858+
optionalTrimmedStringField(&BarDeadZoneOverride::command, "command"),
1859+
optionalTrimmedStringField(&BarDeadZoneOverride::rightCommand, "right_command"),
1860+
optionalTrimmedStringField(&BarDeadZoneOverride::scrollUpCommand, "scroll_up_command"),
1861+
optionalTrimmedStringField(&BarDeadZoneOverride::scrollDownCommand, "scroll_down_command"),
18621862
};
18631863
return s;
18641864
}

tests/config_schema_roundtrip_test.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ location = "https://example.invalid/bad"
165165
bar.marginEnds = 100;
166166
bar.marginEdge = 5;
167167
bar.marginOppositeEdge = 12;
168+
bar.deadZone.command = "notify-send bar-left";
169+
bar.deadZone.rightCommand = "notify-send bar-right";
170+
bar.deadZone.scrollUpCommand = "notify-send bar-scroll-up";
171+
bar.deadZone.scrollDownCommand = "notify-send bar-scroll-down";
168172
bar.padding = 12;
169173
bar.widgetSpacing = 8;
170174
bar.shadow = false;
@@ -218,6 +222,10 @@ location = "https://example.invalid/bad"
218222
ovr.marginEnds = 70;
219223
ovr.marginEdge = 9;
220224
ovr.marginOppositeEdge = 4;
225+
ovr.deadZone.command = "notify-send bar-left";
226+
ovr.deadZone.rightCommand = "notify-send bar-right";
227+
ovr.deadZone.scrollUpCommand = "notify-send monitor-scroll-up";
228+
ovr.deadZone.scrollDownCommand = "notify-send bar-scroll-down";
221229
ovr.padding = 11;
222230
ovr.widgetSpacing = 7;
223231
ovr.shadow = true;
@@ -506,8 +514,8 @@ font_weight = 600
506514
icon_color = "#0C0B0A"
507515
layer = "overlay"
508516
margin_edge = 5
509-
margin_opposite_edge = 12
510517
margin_ends = 100
518+
margin_opposite_edge = 12
511519
padding = 12
512520
panel_overlap = 2
513521
position = "bottom"
@@ -523,6 +531,12 @@ start = [ "launcher" ]
523531
thickness = 44
524532
widget_spacing = 8
525533
534+
[default.dead_zone]
535+
command = "notify-send bar-left"
536+
right_command = "notify-send bar-right"
537+
scroll_down_command = "notify-send bar-scroll-down"
538+
scroll_up_command = "notify-send bar-scroll-up"
539+
526540
[default.monitor.DP-1]
527541
auto_hide = false
528542
background_opacity = 0.69999998807907104
@@ -546,8 +560,8 @@ widget_spacing = 8
546560
icon_color = "#E3E2E1"
547561
layer = "top"
548562
margin_edge = 9
549-
margin_opposite_edge = 4
550563
margin_ends = 70
564+
margin_opposite_edge = 4
551565
match = "DP-1"
552566
padding = 11
553567
panel_overlap = -1
@@ -564,6 +578,12 @@ widget_spacing = 8
564578
thickness = 50
565579
widget_spacing = 7
566580
581+
[default.monitor.DP-1.dead_zone]
582+
command = "notify-send bar-left"
583+
right_command = "notify-send bar-right"
584+
scroll_down_command = "notify-send bar-scroll-down"
585+
scroll_up_command = "notify-send monitor-scroll-up"
586+
567587
[[default.monitor.DP-1.capsule_group]]
568588
border = "#0F0E0D"
569589
fill = "#F1F2F3"

0 commit comments

Comments
 (0)