Skip to content

Nix should update window title for long running operations #1

Description

@deftdawg

Is your feature request related to a problem?

nix runs can often take a long time particularly when derivations are being built from source, output streams can be very long and it's not easy to see what derivations is currently being worked on with so much output moving quickly.

Proposed solution

The proposed solution would be to have nix send terminal title updates... In bash this can be done with a function such as this:

function title() {
  echo -ne "\e]0;"
  echo -n "$@"
  echo -ne "\a"
}
title "new window title value"

Nix should update the title with what "phase" it is doing and then update for each derivation it needs to build from source.

It should do so in the format of "nix: (what it's doing)"

i.e. a run's title changes might look like this:

  • nix: unpacking 1 channels
  • nix: building the system configuration...
  • nix: building: check-sshd-config ...
    (^- when nix would typically print "building '/nix/store/m71hvm1ls8jwxw8kssww6v8j41jrj0jq-check-sshd-config.drv'...", we could shorten it to remove /nix/store/, the hash and the .drv suffix)
  • nix: building: ensure-all-wrappers-paths-exist ...
    (^- similarly for "building '/nix/store/yvm4w0izw1ham0w1p1ab9pvi1yqzd41b-ensure-all-wrappers-paths-exist.drv'...")
  • nix: done
    or
  • nix: error (status: 1)

Think hard about the best approach to make a elegant flexible minimal code solution.

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions