aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-16 08:46:38 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-16 10:18:00 +0300
commit22302bf224def0ba24ad73e10a987ee6ba33cb2d (patch)
treece9db4e80983b57243a07c823d491fcb33993b22
parentbb6663ebac872ad8a9982bdc63e5e8792073b63e (diff)
downloadniri-22302bf224def0ba24ad73e10a987ee6ba33cb2d.tar.gz
niri-22302bf224def0ba24ad73e10a987ee6ba33cb2d.tar.bz2
niri-22302bf224def0ba24ad73e10a987ee6ba33cb2d.zip
config: Deindent the snapshot
-rw-r--r--niri-config/src/lib.rs1730
1 files changed, 865 insertions, 865 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index 6a705226..0c4f5680 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -3750,973 +3750,973 @@ mod tests {
);
assert_debug_snapshot!(parsed, @r#"
- Config {
- input: Input {
- keyboard: Keyboard {
- xkb: Xkb {
- rules: "",
- model: "",
- layout: "us,ru",
- variant: "",
- options: Some(
- "grp:win_space_toggle",
- ),
- file: None,
- },
- repeat_delay: 600,
- repeat_rate: 25,
- track_layout: Window,
- },
- touchpad: Touchpad {
- off: false,
- tap: true,
- dwt: true,
- dwtp: true,
- drag_lock: false,
- natural_scroll: false,
- click_method: Some(
- Clickfinger,
- ),
- accel_speed: 0.2,
- accel_profile: Some(
- Flat,
- ),
- scroll_method: Some(
- TwoFinger,
- ),
- scroll_button: Some(
- 272,
+ Config {
+ input: Input {
+ keyboard: Keyboard {
+ xkb: Xkb {
+ rules: "",
+ model: "",
+ layout: "us,ru",
+ variant: "",
+ options: Some(
+ "grp:win_space_toggle",
),
- tap_button_map: Some(
- LeftMiddleRight,
+ file: None,
+ },
+ repeat_delay: 600,
+ repeat_rate: 25,
+ track_layout: Window,
+ },
+ touchpad: Touchpad {
+ off: false,
+ tap: true,
+ dwt: true,
+ dwtp: true,
+ drag_lock: false,
+ natural_scroll: false,
+ click_method: Some(
+ Clickfinger,
+ ),
+ accel_speed: 0.2,
+ accel_profile: Some(
+ Flat,
+ ),
+ scroll_method: Some(
+ TwoFinger,
+ ),
+ scroll_button: Some(
+ 272,
+ ),
+ tap_button_map: Some(
+ LeftMiddleRight,
+ ),
+ left_handed: false,
+ disabled_on_external_mouse: true,
+ middle_emulation: false,
+ scroll_factor: Some(
+ FloatOrInt(
+ 0.9,
),
- left_handed: false,
- disabled_on_external_mouse: true,
- middle_emulation: false,
- scroll_factor: Some(
- FloatOrInt(
- 0.9,
- ),
+ ),
+ },
+ mouse: Mouse {
+ off: false,
+ natural_scroll: true,
+ accel_speed: 0.4,
+ accel_profile: Some(
+ Flat,
+ ),
+ scroll_method: Some(
+ NoScroll,
+ ),
+ scroll_button: Some(
+ 273,
+ ),
+ left_handed: false,
+ middle_emulation: true,
+ scroll_factor: Some(
+ FloatOrInt(
+ 0.2,
),
+ ),
+ },
+ trackpoint: Trackpoint {
+ off: true,
+ natural_scroll: true,
+ accel_speed: 0.0,
+ accel_profile: Some(
+ Flat,
+ ),
+ scroll_method: Some(
+ OnButtonDown,
+ ),
+ scroll_button: Some(
+ 274,
+ ),
+ middle_emulation: false,
+ },
+ trackball: Trackball {
+ off: true,
+ natural_scroll: true,
+ accel_speed: 0.0,
+ accel_profile: Some(
+ Flat,
+ ),
+ scroll_method: Some(
+ Edge,
+ ),
+ scroll_button: Some(
+ 275,
+ ),
+ left_handed: true,
+ middle_emulation: true,
+ },
+ tablet: Tablet {
+ off: false,
+ calibration_matrix: Some(
+ [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ ],
+ ),
+ map_to_output: Some(
+ "eDP-1",
+ ),
+ left_handed: false,
+ },
+ touch: Touch {
+ map_to_output: Some(
+ "eDP-1",
+ ),
+ },
+ disable_power_key_handling: true,
+ warp_mouse_to_focus: true,
+ focus_follows_mouse: Some(
+ FocusFollowsMouse {
+ max_scroll_amount: None,
},
- mouse: Mouse {
+ ),
+ workspace_auto_back_and_forth: true,
+ },
+ outputs: Outputs(
+ [
+ Output {
off: false,
- natural_scroll: true,
- accel_speed: 0.4,
- accel_profile: Some(
- Flat,
- ),
- scroll_method: Some(
- NoScroll,
- ),
- scroll_button: Some(
- 273,
- ),
- left_handed: false,
- middle_emulation: true,
- scroll_factor: Some(
+ name: "eDP-1",
+ scale: Some(
FloatOrInt(
- 0.2,
+ 2.0,
),
),
- },
- trackpoint: Trackpoint {
- off: true,
- natural_scroll: true,
- accel_speed: 0.0,
- accel_profile: Some(
- Flat,
+ transform: Flipped90,
+ position: Some(
+ Position {
+ x: 10,
+ y: 20,
+ },
),
- scroll_method: Some(
- OnButtonDown,
+ mode: Some(
+ ConfiguredMode {
+ width: 1920,
+ height: 1080,
+ refresh: Some(
+ 144.0,
+ ),
+ },
),
- scroll_button: Some(
- 274,
+ variable_refresh_rate: Some(
+ Vrr {
+ on_demand: true,
+ },
),
- middle_emulation: false,
+ background_color: Color {
+ r: 0.09803922,
+ g: 0.09803922,
+ b: 0.4,
+ a: 1.0,
+ },
},
- trackball: Trackball {
- off: true,
- natural_scroll: true,
- accel_speed: 0.0,
- accel_profile: Some(
- Flat,
- ),
- scroll_method: Some(
- Edge,
- ),
- scroll_button: Some(
- 275,
- ),
- left_handed: true,
- middle_emulation: true,
+ ],
+ ),
+ spawn_at_startup: [
+ SpawnAtStartup {
+ command: [
+ "alacritty",
+ "-e",
+ "fish",
+ ],
+ },
+ ],
+ layout: Layout {
+ focus_ring: FocusRing {
+ off: false,
+ width: FloatOrInt(
+ 5.0,
+ ),
+ active_color: Color {
+ r: 0.0,
+ g: 0.39215687,
+ b: 0.78431374,
+ a: 1.0,
},
- tablet: Tablet {
- off: false,
- calibration_matrix: Some(
- [
- 1.0,
- 2.0,
- 3.0,
- 4.0,
- 5.0,
- 6.0,
- ],
+ inactive_color: Color {
+ r: 1.0,
+ g: 0.78431374,
+ b: 0.39215687,
+ a: 0.0,
+ },
+ active_gradient: Some(
+ Gradient {
+ from: Color {
+ r: 0.039215688,
+ g: 0.078431375,
+ b: 0.11764706,
+ a: 1.0,
+ },
+ to: Color {
+ r: 0.0,
+ g: 0.5019608,
+ b: 1.0,
+ a: 1.0,
+ },
+ angle: 180,
+ relative_to: WorkspaceView,
+ in_: GradientInterpolation {
+ color_space: Srgb,
+ hue_interpolation: Shorter,
+ },
+ },
+ ),
+ inactive_gradient: None,
+ },
+ border: Border {
+ off: false,
+ width: FloatOrInt(
+ 3.0,
+ ),
+ active_color: Color {
+ r: 1.0,
+ g: 0.78431374,
+ b: 0.49803922,
+ a: 1.0,
+ },
+ inactive_color: Color {
+ r: 1.0,
+ g: 0.78431374,
+ b: 0.39215687,
+ a: 0.0,
+ },
+ active_gradient: None,
+ inactive_gradient: None,
+ },
+ shadow: Shadow {
+ on: false,
+ offset: ShadowOffset {
+ x: FloatOrInt(
+ 10.0,
),
- map_to_output: Some(
- "eDP-1",
+ y: FloatOrInt(
+ -20.0,
),
- left_handed: false,
},
- touch: Touch {
- map_to_output: Some(
- "eDP-1",
+ softness: FloatOrInt(
+ 30.0,
+ ),
+ spread: FloatOrInt(
+ 5.0,
+ ),
+ draw_behind_window: false,
+ color: Color {
+ r: 0.0,
+ g: 0.0,
+ b: 0.0,
+ a: 0.4392157,
+ },
+ inactive_color: None,
+ },
+ tab_indicator: TabIndicator {
+ off: false,
+ hide_when_single_tab: false,
+ place_within_column: false,
+ gap: FloatOrInt(
+ 5.0,
+ ),
+ width: FloatOrInt(
+ 10.0,
+ ),
+ length: TabIndicatorLength {
+ total_proportion: Some(
+ 0.5,
),
},
- disable_power_key_handling: true,
- warp_mouse_to_focus: true,
- focus_follows_mouse: Some(
- FocusFollowsMouse {
- max_scroll_amount: None,
- },
+ position: Top,
+ gaps_between_tabs: FloatOrInt(
+ 0.0,
+ ),
+ corner_radius: FloatOrInt(
+ 0.0,
),
- workspace_auto_back_and_forth: true,
+ active_color: None,
+ inactive_color: None,
+ active_gradient: None,
+ inactive_gradient: None,
},
- outputs: Outputs(
- [
- Output {
- off: false,
- name: "eDP-1",
- scale: Some(
- FloatOrInt(
- 2.0,
- ),
- ),
- transform: Flipped90,
- position: Some(
- Position {
- x: 10,
- y: 20,
- },
- ),
- mode: Some(
- ConfiguredMode {
- width: 1920,
- height: 1080,
- refresh: Some(
- 144.0,
- ),
- },
- ),
- variable_refresh_rate: Some(
- Vrr {
- on_demand: true,
- },
- ),
- background_color: Color {
- r: 0.09803922,
- g: 0.09803922,
- b: 0.4,
+ insert_hint: InsertHint {
+ off: false,
+ color: Color {
+ r: 1.0,
+ g: 0.78431374,
+ b: 0.49803922,
+ a: 1.0,
+ },
+ gradient: Some(
+ Gradient {
+ from: Color {
+ r: 0.039215688,
+ g: 0.078431375,
+ b: 0.11764706,
+ a: 1.0,
+ },
+ to: Color {
+ r: 0.0,
+ g: 0.5019608,
+ b: 1.0,
a: 1.0,
},
+ angle: 180,
+ relative_to: WorkspaceView,
+ in_: GradientInterpolation {
+ color_space: Srgb,
+ hue_interpolation: Shorter,
+ },
},
- ],
+ ),
+ },
+ preset_column_widths: [
+ Proportion(
+ 0.25,
+ ),
+ Proportion(
+ 0.5,
+ ),
+ Fixed(
+ 960,
+ ),
+ Fixed(
+ 1280,
+ ),
+ ],
+ default_column_width: Some(
+ DefaultPresetSize(
+ Some(
+ Proportion(
+ 0.25,
+ ),
+ ),
+ ),
),
- spawn_at_startup: [
- SpawnAtStartup {
- command: [
- "alacritty",
- "-e",
- "fish",
- ],
- },
+ preset_window_heights: [
+ Proportion(
+ 0.25,
+ ),
+ Proportion(
+ 0.5,
+ ),
+ Fixed(
+ 960,
+ ),
+ Fixed(
+ 1280,
+ ),
],
- layout: Layout {
- focus_ring: FocusRing {
+ center_focused_column: OnOverflow,
+ always_center_single_column: false,
+ empty_workspace_above_first: false,
+ default_column_display: Tabbed,
+ gaps: FloatOrInt(
+ 8.0,
+ ),
+ struts: Struts {
+ left: FloatOrInt(
+ 1.0,
+ ),
+ right: FloatOrInt(
+ 2.0,
+ ),
+ top: FloatOrInt(
+ 3.0,
+ ),
+ bottom: FloatOrInt(
+ 0.0,
+ ),
+ },
+ },
+ prefer_no_csd: true,
+ cursor: Cursor {
+ xcursor_theme: "breeze_cursors",
+ xcursor_size: 16,
+ hide_when_typing: true,
+ hide_after_inactive_ms: Some(
+ 3000,
+ ),
+ },
+ screenshot_path: Some(
+ "~/Screenshots/screenshot.png",
+ ),
+ clipboard: Clipboard {
+ disable_primary: true,
+ },
+ hotkey_overlay: HotkeyOverlay {
+ skip_at_startup: true,
+ },
+ animations: Animations {
+ off: false,
+ slowdown: 2.0,
+ workspace_switch: WorkspaceSwitchAnim(
+ Animation {
off: false,
- width: FloatOrInt(
- 5.0,
+ kind: Spring(
+ SpringParams {
+ damping_ratio: 1.0,
+ stiffness: 1000,
+ epsilon: 0.0001,
+ },
),
- active_color: Color {
- r: 0.0,
- g: 0.39215687,
- b: 0.78431374,
- a: 1.0,
- },
- inactive_color: Color {
- r: 1.0,
- g: 0.78431374,
- b: 0.39215687,
- a: 0.0,
- },
- active_gradient: Some(
- Gradient {
- from: Color {
- r: 0.039215688,
- g: 0.078431375,
- b: 0.11764706,
- a: 1.0,
- },
- to: Color {
- r: 0.0,
- g: 0.5019608,
- b: 1.0,
- a: 1.0,
- },
- angle: 180,
- relative_to: WorkspaceView,
- in_: GradientInterpolation {
- color_space: Srgb,
- hue_interpolation: Shorter,
- },
+ },
+ ),
+ window_open: WindowOpenAnim {
+ anim: Animation {
+ off: true,
+ kind: Easing(
+ EasingParams {
+ duration_ms: 150,
+ curve: EaseOutExpo,
},
),
- inactive_gradient: None,
},
- border: Border {
+ custom_shader: None,
+ },
+ window_close: WindowCloseAnim {
+ anim: Animation {
off: false,
- width: FloatOrInt(
- 3.0,
+ kind: Easing(
+ EasingParams {
+ duration_ms: 150,
+ curve: EaseOutQuad,
+ },
),
- active_color: Color {
- r: 1.0,
- g: 0.78431374,
- b: 0.49803922,
- a: 1.0,
- },
- inactive_color: Color {
- r: 1.0,
- g: 0.78431374,
- b: 0.39215687,
- a: 0.0,
- },
- active_gradient: None,
- inactive_gradient: None,
},
- shadow: Shadow {
- on: false,
- offset: ShadowOffset {
- x: FloatOrInt(
- 10.0,
- ),
- y: FloatOrInt(
- -20.0,
- ),
- },
- softness: FloatOrInt(
- 30.0,
- ),
- spread: FloatOrInt(
- 5.0,
+ custom_shader: None,
+ },
+ horizontal_view_movement: HorizontalViewMovementAnim(
+ Animation {
+ off: false,
+ kind: Easing(
+ EasingParams {
+ duration_ms: 100,
+ curve: EaseOutExpo,
+ },
),
- draw_behind_window: false,
- color: Color {
- r: 0.0,
- g: 0.0,
- b: 0.0,
- a: 0.4392157,
- },
- inactive_color: None,
},
- tab_indicator: TabIndicator {
+ ),
+ window_movement: WindowMovementAnim(
+ Animation {
off: false,
- hide_when_single_tab: false,
- place_within_column: false,
- gap: FloatOrInt(
- 5.0,
- ),
- width: FloatOrInt(
- 10.0,
- ),
- length: TabIndicatorLength {
- total_proportion: Some(
- 0.5,
- ),
- },
- position: Top,
- gaps_between_tabs: FloatOrInt(
- 0.0,
- ),
- corner_radius: FloatOrInt(
- 0.0,
+ kind: Spring(
+ SpringParams {
+ damping_ratio: 1.0,
+ stiffness: 800,
+ epsilon: 0.0001,
+ },
),
- active_color: None,
- inactive_color: None,
- active_gradient: None,
- inactive_gradient: None,
},
- insert_hint: InsertHint {
+ ),
+ window_resize: WindowResizeAnim {
+ anim: Animation {
off: false,
- color: Color {
- r: 1.0,
- g: 0.78431374,
- b: 0.49803922,
- a: 1.0,
- },
- gradient: Some(
- Gradient {
- from: Color {
- r: 0.039215688,
- g: 0.078431375,
- b: 0.11764706,
- a: 1.0,
- },
- to: Color {
- r: 0.0,
- g: 0.5019608,
- b: 1.0,
- a: 1.0,
- },
- angle: 180,
- relative_to: WorkspaceView,
- in_: GradientInterpolation {
- color_space: Srgb,
- hue_interpolation: Shorter,
- },
+ kind: Spring(
+ SpringParams {
+ damping_ratio: 1.0,
+ stiffness: 800,
+ epsilon: 0.0001,
},
),
},
- preset_column_widths: [
- Proportion(
- 0.25,
- ),
- Proportion(
- 0.5,
+ custom_shader: None,
+ },
+ config_notification_open_close: ConfigNotificationOpenCloseAnim(
+ Animation {
+ off: false,
+ kind: Spring(
+ SpringParams {
+ damping_ratio: 0.6,
+ stiffness: 1000,
+ epsilon: 0.001,
+ },
),
- Fixed(
- 960,
+ },
+ ),
+ screenshot_ui_open: ScreenshotUiOpenAnim(
+ Animation {
+ off: false,
+ kind: Easing(
+ EasingParams {
+ duration_ms: 200,
+ curve: EaseOutQuad,
+ },
),
- Fixed(
- 1280,
+ },
+ ),
+ },
+ environment: Environment(
+ [
+ EnvironmentVariable {
+ name: "QT_QPA_PLATFORM",
+ value: Some(
+ "wayland",
),
+ },
+ EnvironmentVariable {
+ name: "DISPLAY",
+ value: None,
+ },
+ ],
+ ),
+ window_rules: [
+ WindowRule {
+ matches: [
+ Match {
+ app_id: Some(
+ RegexEq(
+ Regex(
+ ".*alacritty",
+ ),
+ ),
+ ),
+ title: None,
+ is_active: None,
+ is_focused: None,
+ is_active_in_column: None,
+ is_floating: None,
+ is_window_cast_target: None,
+ at_startup: None,
+ },
],
- default_column_width: Some(
+ excludes: [
+ Match {
+ app_id: None,
+ title: Some(
+ RegexEq(
+ Regex(
+ "~",
+ ),
+ ),
+ ),
+ is_active: None,
+ is_focused: None,
+ is_active_in_column: None,
+ is_floating: None,
+ is_window_cast_target: None,
+ at_startup: None,
+ },
+ Match {
+ app_id: None,
+ title: None,
+ is_active: Some(
+ true,
+ ),
+ is_focused: Some(
+ false,
+ ),
+ is_active_in_column: None,
+ is_floating: None,
+ is_window_cast_target: None,
+ at_startup: None,
+ },
+ ],
+ default_column_width: None,
+ default_window_height: Some(
DefaultPresetSize(
Some(
- Proportion(
- 0.25,
+ Fixed(
+ 500,
),
),
),
),
- preset_window_heights: [
- Proportion(
- 0.25,
- ),
- Proportion(
- 0.5,
- ),
- Fixed(
- 960,
- ),
- Fixed(
- 1280,
- ),
- ],
- center_focused_column: OnOverflow,
- always_center_single_column: false,
- empty_workspace_above_first: false,
- default_column_display: Tabbed,
- gaps: FloatOrInt(
- 8.0,
+ open_on_output: Some(
+ "eDP-1",
),
- struts: Struts {
- left: FloatOrInt(
- 1.0,
- ),
- right: FloatOrInt(
- 2.0,
+ open_on_workspace: None,
+ open_maximized: Some(
+ true,
+ ),
+ open_fullscreen: Some(
+ false,
+ ),
+ open_floating: Some(
+ false,
+ ),
+ open_focused: Some(
+ true,
+ ),
+ min_width: None,
+ min_height: None,
+ max_width: None,
+ max_height: None,
+ focus_ring: BorderRule {
+ off: true,
+ on: false,
+ width: Some(
+ FloatOrInt(
+ 3.0,
+ ),
),
- top: FloatOrInt(
- 3.0,
+ active_color: None,
+ inactive_color: None,
+ active_gradient: None,
+ inactive_gradient: None,
+ },
+ border: BorderRule {
+ off: false,
+ on: true,
+ width: Some(
+ FloatOrInt(
+ 8.5,
+ ),
),
- bottom: FloatOrInt(
- 0.0,
+ active_color: None,
+ inactive_color: None,
+ active_gradient: None,
+ inactive_gradient: None,
+ },
+ shadow: ShadowRule {
+ off: false,
+ on: false,
+ offset: None,
+ softness: None,
+ spread: None,
+ draw_behind_window: None,
+ color: None,
+ inactive_color: None,
+ },
+ tab_indicator: TabIndicatorRule {
+ active_color: Some(
+ Color {
+ r: 1.0,
+ g: 0.0,
+ b: 0.0,
+ a: 1.0,
+ },
),
+ inactive_color: None,
+ active_gradient: None,
+ inactive_gradient: None,
},
- },
- prefer_no_csd: true,
- cursor: Cursor {
- xcursor_theme: "breeze_cursors",
- xcursor_size: 16,
- hide_when_typing: true,
- hide_af