mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
flox format
This commit is contained in:
parent
2bd2ca7619
commit
a28f02c767
1 changed files with 14 additions and 5 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# ~/Documents/nix-config/home-manager/home.nix
|
||||
{ config, pkgs, lib, hmLib, ... }:
|
||||
|
||||
let
|
||||
|
|
@ -99,13 +100,21 @@ in
|
|||
disabled = false;
|
||||
};
|
||||
|
||||
env_var.current_user_display = {
|
||||
variable = "USER";
|
||||
format = "[USER: $env_value] ";
|
||||
disabled = false;
|
||||
custom.flox_indicator = {
|
||||
description = "Indicates active Flox environment";
|
||||
# This command will ONLY run if 'when' is true.
|
||||
# It outputs the desired string with a trailing space.
|
||||
# echo -n prevents adding a newline character at the end of the string.
|
||||
command = ''echo -n "via ❄️ $FLOX_PROMPT_ENVIRONMENTS "'';
|
||||
# The 'when' clause is the primary controller.
|
||||
# If this shell command returns a non-zero exit code (false),
|
||||
# the module (command and format) is skipped.
|
||||
when = ''test -n "$FLOX_PROMPT_ENVIRONMENTS"'';
|
||||
format = "$output"; # Takes the output of the command.
|
||||
shell = ["bash" "-c"];
|
||||
};
|
||||
|
||||
format = ''$directory $git_branch $conda$env_var_current_user_display$nix_shell$cmd_duration$status$character'';
|
||||
format = ''$directory $git_branch $conda$custom.flox_indicator$nix_shell$cmd_duration$status$character'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue