tree-space 0.1.4

A dockable, keyboard-first file manager panel for Wayland/Hyprland
Documentation
# tree-space configuration
#
# Written automatically on first launch. Edit freely - the file is reloaded on
# the next start. Every section and key is optional; anything omitted falls back
# to a default value.

# -- Startup ------------------------------------------------------------------
# Where the panel opens when launched without a path argument. One of:
#   "home"  - always open the home directory
#   "last"  - reopen the last-used directory
#   "bookmarks" - open a panel showing the bookmarks view (the default)
#   { path = "/some/dir" }  - always open that directory (a leading ~ = $HOME)
startup = "bookmarks"

# -- Panel --------------------------------------------------------------------
[panel]
side = "left"        # screen edge to dock to: "left" | "right"
layer = "bottom"     # stacking layer: "background" | "bottom" | "top" | "overlay"
width = 300          # panel width in px (clamped to 160–2000)
margin = 0           # gap from the screen edge in px (clamped to 0–200)
nav_toolbar = false  # show a nav toolbar (up, back, forward) below the path bar

# -- Bookmarks ----------------------------------------------------------------
# Bookmarks are a pane view: a panel opened without a directory shows them as
# suggested places to jump to, and clicking one replaces the view with that
# directory. The list lives in `file` below (created with a single home bookmark
# on first launch) as a compact array of entries; an entry with nested `items` is
# a folder, expanded/collapsed like a tree directory (set `expanded = true` to
# start it open). Each entry can be renamed or removed from its right-click menu,
# and "Add Bookmark" in a directory's menu adds one.
[bookmarks]
file = "bookmarks.toml" # list file, relative to this config (or absolute)

# The hamburger menu shown while the bookmarks view is active. Same item syntax
# as [pane_menu]; pane-level actions (Open Folder, Filter, Split, Back/Forward,
# Collapse, Close Pane) apply. "Up One Level" would be a no-op here, so it is
# left out.
menu = [
    "New Bookmark",
    "New Bookmark Folder",

    "---",
    "Open Folder...",
    "Filter...",
    "Split View",

    "---",
    { action = "Back", shortcut = "Alt+Left" },
    { action = "Forward", shortcut = "Alt+Right" },

    "---",
    "Collapse",
    { action = "Close Pane", shortcut = "Ctrl+w" },
]

# Extra items appended to a bookmark's right-click menu. The rest of that menu is
# inherited from the context menu the bookmarked directory would get in the tree
# (actions run against that directory without opening it), so only the
# bookmark-specific actions live here.
context = [
    "---",
    "Edit Bookmark",
    "Delete Bookmark",
]

# The menu opened by right-clicking the empty area below the bookmarks.
blank = [
    "New Bookmark",
    "New Bookmark Folder",
]

# -- Tree ---------------------------------------------------------------------
[tree]
dirs_first = true     # list directories above files
sort_key = "name"     # primary sort: "name" | "size" | "modified" | "type"
sort_ascending = true # sort ascending (A→Z) rather than descending
show_hidden = false   # shww dotfiles by default
font_size = 13        # row label size in pt (clamped to 6–40)
icon_size = 18        # row icon size in px (clamped to 12–128)
confirm_drop_move = false # ask before a drag-and-drop move (Ctrl+drag copies freely)

# -- Context menus ------------------------------------------------------------
#
# Right-click menus are an ordered list of rules. The first rule whose
# `matches` claims a row provides that row's entire menu; rows no rule claims
# use the two rules below. `matches` accepts "dir", "noext", "ext:NAME",
# "regex:PATTERN", "fallback", and "multi". A "multi" rule applies instead of
# the per-path rules whenever more than one row is selected; its actions and
# custom commands then run over every selected row.
#
# A rule may instead be an include, pulling rules out of separate files so more
# specific rules can be added without editing this file. Write `include = "DIR"`
# (relative to this file, or absolute) in place of `matches`; every *.toml in
# that directory contributes its [[context_menu.rules]] here, in filename order.
# This is how you add rules *before* the "fallback" rule below without touching
# this file:
#
#   [[context_menu.rules]]
#   include = "rules.d"
#
# A missing directory is fine (it just adds nothing); an unparsable drop-in is
# reported and skipped.
#
# Each `items` entry is one of:
#
#   "Open"                                       a built-in action
#   { action = "Cut", shortcut = "Ctrl+x" }      built-in + shortcut/label override
#   { command = "code {path}", label = "Edit" }  a custom command
#   { label = "...", items = [ ... ] }            submenus (which may nest further).
#   "---"                                        a divider
#
# Any item may carry a `shortcut` (GTK accelerator syntax, e.g. "Ctrl+x" or
# "F2"). While the tree is focused it fires that action on the row under the
# keyboard cursor.
#
# Any table item may also carry `hidden = true`: it is not drawn in the menu,
# but its shortcut still fires — handy for binding a key without adding a row.
# A plain-string built-in cannot be hidden; write it as a table instead, e.g.
#   { action = "Up One Level", hidden = true }

# A multi-row selection (two or more rows). This rule wins over the per-path
# rules below whenever more than one row is selected. Actions that only make
# sense for a single row (Open, Rename, Duplicate, ...) are ignored here; the
# ones listed act on every selected row. A custom command runs once per row, in
# visual top-to-bottom order.
[[context_menu.rules]]
matches = ["multi"]
items = [
    { action = "Cut", shortcut = "Ctrl+x" },
    { action = "Copy", shortcut = "Ctrl+c" },

    "---",
    "Copy Path",
    "Copy Relative Path",

    "---",
    "Properties",
    { action = "Move to Trash", shortcut = "Delete" },
    { action = "Delete Permanently", shortcut = "Shift+Delete" },
]

# Directories.
[[context_menu.rules]]
matches = ["dir"]
items = [
    { label = "Open", items = [ 
        { action = "Open", label = "In same panel" },
        { action = "In new panel", label = "In split view" },
        "In opposite panel",
        { action = "Open With...", label = "With..." },
    ]},
    { label = "New", items = [ 
        { action = "New Folder", label = "Folder", shortcut = "Ctrl+Shift+n" },
        { action = "New File", label = "File", shortcut = "Ctrl+n" },
    ]},
    { action = "View Thumbnail", label = "View Thumbnails", shortcut = "Ctrl+t" },

    "---",
    { command = "foot -D {dir}", label = "Open in Terminal" },

    "---",
    { action = "Cut", shortcut = "Ctrl+x" },
    { action = "Copy", shortcut = "Ctrl+c" },
    { action = "Paste", shortcut = "Ctrl+v" },
    { action = "Duplicate", shortcut = "Ctrl+d" },
    { action = "Create Link", shortcut = "Ctrl+Shift+m" },

    "---",
    { action = "Rename", shortcut = "F2" },
    "Copy Path",
    "Copy Relative Path",

    "---",
    "Add Bookmark",
    "Properties",
    { action = "Move to Trash", shortcut = "Delete" },
    { action = "Delete Permanently", shortcut = "Shift+Delete" },
]

# Files, and anything else not matched above.
[[context_menu.rules]]
matches = ["fallback"]
items = [
    { label = "Open", items = [ 
        { action = "Open", label = "With Default" },
        { action = "Open With...", label = "With..." },
    ]},  
    { action = "View Thumbnail", shortcut = "Ctrl+t" },

    "---",
    { action = "Cut", shortcut = "Ctrl+x" },
    { action = "Copy", shortcut = "Ctrl+c" },
    { action = "Paste", shortcut = "Ctrl+v" },
    { action = "Duplicate", shortcut = "Ctrl+d" },
    { action = "Create Link", shortcut = "Ctrl+Shift+m" },

    "---",
    { action = "Rename", shortcut = "F2" },
    "Copy Path",
    "Copy Relative Path",

    "---",
    "Properties",
    { action = "Move to Trash", shortcut = "Delete" },
    { action = "Delete Permanently", shortcut = "Shift+Delete" },
]

# The hamburger menu in each pane's toolbar. Unlike the context menus above
# these items act on the whole pane (open a folder, change the sort order, close
# the pane, ...), not on one row. Same item syntax as the context menus:
# builtin names as plain strings, `{ action = "...", shortcut = "..." }` tables,
# `{ command = "...", label = "..." }` custom commands, or
# `{ label = "...", items = [ ... ] }` submenus (which may nest further).
[pane_menu]
items = [
    "Open Folder...",
    "Filter...",
    { action = "Split View", shortcut = "Ctrl+s" },

    "---",
    { action = "Back", shortcut = "Alt+Left" },
    { action = "Forward", shortcut = "Alt+Right" },
    { action = "Up One Level", shortcut = "Alt+Up" },

    "---",
    { action = "Toggle Hidden Files", shortcut = "Ctrl+h" },
    { action = "Sort by Name", shortcut = "Ctrl+1" },
    { action = "Sort by Size", shortcut = "Ctrl+2" },
    { action = "Sort by Modified", shortcut = "Ctrl+3" },
    { action = "Sort by Type", shortcut = "Ctrl+4" },
    { action = "Reverse Sort Order", shortcut = "Ctrl+Shift+r" },

    "---",
    "Collapse",
    { action = "Bookmarks", shortcut = "Ctrl+b" },
    { action = "Close Pane", shortcut = "Ctrl+w" },
]