R

Refined Time Preset

Production-ready setting that handles status, line, timestamp, showing. Includes structured workflows, validation checks, and reusable patterns for statusline.

SettingClipticsstatuslinev1.0.0MIT
0 views0 copies

Refined Time Preset

Clean time-focused statusline showing formatted timestamps, session duration, timezone, and elapsed working time.

When to Use This Setting

Apply this setting when you need to:

  • Keep precise track of session duration and elapsed working time directly in your Claude Code statusline
  • Display timezone-aware timestamps for remote team coordination across multiple time zones
  • Maintain a simple, clock-focused statusline without project or git metadata clutter Consider alternatives when:
  • Your operating system or window manager already provides prominent clock displays
  • You need project-specific context like git branch or build status more than time information

Quick Start

Configuration

name: refined-time-preset type: setting category: statusline

Example Application

claude setting:apply refined-time-preset

Example Output

Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash time-display inline
- time_format: HH:MM:SS with timezone abbreviation
- session_tracking: elapsed since session start
- timezone_display: system TZ abbreviation

Core Concepts

Time Display Overview

AspectDetails
Current TimeSystem time formatted in HH:MM:SS with configurable format string
Timezone LabelDisplays the active timezone abbreviation from system settings
Session DurationCalculates elapsed time since the session cache file was first created
Date DisplayOptional date field showing YYYY-MM-DD for cross-day session awareness
Model ContextIncludes Claude model name for session identification alongside time data

Time Tracking Architecture

+-------------------+     +---------------------+     +------------------+
| System Clock      |---->| Time Formatter      |---->| TZ Resolver      |
| date command      |     | HH:MM:SS format     |     | system timezone  |
+-------------------+     +---------------------+     +------------------+
                                   |                          |
                                   v                          v
                          +---------------------+    +------------------+
                          | Session Timer       |    | Status Assembler |
                          | now - start_time    |--->| time+tz+session  |
                          | from cache file     |    | duration display |
                          +---------------------+    +------------------+

Configuration

ParameterTypeDefaultDescription
time_formatstring"%H:%M:%S"Format string passed to the date command for time display
show_timezonebooleantrueInclude the timezone abbreviation in the statusline output
show_session_durationbooleantrueTrack and display elapsed time since session start
show_datebooleanfalseInclude the current date in YYYY-MM-DD format
cache_directorystring"/tmp"Directory for storing the session start timestamp file

Best Practices

  1. Use for cross-timezone team coordination - When working with distributed teams, the timezone label helps colleagues quickly understand your local time context during screen shares or pair programming sessions.
  2. Enable date display for overnight sessions - If you frequently code past midnight, enable show_date so you can see when the calendar day has changed without checking your system clock.
  3. Track session duration for time management - The elapsed session timer provides a passive time awareness tool. Set personal rules like taking a break after 90 minutes of continuous session time.
  4. Customize format for locale preferences - Switch to 12-hour format with AM/PM notation if you prefer it, or use compact military-style time display to save statusline space.
  5. Combine with deadline countdown - The refined time preset pairs well with the deadline countdown statusline. Use time preset for general awareness and switch to deadline countdown when approaching specific delivery deadlines.

Common Issues

  1. Session duration shows 0 minutes continuously - The session start cache file may be recreated on every refresh instead of only on first creation. Ensure the script checks for file existence before writing the start timestamp.
  2. Timezone shows UTC instead of local - The TZ environment variable may not be set in the shell that runs the statusline command. Export your timezone explicitly in your shell profile or pass it as a parameter.
  3. Time format shows raw format string - The date command syntax varies between GNU coreutils (Linux) and BSD (macOS). Verify your format string is compatible with your operating system date implementation.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates