MCPcopy Index your code
hub / github.com/MintyDoggo/miri

github.com/MintyDoggo/miri @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
76 symbols 135 edges 13 files 6 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

miri (modal niri)

A niri extension adding optional tiling layouts, such as Master Stack, similar to hyprland or mangowm

https://github.com/user-attachments/assets/c31b51f0-7328-478a-9061-3b0b2978ae61

Supported Layout Modes | Mode | Status | | ------------ | ------------- | | Master | 🟡 In Progress (usable)| | Grid | 📋 Planned | | Hybrid | 📋 Planned | | Drag and Pan | 📋 Planned | | Dwindle | ❌ Not Planned |

Also planned: a DMS bar plugin to display the current workspace layout mode

[!WARNING] This project is in development. There will be bugs! Master layout is usable, but rough edges remain. Issues and PRs welcome!

Installation

Run the install script from the latest release and follow the instructions

curl -fsSL https://github.com/MintyDoggo/miri/releases/latest/download/install.sh \
  -o /tmp/miri-install.sh \
  && sh /tmp/miri-install.sh \
  && rm /tmp/miri-install.sh

Once installed, the miri command will be available. Be sure ~/.local/bin is in your PATH

[!NOTE] The installer script also has an uninstall option, so feel free to try it out commitment free!

Keybinds setup

All miri actions can be spawned via miri action <action-name>. You can list all available actions by running miri action. To add an action to a keybind, edit your niri config and put the spawn command for the keybind you want Example:

Mod+S { spawn "miri" "action" "set-focused-workspace-mode" "scroll"; }
Mod+M { spawn "miri" "action" "set-focused-workspace-mode" "master"; }
Mod+C { spawn "miri" "action" "cycle-focused-workspace-mode"; }

Overrides setup

[!IMPORTANT] Skip this section if you only use the miri CLI. Required if you're using the miri service

Checking the current list of overrides is the same as is for actions: miri override will display all of them

In your niri config (~/.config/niri/config.kdl), add or replace these keybinds with their equivalent miri override: - move-column-left - move-column-right - move-column-to-first - move-column-to-last - move-column-to-monitor-up - move-column-to-monitor-down - move-column-to-monitor-left - move-column-to-monitor-right - move-column-to-workspace-up - move-column-to-workspace-down - move-column-to-workspace

Example of my niri configuration with miri overrides:

Mod+Shift+Left { spawn "miri" "override" "move-column-left"; }                    // { move-column-left; }
Mod+Shift+Right { spawn "miri" "override" "move-column-right"; }                  // { move-column-right; }
Mod+Shift+Home { spawn "miri" "override" "move-column-to-first"; }                // { move-column-to-first; }
Mod+Shift+End { spawn "miri" "override" "move-column-to-last"; }                  // { move-column-to-last; }
Mod+Ctrl+Shift+WheelScrollUp { spawn "miri" "override" "move-column-left"; }      // { move-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { spawn "miri" "override" "move-column-right"; }   // { move-column-right; }
Mod+Ctrl+WheelScrollLeft { spawn "miri" "override" "move-column-left"; }          // { move-column-left; }
Mod+Ctrl+WheelScrollRight { spawn "miri" "override" "move-column-right"; }        // { move-column-right; }
Mod+Shift+Ctrl+Up { spawn "miri" "override" "move-column-to-monitor-up"; }        // { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Down { spawn "miri" "override" "move-column-to-monitor-down"; }    // { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Left { spawn "miri" "override" "move-column-to-monitor-left"; }    // { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Right { spawn "miri" "override" "move-column-to-monitor-right"; }  // { move-column-to-monitor-right; }
Mod+Shift+1 { spawn "miri" "override" "move-column-to-workspace" "1"; }           // { move-column-to-workspace 1; }
Mod+Shift+2 { spawn "miri" "override" "move-column-to-workspace" "2"; }           // { move-column-to-workspace 2; }
// ... etc                                                                        // { move-column-to-workspace <index>; }
Mod+Ctrl+I { spawn "miri" "override" "move-column-to-workspace-up"; }             // { move-column-to-workspace-up; }
Mod+Ctrl+U { spawn "miri" "override" "move-column-to-workspace-down"; }           // { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { spawn "miri" "override" "move-column-to-workspace-down"; } // { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { spawn "miri" "override" "move-column-to-workspace-up"; }     // { move-column-to-workspace-up; }

[!NOTE] In the case that the miri service is not running or something goes wrong, miri will fallback on executing the niri action normally. This ensures your config always works as expected as long as miri is installed

Current version supported is v26.04. Will likely work on niri-git but it is currently untested

You're now all setup! Continue reading for further configuration

Configuration

Miri can be configured though ~/.config/miri/config.toml. These options are not finalized and will likely change, but if you are interested, here is the current configuration list:

[global]
# Default mode for new workspaces: "master" or "scroll"
default_workspace_mode = "master"

# Settings for the master layout mode
[master]
# Width of the master column (0-100)
column_width_percentage = 50.0
# If true, single windows take full width
maximize_single_window = true

# Settings for the scroll layout mode
[scroll]
# If true, focus stays on the current window when new windows open
maintain_focus_on_new_window = false

Misc

ASCII art for installer

╔═══════-□×╗╔═════-□×╗    ╔══════-□×╗╔══════-□×╗
║          ║╚════════╝    ║>_ miri  ║║>_       ║
║          ║╔═════-□×╗    ╚═════════╝╚═════════╝
║          ║╚════════╝    ╔══════-□×╗╔══════-□×╗
║>_ miri   ║╔═════-□×╗    ║>_       ║║>_       ║
╚══════════╝╚════════╝    ╚═════════╝╚═════════╝

Extension points exported contracts — how you extend this code

CliRunner (Interface)
(no doc) [4 implementers]
src/main.rs
CliRunner (Interface)
(no doc) [3 implementers]
src/service.rs

Core symbols most depended-on inside this repo

send
called by 23
src/niri_socket.rs
passthrough_action
called by 22
src/miri_overrides.rs
get_focused_workspace
called by 8
src/service_state.rs
send_command_to_miri_service
called by 4
src/ipc.rs
miri_socket_path
called by 3
src/ipc.rs
get_focused_window
called by 3
src/service_state.rs
handle_workspace_gain_window
called by 3
src/layout/handler.rs
handle_workspace_lose_window
called by 3
src/layout/handler.rs

Shape

Function 27
Method 24
Class 14
Enum 9
Interface 2

Languages

Rust100%

Modules by API surface

src/ipc.rs16 symbols
src/service_state.rs13 symbols
src/config.rs10 symbols
src/service.rs7 symbols
src/niri_ipc_utils.rs6 symbols
src/miri_socket.rs5 symbols
src/niri_socket.rs4 symbols
src/miri_overrides.rs4 symbols
src/layout/master.rs4 symbols
src/main.rs3 symbols
src/layout/handler.rs3 symbols
src/layout/scroll.rs1 symbols

For agents

$ claude mcp add miri \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page