diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-06-19 01:05:22 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-06-19 01:05:22 +0200 |
| commit | f3e8611d400d6b6fedc9a73ce56f5167c233fd13 (patch) | |
| tree | 312e47251a25d02bb2eb03969aa03401b7cede88 /conf.d | |
| parent | d2c62d9299f647ae271f197915d3105067362b0a (diff) | |
| download | c-star-f3e8611d400d6b6fedc9a73ce56f5167c233fd13.tar.gz | |
Remove unused --on-variable hooks
Diffstat (limited to 'conf.d')
| -rw-r--r-- | conf.d/cstar.fish | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/conf.d/cstar.fish b/conf.d/cstar.fish index 58e123b..8e4a44d 100644 --- a/conf.d/cstar.fish +++ b/conf.d/cstar.fish @@ -23,11 +23,11 @@ function cstar_colorize set -g "$argv[1]" "$(set_color -b $bg $fg) $argv[2] $(set_color normal)" end -function cstar_command_time --on-event fish_postexec --on-variable cstar_command_time_bg --on-variable cstar_command_time_fg +function cstar_command_time --on-event fish_postexec cstar_colorize cstar_command_time $CMD_DURATION'ms' $cstar_command_time_bg $cstar_command_time_fg end -function cstar_datetime --on-event fish_prompt --on-event fish_postexec --on-variable cstar_date_format --on-variable cstar_datetime_bg --on-variable cstar_datetime_fg +function cstar_datetime --on-event fish_prompt --on-event fish_postexec cstar_colorize cstar_datetime (date "+$cstar_date_format") $cstar_datetime_bg $cstar_datetime_fg end @@ -63,7 +63,7 @@ function cstar_git --on-variable $_cstar_git_async commandline --function repaint end -function cstar_user --on-event fish_prompt --on-variable cstar_user_bg --on-variable cstar_user_fg --on-variable SSH_CONNECTION +function cstar_user --on-event fish_prompt set -l user_string (whoami) if test -n "$SSH_CONNECTION" set -f user_string "$user_string@$(hostname)" @@ -71,7 +71,7 @@ function cstar_user --on-event fish_prompt --on-variable cstar_user_bg --on-vari cstar_colorize cstar_user "$user_string" $cstar_user_bg $cstar_user_fg end -function cstar_user_marker --on-event fish_prompt --on-variable cstar_user_marker_default_bg --on-variable cstar_user_marker_fg +function cstar_user_marker --on-event fish_prompt switch (whoami) case "root" set -g cstar_user_marker_bg red @@ -83,7 +83,7 @@ function cstar_user_marker --on-event fish_prompt --on-variable cstar_user_mark cstar_colorize cstar_user_marker $char $cstar_user_marker_bg $cstar_user_marker_fg end -function cstar_pwd --on-variable PWD --on-event fish_prompt --on-variable cstar_pwd_bg --on-variable cstar_pwd_fg +function cstar_pwd --on-variable PWD --on-event fish_prompt cstar_colorize cstar_pwd (prompt_pwd) $cstar_pwd_bg $cstar_pwd_fg end |