dotfiles/hm/prompt/default.nix

40 lines
831 B
Nix
Raw Normal View History

2024-12-15 00:29:51 +01:00
{
pkgs,
lib,
config,
...
}:
2024-01-11 23:54:03 +01:00
{
config = lib.mkIf config.programs.less.enable {
programs.powerline-go = {
enable = true;
2024-12-15 00:29:51 +01:00
modules = [
"user"
"host"
"venv"
"cwd"
"perms"
"nix-shell"
"git"
];
modulesRight = [
"jobs"
"exit"
"duration"
];
2024-01-11 23:54:03 +01:00
settings = {
colorize-hostname = true;
2024-06-08 19:35:21 +02:00
hostname-only-if-ssh = true;
2024-01-11 23:54:03 +01:00
max-width = 25;
cwd-max-dir-size = 10;
duration = "$( test -n \"$__TIMER\" && echo $(( $EPOCHREALTIME - $\{__TIMER:-EPOCHREALTIME})) || echo 0 )";
# UPST Implement this properly in home-manager, would allow for bash support
};
extraUpdatePS1 = ''
unset __TIMER
echo -en "\033]0; $USER@$HOST $PWD\007"
'';
};
};
}