Skip to content

Releases: areif-dev/river-bsp-layout

v2.1.1

29 Jan 06:13

Choose a tag to compare

Dependency Updates

  • Update clap and river-layout-toolkit versions
  • Remove references to unused dependencies in README
  • Add section about NixOS installation to README
  • Update default.nix to build package from Cargo.lock file instead of Github
  • Remove unused private functions of BSPLayout, parse_split_cmd and parse_gap_cmd

What's Changed

New Contributors

Full Changelog: v2.1.0...v2.1.1

v2.1.0

14 Aug 21:54

Choose a tag to compare

Configuration Changes

This release switches from using Regex to Clap to parse user commands passed to riverctl send-layout-cmd bsp-layout. This means that several options can now be passed as user commands at once instead of only one at a time like previous releases. This also means that options will need to be prefaced with a "--" like the CLI options. For example, you can set both inner and outer gaps in one command now by running riverctl send-layout-cmd bsp-layout "--inner-gap 5 --outer-gap 10"

Several new user command options have been also been added and are detailed below.

New Features

  • Introduce customizable split percentages to change how much of the splitable area is taken up by the primary window in both horizontal and vertical splits.
    • Associated CLI and riverctl send-layout-cmd Args:
      • --split-perc f Sets the default split percentage for both horizontal and vertical splits to f where 0 < f < 1. If not set, defaults to 0.5
      • --vsplit-perc f Overrides default split percentage to f only for vertical splits. 0 < `f`` < 1.
      • --hsplit-perc f Overrides default split percentage to f only for horizontal splits. 0 < f < 1.
      • --start-hsplit Whether the first split that's made should divide the screen horizontally. If this is not set, then the first split will be vertical
      • riverctl send-layout-cmd Exclusive Args:
        • --start-vsplit Set the first split to divide the screen from top to bottom. This will override --start-hsplit.
        • --inc-hsplit f Increase the percentage of the split area that is assigned to the primary window in a horizontal split by f. 0 < f < 1.
        • --inc-vsplit f Increase the percentage of the split area that is assigned to the primary window in a vertical split by f. 0 < f < 1.
        • --dec-hsplit f Decrease the percentage of the split area that is assigned to the primary window in a horizontal split by f. 0 < f < 1.
        • --dec-vsplit f Decrease the percentage of the split area that is assigned to the primary window in a vertical split by f. 0 < f < 1.
  • Add option to reverse the direction of the stack.
    • Associated CLI Args:
      • --reverse When passed to the CLI, this will force new windows to spawn to the right and bottom, rather than the left and top, which is the default behavior
    • Associated riverctl send-layout-cmd Args:
      • --reverse When passed as a user cmd, this option will flip the direction of the stack

Other Changes

New Contributors

Full Changelog: v2.0.0...v2.1.0

v2.0.0

23 Apr 03:03

Choose a tag to compare

This release overhauls the way gaps are handled. Instead of having global values for inner and outer gaps that apply to all edges, 2.0.0 introduces the ability to set each edge independently.

The new command line options are as follows:

Usage: river-bsp-layout [OPTIONS]

Options:
  -i, --inner-gap <DEFAULT_INNER_GAP>  The number of pixels to pad each inner edge of a window by default [default: 0]
  -l, --ig-left <IG_LEFT>              The number of pixels to pad the left inner edge of each window. This Overrides `default_inner_gap`. Optional
  -r, --ig-right <IG_RIGHT>            The number of pixels to pad the right inner edge of each window. This Overrides `default_inner_gap`. Optional
  -b, --ig-bottom <IG_BOTTOM>          The number of pixels to pad the bottom inner edge of each window. This Overrides `default_inner_gap`. Optional
  -t, --ig-top <IG_TOP>                The number of pixels to pad the top inner edge of each window. This Overrides `default_inner_gap`. Optional
  -o, --outer-gap <DEFAULT_OUTER_GAP>  The default size of the gap between windows and the edge of the screen [default: 0]
  -L, --og-left <OG_LEFT>              The number of pixels to place between the left screen edge and any windows. Overrides `default_outer_gap` for the left side. Optional
  -R, --og-right <OG_RIGHT>            The number of pixels to place between the right screen edge and any windows. Overrides `default_outer_gap` for the right side. Optional
  -B, --og-bottom <OG_BOTTOM>          The number of pixels to place between the bottom screen edge and any windows. Overrides `default_outer_gap` for the bottom side. Optional
  -T, --og-top <OG_TOP>                The number of pixels to place between the top screen edge and any windows. Overrides `default_outer_gap` for the top side. Optional
  -h, --help                           Print help
  -V, --version                        Print version

New layout commands:

  • riverctl send-layout-cmd bsp-layout outer-gap # - Sets all outer gaps to #
  • riverctl send-layout-cmd bsp-layout og-left # - Set only the left outer gap to #
  • riverctl send-layout-cmd bsp-layout og-right # - Set only the right outer gap to #
  • riverctl send-layout-cmd bsp-layout og-bottom # - Set only the bottom outer gap to #
  • riverctl send-layout-cmd bsp-layout og-top # - Set only the top outer gap to #
  • riverctl send-layout-cmd bsp-layout inner-gap # - Sets all inner gaps to #
  • riverctl send-layout-cmd bsp-layout ig-left # - Set only the left inner gap to #
  • riverctl send-layout-cmd bsp-layout ig-right # - Set only the right inner gap to #
  • riverctl send-layout-cmd bsp-layout ig-bottom # - Set only the bottom inner gap to #
  • riverctl send-layout-cmd bsp-layout ig-top # - Set only the top inner gap

These changes resulted in fairly drastic changes to the API, specifically in BSPLayout, BSPLayout::new, and of course the CLI, hence the major version bump. I doubt anyone is using this package as a library, but if you are, be aware of these changes.

For users of the binary who want to keep their gaps more or less the same as they have been, the only change you are likely to need to make is to divide your inner-gap value by 2. For example, my old config was

river-bsp-layout --inner-gap 10 --outer-gap 10 &

To achieve the same thing, my config is now

river-bsp-layout --inner-gap 5 --outer-gap 10 &

v1.1.2

17 Feb 20:25

Choose a tag to compare

  • Bump clap to v4.5
  • Bump regex to v1.10

v1.1.1

29 Aug 17:06

Choose a tag to compare

No new features or fixes. This is simply to clean up and improve documentation for docs.rs

v1.1.0

29 Aug 02:10

Choose a tag to compare

  • Move BSPLayout to lib.rs.
  • Create unit tests for BSPLayout
  • Improve documentation, add examples

v1.0.0

28 Aug 18:46

Choose a tag to compare

Initial release of River BSP Layout. A layout generator that tiles windows in a grid for the River Wayland compositor.