A sleek Übersicht widget that displays your LeetCode submission calendar and current streak with a clean contribution graph design. Keep your coding consistency visible on your desktop and stay motivated with your daily progress.
- 📅 Submission Calendar: Visual representation of your daily LeetCode submissions over the past year
- 🔥 Current Streak: Shows your current consecutive submission streak to keep you motivated
- 🎨 Clean Design: Familiar contribution graph aesthetics with color-coded activity levels
- ⚡ Auto-refresh: Updates every hour to keep your stats current
- 🌙 Dark Theme: Matches macOS dark mode perfectly
- 💪 Daily Motivation: Having your progress visible on your desktop encourages consistent practice
- Install Übersicht if you haven't already
- Download the
leetcode.jsxfile from this repository - Move the
leetcode.jsxfile to your Übersicht widgets folder (usually~/Library/Application Support/Übersicht/widgets/) - Configure your LeetCode username (see Configuration section below)
Open leetcode.jsx and modify the following settings at the top of the file:
// --- USER SETTINGS ---
const leetcodeUsername = "your-username-here"; // Replace with your actual LeetCode username
// Widget dimensions and position
const widgetWidth = 317;
const widgetHeight = 125;
const widgetLeft = 15;
const widgetTop = 335; // Adjust position on your desktopwidgetLeft: Distance from the left edge of your screen (in pixels)widgetTop: Distance from the top edge of your screen (in pixels)widgetWidth&widgetHeight: Widget dimensions (modify if needed)
This widget uses the LeetCode Stats API to fetch your submission data. The API has rate limits, so the widget refreshes every hour to avoid hitting these limits.
- The widget refreshes every hour (3,600,000 milliseconds)
- If you encounter rate limit errors, the widget will display an error message and retry on the next refresh cycle
The calendar uses a clean color-coding system:
- Dark Gray (
#1a1a1a): No submissions - Dark Green (
#0e4429): 1 submission - Medium Green (
#006d32): 2 submissions - Bright Green (
#26a641): 3+ submissions - Brightest Green (
#39d353): High activity
- Verify your LeetCode username is correct and publicly accessible
- Check the browser console in Übersicht for error messages
- Ensure your LeetCode profile is public (the API cannot access private profiles)
- Wait a few hours for the rate limit to reset
- The widget will automatically retry on the next refresh cycle
- Adjust
widgetLeftandwidgetTopvalues in the configuration section - Restart Übersicht after making changes
Modify the getColor() function to use different colors:
const getColor = (count) => {
if (count === 0) return "#your-color";
// ... customize other levels
};Change the refreshFrequency value (in milliseconds):
export const refreshFrequency = 3600000; // 1 hour = 3,600,000msNote: Don't set this too low to avoid hitting API rate limits.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- Übersicht for the desktop widget framework
- LeetCode Stats API for providing the data
If you encounter any issues or have questions:
- Check the Issues page for similar problems
- Create a new issue with detailed information about your problem
- Include your macOS version and Übersicht version
⭐ If you find this widget useful, please consider giving it a star!
