Skip to content
/ InTime Public

Beautiful countdown timer widget for Hyprland inspired by 'In Time' movie - Dynamic colors, productivity focused, aesthetic desktop customization

License

Notifications You must be signed in to change notification settings

mathis0/InTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⏱️ InTime Widget

Your time is running out. Make every second count.

A Hyprland countdown widget inspired by the film "In Time" (2011)
where time is currency and every second matters.

GitHub stars GitHub forks GitHub issues GitHub last commit License: MIT Platform: Linux Hyprland Python 3.10+ GTK4

Time Is Money Every Second Counts


πŸŽ₯ Demo

InTime Widget Demo

InTime Widget in action - showcasing all display modes, visual effects, and position presets


🎬 The Concept

In the dystopian film "In Time" (2011), people stop aging at 25, but a glowing green countdown appears on their arm. When it hits zero, they die. Time becomes the ultimate currency - literally buying and selling years, hours, minutes.

InTime Widget brings this visceral time-awareness to your desktop. Unlike boring system clocks, InTime makes you feel time passing, creating a constant reminder that every second counts.

Perfect for:

  • 🎯 Deadline Warriors - Visual countdown with progressive urgency effects
  • 🧘 Focus Sessions - Pomodoro-style time tracking with purpose
  • ⚑ Time Hackers - Constant awareness that time is your most valuable resource
  • 🎨 Aesthetic Lovers - Beautiful green glow effects inspired by the film

✨ Features

πŸ• Four Display Modes

⏰ Clock Mode

Standard time display with seconds precision

20:45:33

⏳ Countdown Mode

Race against time with custom duration

00:29:47

πŸŒ™ Midnight Mode

Countdown to tomorrow

03:14:27

πŸ’€ Deadline Mode

Horror-style countdown with urgency effects

00:05:43

Gets more intense as time runs out

🎨 Visual Styles

  • Normal - Clean, bold monospace (like the movie's bio-clocks)
  • Lightbulb - 3 Body Problem-inspired particle glow effect (15 layers)
  • Bordered - Dark outline for maximum visibility

πŸ”₯ Unique Features

  • 🚨 Forbidden Alarm - Intense visual alarm (12-layer glow + waves + screen shake)
  • 🎨 Dynamic Colors - Real-time adaptive color based on screen content
  • πŸ–₯️ Multi-Monitor - Display on one or all monitors simultaneously
  • πŸ‘» Click-Through - Transparent overlay that never interferes
  • πŸ”Œ IPC Control - 6 commands for remote control via Unix socket
  • ⚑ Optimized - Efficient rendering (3-20fps depending on mode)

πŸ“Έ Screenshots

InTime Widget on Desktop

Clean Desktop Integration
Transparent overlay, always visible, never intrusive

Movie Theme

Inspired by the Film
"Time is Money" - the ultimate currency

Life is Paid Out

Every Second Counts
Real-time countdown with green glow aesthetic

Deadline Mode

High-Pressure Deadlines
Progressive urgency effects as time runs out


πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/mathis0/InTime.git
cd InTime

# Install dependencies (Arch Linux)
sudo pacman -S gtk4 gtk4-layer-shell python python-gobject python-cairo

# Run interactive installer
./scripts/install.sh

That's it! The installer will guide you through configuration.

Basic Usage

# Show current time with dynamic colors
intime-widget start

# 30-minute Pomodoro timer with sci-fi glow
intime-widget start --mode countdown --duration 30m --style lightbulb

# 1-hour deadline with horror effects (gets intense!)
intime-widget start --mode deadline --duration 1h

# Countdown to midnight on all monitors
intime-widget start --mode midnight --all-monitors

# Stop the widget
intime-widget stop

πŸ’‘ The "In Time" Experience

Why Time Awareness Matters

"For a few to be immortal, many must die." - In Time (2011)

While we don't have countdown clocks on our arms (yet), InTime Widget serves a deeper purpose:

  1. Mortality Awareness - Memento mori for the digital age
  2. Productivity Boost - Deadlines create urgency and focus
  3. Time as Currency - Every hour you spend is an hour you can't get back
  4. Visual Accountability - Can't ignore time when it's always visible

Unlike the dystopian film where time inequality creates class warfare, InTime Widget democratizes time awareness - everyone gets the same countdown.


πŸ“– Usage Guide

Command-Line Options

./src/intime_widget.py [OPTIONS]

Display Modes:
  --mode clock          Standard time display (default)
  --mode countdown      Timer with custom duration
  --mode midnight       Countdown to end of day
  --mode deadline       Horror-style countdown with urgency

Countdown Options:
  --duration DURATION   e.g., 30m, 1h30m, 2h15m30s

Visual Options:
  --style normal        Clean bold text (default)
  --style lightbulb     Particle glow effect
  --color "#RRGGBB"     Fixed color (disables dynamic colors)
  --opacity 0.0-1.0     Transparency level
  --font-size SIZE      Text size in pixels

Position Options:
  --position top        Top of screen
  --position center     Center (default)
  --position bottom     Bottom of screen
  --position-x X --position-y Y   Custom coordinates

Monitor Options:
  --monitor INDEX       Specific monitor (0=primary, 1=secondary)
  --all-monitors        Display on all monitors

Examples

# Pomodoro timer (25 min work session)
intime-widget start --mode countdown --duration 25m --style lightbulb

# Urgent deadline at top of screen
intime-widget start --mode deadline --duration 2h --position top --color "#FF0000"

# Always-on clock at bottom with dynamic colors
intime-widget start --position bottom

# Meeting countdown on secondary monitor
intime-widget start --mode countdown --duration 1h --monitor 1

Control Commands (IPC)

# Reload configuration
echo "reload_config" | nc -U /tmp/intime_widget.sock

# Get widget status
echo "status" | nc -U /tmp/intime_widget.sock

# Trigger forbidden alarm (urgent notification)
echo "forbidden_alarm:Emergency|Critical Task|Time is up!" | nc -U /tmp/intime_widget.sock

# Dismiss alarm
echo "dismiss_alarm" | nc -U /tmp/intime_widget.sock

# Reset from deadline mode to clock
echo "reset_deadline" | nc -U /tmp/intime_widget.sock

# Toggle screen color sampling on/off
echo "toggle_screen_sampling" | nc -U /tmp/intime_widget.sock

See IPC_COMMANDS.md for complete documentation.


βš™οΈ Configuration

Edit ~/.config/intime/config.json to customize defaults:

{
  "color": "#00FF00",
  "font_size": 78,
  "style": "normal",
  "opacity": 0.5,
  "position_mode": "preset",
  "position_preset": "center",
  "screen_sampling": {
    "enabled": true,
    "update_interval": 0.5,
    "throttle_threshold": 15
  },
  "background_color": "#000000"
}

Position presets: top, center, bottom Styles: normal, lightbulb

All settings can be overridden via command-line arguments.


πŸ—οΈ Architecture

Production-Ready Code

  • 1,338 lines of polished Python
  • GTK4 + Layer Shell for proper Wayland overlays
  • Cairo rendering for pixel-perfect graphics
  • IPC server for remote control
  • Multi-monitor support via monitor detection
  • Adaptive colors with screen sampling

Key Components

Component Lines Purpose
IPCServer 38-131 Unix socket for remote control
InTimeWidget 227-1192 Main widget, rendering, animations
ScreenColorMonitor (separate file) Real-time screen sampling
InTimeApplication 1194-1251 GTK app wrapper, multi-monitor

Rendering Pipeline

  1. Mode calculation - Determine current time/countdown value
  2. Color processing - Parse config/CLI color, apply dynamic sampling
  3. Style routing - Normal/Lightbulb/Bordered/Deadline renderers
  4. Animation system - 1Hz clock, 20Hz lightbulb, 3Hz deadline, 10Hz alarm

Performance

  • Optimized layer counts - All visual effects tuned for efficiency
  • Variable frame rates - 1-20fps depending on visual complexity
  • Low CPU usage - Deadline mode uses only 3fps
  • GPU acceleration - Cairo uses hardware rendering when available

🎯 Why InTime Widget?

The Problem

Standard desktop clocks are boring. They show time, but they don't make you feel time passing. You glance, see "14:30", and move on. No urgency. No awareness. No connection to the ticking clock of your life.

The Solution

InTime Widget transforms time display into an experience:

  • Visceral countdown - Watch seconds tick away in real-time
  • Progressive urgency - Deadline mode gets more intense as time runs out
  • Always visible - Transparent overlay you can't ignore
  • Beautiful aesthetics - Green glow inspired by the film's bio-clocks

The Philosophy

"Time is the most valuable thing a man can spend." - Theophrastus

InTime Widget embodies Memento Mori (remember you must die) for the digital age. By making time visible and urgent, it encourages:

  • Intentional living - Awareness of how you spend each hour
  • Productivity - Deadlines create focus and eliminate procrastination
  • Time appreciation - Recognizing that every second is precious

In the movie, the poor live day-by-day with minutes remaining. The rich have centuries. InTime Widget reminds us that everyone is on the clock - the only question is how you spend your time.


❓ FAQ

How do I record a demo GIF of the widget?

Use Peek (recommended for Linux):

sudo pacman -S peek  # Arch Linux
peek

Click the Peek window, position it over your widget, and click Record. Optimize the GIF with ezgif.com to reduce file size.

Why is the widget not showing up?
  1. Ensure you're running Hyprland (not X11)
  2. Check if GTK4 layer shell is installed: pacman -Q gtk4-layer-shell
  3. Try running with verbose output: intime-widget start --help
  4. Check if another instance is running: intime-widget status
Can I use this with Waybar or Eww?

InTime Widget is a standalone overlay widget, not a Waybar/Eww module. It runs independently and displays on top of everything. However, you can:

  • Use IPC commands to control it from Waybar buttons
  • Position it to avoid overlapping with your bar
  • Use the same color scheme for visual consistency
How do I make the widget auto-start with Hyprland?

Add to your ~/.config/hypr/hyprland.conf:

exec-once = intime-widget start --mode clock --position bottom

Or for a Pomodoro timer that restarts daily:

exec-once = intime-widget start --mode countdown --duration 25m --style lightbulb
What's the difference between "countdown" and "deadline" modes?
  • Countdown: Clean timer that decreases in HH:MM:SS format. Great for Pomodoro sessions.
  • Deadline: Horror-style countdown with progressive urgency effects (pulsing, color shifts, intensity increases as time runs out). Use when you need extra motivation!
Does dynamic color mode work on Wayland?

Yes! It uses grim (Wayland screenshot tool) to sample your screen colors every 0.5 seconds. Install with:

sudo pacman -S grim

If you prefer fixed colors, use --color "#00FF00" which automatically disables dynamic sampling.

How much CPU/RAM does it use?

Very minimal:

  • RAM: ~30-50 MB
  • CPU: <1% idle, 2-3% during animations
  • Frame rates: 1fps (clock), 3fps (deadline), 20fps (lightbulb)

The widget is optimized for efficiency - even intensive visual effects use low frame rates.

Can I customize the colors/fonts/size?

Yes! Via command-line arguments:

intime-widget start --color "#FF00FF" --font-size 120 --opacity 0.8

Or edit ~/.config/intime/config.json for persistent defaults.

Does this work on non-Hyprland Wayland compositors?

It should work on any compositor that supports gtk4-layer-shell (Sway, River, etc.), but it's only tested on Hyprland. Try it and report back!

How do I contribute color themes or presets?
  1. Fork the repo
  2. Add your theme to config/themes/ directory
  3. Include a screenshot
  4. Submit a PR with description

Popular themes (Matrix green, Nord, Dracula, Catppuccin) are especially welcome!


🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

Quick Links


πŸ“š Additional Resources


πŸ“œ License

MIT License - See LICENSE for details


🎬 Credits

InTime Widget is inspired by:

  • "In Time" (2011 film) - Directed by Andrew Niccol
  • Hyprland community - For the amazing Wayland compositor
  • GTK4 Layer Shell - For proper overlay support

Created with the philosophy that time is the ultimate currency and every second should be spent intentionally.


⏱️ Don't waste your time. Track it.

⭐ Star this repo if you believe time matters.

Made with urgency for the time-conscious

About

Beautiful countdown timer widget for Hyprland inspired by 'In Time' movie - Dynamic colors, productivity focused, aesthetic desktop customization

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •