Skip to content

TitaniteScale/archfetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

archfetch

A custom fastfetch module that displays when the last Arch Linux system update was run.

Description

This module checks the pacman log (/var/log/pacman.log) to find the last time a full system upgrade was performed (typically via yay -Syu or sudo pacman -Syu). It then displays how long ago the update occurred with color-coded output to indicate freshness.

Color Scheme

The output color changes based on how recently the system was updated:

  • Green: Updated today or yesterday (fresh!)
  • Yellow: Updated 2-3 days ago (getting old)
  • Orange: Updated 4-7 days ago (should update soon)
  • Red: Updated more than 7 days ago (needs update!)

Usage

Standalone

Run the script directly:

bash ~/.config/fastfetch/archfetch/main.sh

With fastfetch

Add to your config.jsonc modules array:

{
  "type": "command",
  "key": "󰮯",
  "keyIcon": "",
  "text": "/home/jake/.config/fastfetch/archfetch/main.sh"
}

Or use command-raw for more control:

{
  "type": "command-raw",
  "key": "󰮯 Last Update",
  "text": "/home/jake/.config/fastfetch/archfetch/main.sh"
}

Requirements

  • Arch Linux or Arch-based distribution
  • Access to /var/log/pacman.log
  • Standard Unix utilities: grep, date, tail

How It Works

  1. Reads the pacman log file
  2. Searches for log entries indicating a full system upgrade
  3. Extracts the timestamp of the most recent upgrade
  4. Calculates how many days have passed since then
  5. Outputs a color-coded message based on the age of the update

Example Output

Last Update: Today
Last Update: Yesterday
Last Update: 5 days ago
Last Update: 14 days ago

Each with appropriate coloring (green, yellow, orange, or red).

About

Fastfetch utility to let you know when you last ran yay -Syu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages