This is a layout manager for the River window
manager. It's a drop-in replacement for rivertile
, but with a few things
added and configuration per tag/output.
After you install, you can simply replace all instances of rivertile
with
filtile
in your config to keep everything the same (but switch to per-tag
configuration). If you want more than that, keep reading.
All numbers will set the value, but also support a prefix of either +
or -
for adjustment.
Following are the commands that can be sent to riverctl send-layout-cmd filtile ...
:
- view-padding [pixels]
- Set the padding around views in pixels.
- outer-padding [pixels]
- Set the padding around the edge of the layout area in pixels.
- main-location [left | top | right | bottom]
- Set the location of the main area in the layout.
- main-count [count]
- Set the number of views in the main area of the layout.
- main-ratio [percent]
- Set the ratio of the main area to total layout area, in percent. The ratio must be between 10 and 90, inclusive.
- flip
- Flip the main area to the other side of the layout.
- pad
- Toggle single stack padding. When only one stack is visible, it will be centered and given as much width/height as it would have if there were more windows. Also supports sending "on" or "off" to not toggle.
- monocle
- Toggle the "monocle" layout. Also supports sending "on" or "off" to not toggle.
- smart-padding [pixels]
- The padding to apply when there is only one window (and no monocle).
- smart-padding off
- Turn off smart padding.
- smart-padding-h [pixels]
- The horizontal (left and right) padding to apply when there is only one window (and no monocle).
- smart-padding-v [pixels]
- The vertical (top and bottom) padding to apply when there is only one window (and no monocle).
- move-split-[up|down|left|right] [percent]
- A different way to think about the main ratio. "move-split-right", for example, will make the main-ratio larger when the main-location is left, smaller when it's right, and is a no op for top and bottom.
All commands can be prefaced with one or both of the following options. Either can be "all". Both set to "all" changes the default.
- --output
- The output (monitor) to apply this setting to.
- --tags
- The tags to apply this setting to.
Commands can also be sent to the executable on startup, separated by commas, as shown below.
riverctl map normal Super LEFT send-layout-cmd filtile "move-split-left 5"
riverctl map normal Super RIGHT send-layout-cmd filtile "move-split-right 5"
riverctl map normal Super Z send-layout-cmd filtile "flip"
riverctl map normal Super C send-layout-cmd filtile "pad"
# Set the default layout generator to be filtile and start it.
riverctl default-layout filtile
# - Smart gaps on the sides of every tag (on the larger monitor), to keep
# single windows from being gigantic.
#
# - A scratch pad on tag 7 with pad (to keep the first window from resizing
# a bunch) and giant gaps for bling.
#
# - Tag 1 usually has a browser, which is usually easier to read when it's on
# the right.
filtile \
--output HDMI-A-1 smart-padding-h 384, \
--tags $((1 << 6)) pad on, \
--tags $((1 << 6)) view-padding 64, \
--tags $((1 << 6)) outer-padding 64, \
--output HDMI-A-1 --tags 1 main-location right &
You can install from source by cloning the repo and running:
cargo install
Or, if you run NixOS, you can do something like the following:
{
inputs = {
filtile.url = "github:pkulak/filtile";
};
outputs =
inputs@{ self
, nixpkgs-unstable
, ...
}:
let
overlays = {
unstable = _: prev: {
unstable = import nixpkgs-unstable
{
inherit (prev.stdenv) system;
} // {
filtile = inputs.filtile.packages.${prev.stdenv.system}.filtile;
};
};
};
in
{
<snip>;
packages = with pkgs; [
unstable.filtile
];
}
}