Skip to content

feat: add --watch/-w flag for live system monitoring dashboard#2478

Open
h4sht wants to merge 1 commit into
fastfetch-cli:devfrom
h4sht:feat/watch-mode
Open

feat: add --watch/-w flag for live system monitoring dashboard#2478
h4sht wants to merge 1 commit into
fastfetch-cli:devfrom
h4sht:feat/watch-mode

Conversation

@h4sht

@h4sht h4sht commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a --watch mode that turns fastfetch into a live-updating system monitor — perfect for keeping an eye on your system in real-time.

🎬 Demo

# Watch with default 2-second interval
fastfetch --watch

# Watch with custom 1-second interval
fastfetch --watch 1000

# Short flag
fastfetch -w 500

✨ Features

📸 Screenshot description

When running fastfetch --watch, the terminal enters a full-screen alternate buffer with:

  • A highlighted status bar at the top
  • Your normal fastfetch output below
  • Auto-refreshing at the configured interval
  • Clean exit with Ctrl+C

🔧 Implementation

  • Added printWatchHeader() function using existing ffTimeToShortStr() / ffTimeGetNow() for cross-platform time formatting
  • --watch flag in parseCommand() maps to dynamicInterval internally
  • Iteration counter and header printed after each \e[H cursor-home in the main loop

Files changed

  • src/fastfetch.c: Added printWatchHeader(), --watch/-w parsing, iteration counter

Adds a --watch mode that turns fastfetch into a live-updating
system monitor. Features:
- --watch [interval_ms] flag (default 2000ms, short flag -w)
- Reverse-video header bar with timestamp, iteration count,
  and interval display
- Clean alternate buffer mode with Ctrl+C exit hint
- Uses existing --dynamic-interval infrastructure internally

Example: fastfetch --watch 1000
@CarterLi

Copy link
Copy Markdown
Member
image

This doesn't seem correct to me.

In addition, the --watch flag basically does the same thing with --dynamic-interval, I think keeping one of them is enough.

Thank you and your AI agent for other PRs BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants