Skip to content

widget: command / shell oneliner (generic subprocess fetcher) #20

Closed

Description

@unhappychoice

Built-in escape-hatch fetcher — inspired by wtfutil's CmdRunner and fastfetch's command module. Covers "I want a custom widget but don't want to write a plugin" cases.

Scope

  • Run an arbitrary shell command, capture stdout
  • Config:
    [[widget]]
    fetcher = \"command\"
    command = \"git rev-parse --abbrev-ref HEAD\"
    render = \"text\"
    format = \"on {stdout}\"
    refresh_interval = 60
  • Output stdout either as raw lines (render = text) or as key/value per line (render = list)
  • Shares subprocess execution path with the plugin protocol (core: Plugin protocol (subprocess-based I/O spec) #5)

Depends on

Covers

~70% of custom widget needs without requiring a plugin executable on disk.

Activity

  1. added this to the v1.0 milestone on Apr 21, 2026
  2. unhappychoice commented on Apr 21, 2026

    @unhappychoice
    OwnerAuthor

    ⚠️ Blocked by #27 (per-directory config trust model). The command widget executes arbitrary shell — cannot ship before trust model exists.

  3. unhappychoice commented on Apr 21, 2026

    @unhappychoice
    OwnerAuthor

    Not doing

    Dropping the command widget along with #5 (plugin).

    Why together: once plugins are out, keeping a generic "run shell, show stdout" widget re-adds an exec path — just scoped to global config. That keeps a trust-model footnote alive (local vs global rules diverge) and leaves footguns (command = "sudo ..." firing on every cd) without meaningful product value.

    Product stance: splashboard competes on per-dir curated splash, not on "embed arbitrary shell output." neofetch / fastfetch / starship already own shell-output rendering. splashboard's differentiator is the auto-render on cd, and that differentiator works best when the local config is purely declarative.

    Net effect on threat model: exec class is empty. The remaining trust gate is just "URL is config-provided" (rss / calendar). Everything else becomes Safe.

    Closing. Same deal as #5: if a hard use case comes up, add a purpose-built widget via PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    widget

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions