A lightweight Python application that displays text notifications with smooth fade-in and fade-out animations in a floating window.
It is designed to be centred - a little bit “in your face” for persistent reminders for example, but should disappear quickly enough to not be too much in the way or interrupt you from that thing yo uwere doing.
Like a streaker on the pitch - now you see him, now you don’t quite trust your memory, was he really there? He’s gone!
- Transparent, frameless window display
- Smooth fade-in and fade-out animations
- Configurable display duration and animation timing
- Customizable appearance (font, colors, padding, corner radius)
- Always-on-top window behavior
- Centred screen positioning
Well modern SwiftUI on MacOS doesn’t let you do anything fun like a persistent canvas on top of all othe windows. Always easier to implmenent in other languages like Lua and Python simply because their integration libraries are written in Objective-C which is not deliberatly crippled like Apple’s new toy SwiftUI is essentially an amputee and I feel its neuropathic pain.
- Python 3.x
- PyQt5
- Clone this repository
- Create a Python virtual environment
- Install the required dependencies:
python3 -m venv .
source ./bin/activate
pip install -r requirements.txtThe application reads text from standard input (STDIN) and displays it as a notification.
Example usage:
echo "Hello World!" | python streak.pyAlthough we have a nice shell script to handle the virtual env:
ls -l | streakYou can symlink the shell script to work from wherever you keep your usual CLI scripts:
ln -svrn ./streak ~/binThe following parameters can be adjusted in the script:
DISPLAY_TIME_MS: Duration to show the text (default: 3000ms)FADE_IN_TIME_MS: Fade in duration (default: 1000ms)FADE_OUT_TIME_MS: Fade out duration (default: 2000ms)
FONT_FAMILY: Font to use (default: “Tequila”)FONT_SIZE: Text size (default: 28)BACKGROUND_COLOR: Window background color with opacityTEXT_COLOR: Text colorPADDING_PX: Padding around text (default: 20px)CORNER_RADIUS_PX: Corner rounding (default: 15px)
My stupid Tequila font is here under the SIL Open Font license.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT FTW
- Make the config parameters for display timing and appearance configurable via CLI switches (currently these are vars at the top of the Python script)