# Space Lists for Herdr **Organize your spaces into lists. Lists, pins and "Open in file manager" for the Spaces sidebar of [Herdr](https://herdr.dev).** More about it, with the video: **[alexandrostzoumas.com/tools/herdr](https://alexandrostzoumas.com/tools/herdr/)**. In the Herdr gallery: **[herdr.dev/gallery](https://herdr.dev/gallery/?type=mods)**, then search for *Space Lists*. ![Space Lists: pin a space, add a space to a list, open a space's folder in the file manager](media/demo.gif) ## The problem Herdr gives you one space per project, per worktree, per client. That is the point of Herdr, and it means the Spaces sidebar grows fast. After a few weeks it is one long, flat list: - **You scan to find a space.** 15 to 30 spaces in one column, with no structure, and the order changes when you add new ones. - **The important spaces get lost.** The two or three projects you use all day are mixed in with old experiments and one-off worktrees. - **Getting to a project's files takes a detour.** To see a space's folder in your file manager, you go to a terminal and type `xdg-open .`, or you search for the path. ## What Space Lists does It replaces Herdr's Spaces sidebar with the same sidebar plus three things: | | Feature | How | |---|---|---| | πŸ“ | **Lists**: put spaces in named groups, like folders. Fold a list to hide it. | Right-click a space β†’ **Add to List β€Ί** β†’ choose a list, or **New list…**. Or drag the space onto a list. | | πŸ“Œ | **Pins**: keep the spaces you use all day at the top. | Right-click a space β†’ **Pin space**. Or drag the space onto **Pinned**. | | πŸ—‚οΈ | **Open in file manager**: open the space's current folder in Nautilus, Finder or Explorer. | Right-click a space β†’ **Open in file manager**. | All of Herdr's own sidebar still works: colored avatars, git branch and ahead/behind, worktrees under their repo, groups per machine, drag to reorder, Rename, worktree actions and Close. ## How to use it | To do this | Do this | |---|---| | Make a list | Click the **New list** button (folder with a plus) next to `+` in the Spaces header, or right-click empty space in the list β†’ **New list…** | | Put a space in a list | Right-click the space β†’ **Add to List β€Ί** β†’ the list. Or drag the space onto the list's name, or onto any space that is already in that list. | | Move a space to a different list | Right-click β†’ **Move to List β€Ί** β†’ the other list | | Take a space out of its list | Right-click β†’ **Remove from "list name"**. Or drag it onto a space in the main list. | | Pin or unpin a space | Right-click β†’ **Pin space** / **Unpin space**. Or drag it onto **Pinned**. | | Fold or open a list | Click the list's name. A folded list still shows the space you are in, for example after you click an agent in that space. | | Rename or delete a list | Right-click the list's name. When you delete a list, its spaces go back to the main list. They do not close. | | Open a space's folder | Right-click β†’ **Open in file manager** (spaces on this computer only) | The sidebar shows **Pinned** first, then your lists, then all other spaces. Herdr saves your pins and lists, so they stay after a restart. ## Install ### With your agent (the Herdr way) In a terminal inside Herdr, give your coding agent this prompt. Use the copy button at the right of the box: ```text Read ~/.config/herdr-app/AGENTS.md, then add this mod: https://github.com/AlexJoom/herdr-space-lists ``` The agent reads [RECIPE.md](RECIPE.md) and all the files, copies the mod, and points your layout's Spaces block at it. ### By hand 1. Copy the mod into Herdr: ```sh git clone https://github.com/AlexJoom/herdr-space-lists cp -r herdr-space-lists/mods/space-groups ~/.config/herdr-app/mods/ herdr-app check ~/.config/herdr-app/mods/space-groups ``` 2. Herdr's own layouts are read-only, so use a layout of your own. If you do not have one yet, make a copy of the default layout (this also switches to it): ```sh herdr-app do layout.clone '{"name":"main","as":"my-layout"}' ``` 3. In `~/.config/herdr-app/layouts/my-layout.json`, find the block with `"id": "spaces"` and change its mod: ```json { "id": "spaces", "type": "block", "content": { "mod": "space-groups" } } ``` Herdr reloads on save. Run `herdr-app status` to see errors, if there are any. ### Remove it Change `"mod": "space-groups"` back to `"mod": "spaces"` in your layout, or switch back to Herdr's layout with `herdr-app do layout.switch '{"name":"main"}'`. Then delete `~/.config/herdr-app/mods/space-groups/`. ## Details - **Tested with:** herdr-app 0.1.18 on Linux (GNOME). The macOS and Windows file manager commands (`open`, `explorer`) are included but not tested yet. - **Earlier name:** this mod was first called Space Groups. Its folder, its id in your layout and its saved keys still use `space-groups`, so nothing changes for an existing install. - **Where your lists are saved:** in Herdr's shared state (`~/.config/herdr-app/shared.json`), under the keys `space-groups.pins`, `space-groups.folders`, `space-groups.assign` and `space-groups.folded`. When you close a space, the mod removes it from its pin and its list. - **What it runs:** `git` (read-only, for the branch shown next to each space, as Herdr's own sidebar does), `hc machine ls` (for remote machines, as Herdr's sidebar does), and, only when you click **Open in file manager**, `gio open` or `xdg-open` on Linux, `open` on macOS, or `explorer` on Windows. It makes no network requests. - **Remote spaces:** lists and pins work for spaces on any machine. **Open in file manager** shows only for spaces on this computer, because the folder of a remote space is not on your disk. ### Files ``` mods/space-groups/ main.js the sidebar (Herdr's spaces mod, plus Pinned, the lists and drag targets) menu.js the right-click menus and the list name dialog store.js pins, lists and assignments in shared state; Open in file manager mod.json icons/ Lucide icons (ISC license) RECIPE.md the brief: enough for an agent to build or install the mod demo/ the source of the README animation (made with the Stageshow kit) ``` ## Credits and license Space Lists starts from Herdr's own `spaces`, `menu` and `prompt` mods (herdr-app 0.1.18, Apache-2.0). See [NOTICE](NOTICE). The icons are from [Lucide](https://lucide.dev) (ISC). Licensed under the [Apache License 2.0](LICENSE). This is a community mod. The Herdr team does not review or support it.