Skip to content

Commit 7193d49

Browse files
authored
Update OS Age calculation method in config.jsonc
1 parent 1320aaf commit 7193d49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fastfetch/config.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"type": "command",
3232
"key": "  OS Age ",
3333
"keyColor": "31",
34-
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); days_with_addition=$((days_difference + 422)); echo $days_with_addition days"
34+
"text": "log_date=$(head -n 1 /var/log/pacman.log | cut -d ' ' -f 1 | tr -d '[]'); install_secs=$(date -d \"${log_date/T/ }\" +%s); current_secs=$(date +%s); echo $(( (current_secs - install_secs) / 86400 )) days"
3535
},
3636
{
3737
"type": "wm",

0 commit comments

Comments
 (0)