Add transparent background mode and HH:MM:SS timer display#66
Open
NoamFav wants to merge 7 commits intoklange:masterfrom
Open
Add transparent background mode and HH:MM:SS timer display#66NoamFav wants to merge 7 commits intoklange:masterfrom
NoamFav wants to merge 7 commits intoklange:masterfrom
Conversation
…tter centering and readability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add transparent background mode and HH:MM:SS timer display
Summary
This PR builds on #65 by @naivecynics, adding an optional transparent background mode to nyancat, upgrading the timer display from seconds to
HH:MM:SSformat, and applying minor code formatting improvements. All changes are backward-compatible, with new behavior activated via command-line flags.Changes
1. Transparent background mode (
-T,--transparent)Implements the transparent background feature originally proposed in #65, allowing nyancat to render without a solid background color.
Implementation:
transparent_bg(default:0)-T/--transparentgetopt_longoptions:usage()documentationBenefit: Enables seamless visual integration with terminals using custom or image-based backgrounds.
2. Enhanced timer: seconds →
HH:MM:SSReplaces the basic seconds counter with a human-readable time format for longer nyan sessions.
Before:
After:
HH:MM:SS)3. Code formatting and cleanup
Minor cosmetic improvements for consistency (no behavioral changes):
animation.c:nyancat.c:Testing
Verified across multiple scenarios:
Command | Expected Behavior | Status -- | -- | -- ./nyancat | Default rendering (unchanged) | ✅ ./nyancat -T | Transparent background + timer | ✅ ./nyancat -n | No counter display | ✅ ./nyancat -T -n | Transparent + no counter | ✅All tests confirm:
HH:MM:SSelapsed timeBackward Compatibility
-TflagCredits
Transparent background feature concept and initial implementation by @naivecynics in #65.