Commit Graph

8 Commits

Author SHA1 Message Date
Steven Allen
32bf61c51e nixos/foot: only modify the prompt when running inside foot
Without this, these integration scripts will mess with the prompt even
when not running a shell inside of foot. This can break:

1. Terminals that don't understand these sequences (e.g., gnome-terminal
and likely other vte based terminals).
2. Anything that tries to parse the prompt (Emacs packages like
bash-completion).

This patch relies on the TERM variable (against upstream's
recommendation [1]) because:

1. Only Fish [2] has built-in support for querying things like
XTVERSION. Querying terminal features manually is non-trivial and
requires writing to STDOUT, which I'd like to avoid.

2. Even in Fish, this XTVERSION may only be queried after the first
prompt has been displayed ([2]), which is too late.

This patch does not explicitly check if the terminal is interactive as
the modified files are only sourced by interactive shells anyway.

[1]: https://codeberg.org/dnkl/foot#programmatically-checking-if-running-in-foot
[2]: https://fishshell.com/docs/current/cmds/status.html#status-terminal

fixes #374613
2026-06-23 13:49:26 -07:00
Colin Hooper
64a6456f52 nixos/foot: fix zsh prompt marker precmd function being overwritten by the end pipe marker precmd function 2026-05-22 16:20:20 +01:00
sternenseemann
d3dc9d62fc nixos/foot: move mkIf outside .source option
Should resolve https://github.com/NixOS/nixpkgs/pull/493708#discussion_r2935397639
2026-03-14 16:43:46 +01:00
Elec3137
7124376669 nixos/foot: use cfg.package instead of hardcoding pkgs.foot 2026-03-12 07:08:26 -07:00
Elec3137
30c3ae54e1 nixos/foot: add option xdg.serverAutostart 2026-03-12 07:08:01 -07:00
nyukuru
2c7a56cee9 nixos/foot: fix zshrc
Fixes error 'command not found: add-zsh-hook'
2025-03-28 00:56:55 -04:00
linsui
d572c865ad nixos/foot: fix bash script 2024-09-03 02:27:22 +08:00
linsui
89f10dc1a8 nixos/foot: init 2024-08-29 01:37:27 +08:00