How does CachyOS' Konsole display the time it took a command to execute?

Please excuse the noob question, never done any terminal customisation before.

In CachyOS running at least any pacman command will finish up by displaying the time it took to execute, say

~ 15m 34s

I would like to replicate this on other non-Cachy systems.

I tried just putting the cachyos-config.fish into a terminal running Fish on a vanilla Arch, which reproduced most of what I recognise from Cachy except for the timer.

TL;DR what is used to generate the time a command took to execute in Cachy?

Thanks.

Hello and welcome back,

I am pretty sure its the done.fish file, ex;

But you can do it non-fish ways ..

There exist things like bash-command-timer-git and bash-timer in the AUR (rwference their guides for implementation).

Personally I found I could do with a little less and avoid the AUR by using only bash-preexec and the following in my .bashrc;

# bash-preexec is (not!) needed for the command timer # requires `bash-preexec`
[[ -f /usr/share/bash-preexec/bash-preexec.sh ]] && source /usr/share/bash-preexec/bash-preexec.sh

# bash-preexec setup for time of execution and catch for end
preexec() { printf "%*s\n" ${COLUMNS} "↓ [ $(date +%c) ] "; }
precmd() { local EXIT="$?"; printf "%*s\n" ${COLUMNS} "↑ [ $(date +%c) ] "; }

Which results in (some empty space deleted here for easier forum view but you may need to horizontal scroll to see the example);

                                                                                                              ↑ [ Thu May 21 20:54:12 2026 ] 
[user@host ~]$ echo "This gives me time of start and finish which tells me when the prompt/command began and when it was ended." 
                                                                                                              ↓ [ Thu May 21 20:55:47 2026 ] 
This gives me time of start and finish which tells me when the prompt/command began and when it was ended.
                                                                                                              ↑ [ Thu May 21 20:55:47 2026 ] 
[user@host ~]$ 

Which is not the same as “time it took to execute” but I prefer this .. when I need the difference I can calculate it or run something specifically with time or similar.

I find that being able to quickly reference when the last time I executed “sync” or similar to be of more use more often than how long that sync took to run. But I can still access that if needed.

Thanks, the alternate timer solutions are good to know.

If I just copy done.fish into the cachyos-fish-config/conf.d on vanilla Arch, should it print the time-took-to-execute after commands? It does not. Fwiw I’m using Xfce4-terminal in XFCE.

The cachyos-fish-config package also has dependencies;

bat  expac  eza  fastfetch  fish  fish-autopair  fish-pure-prompt  fisher  fzf  pkgfile  tealdeer  ttf-fantasque-nerd

So I would guess a few of those are needed for it to work.

Do note that done.fish needs to exist and then also needs to be sourced, like it is in the config.fish file, ex;

## Source from conf.d before our fish config
source /usr/share/cachyos-fish-config/conf.d/done.fish

Alternatively you could copy the entirety of done.fish and put it in the first part of the config instead of sourcing a separate file.

It was those missing dependencies that did it, haha, oops. I’ll mark this solved, ty again.