# Copy to ~/.config/pi-opener/config.yaml
#
# Config is intentionally small: opener map + optional wrapperCommand.
#
# Placeholders in opener commands:
#   %p  file path
#   %l  line number (0 if omitted — so `%p:%l` never ends with a bare `:`)
#   %c  column (0 if omitted)
# If %p is omitted, the path is appended automatically.
#
# wrapperCommand placeholders (when customizing the launch wrapper):
#   %c  full opener command as one shell-quoted string
#   %@  splice opener argv as separate args

# How terminal openers are launched (default: herdr when available).
# wrapperCommand: herdr
# wrapperCommand: none
# wrapperCommand: "tmux split-window -h %c"
# wrapperCommand: ["wezterm", "cli", "split-pane", "--", "%@"]
#
# Herdr split direction / pane reuse are built-in (right split, reuse last
# editor pane). To change split behavior, use a custom wrapperCommand instead
# of herdr-specific config keys — e.g. down split with tmux:
#   wrapperCommand: "tmux split-window -v %c"
# Or always open a fresh pane (no reuse) by forcing a new terminal each time:
#   wrapperCommand: ["ghostty", "-e", "%c"]

wrapperCommand: herdr

opener:
  # Default code editor (overrides $EDITOR)
  code: nano %p
  # code: nvim +%l %p
  # code: bunx druk %p:%l

  # Directories — separate from code so you can omit %l
  # Default when unset: platform opener (xdg-open / open)
  dir: xdg-open %p
  # dir: bunx druk %p

  # Per-extension openers (dot optional: pdf == .pdf)
  pdf: xdg-open %p
  png: xdg-open %p
  md: glow -p %p
