Display a world clock with any timezone in your tmux status bar.
Add this plugin to your ~/.tmux.conf:
set -g @plugin 'tmux-contrib/tmux-clock'And install it by running <prefix> + I.
Add the #{clock} format string to your status bar:
set -g status-right "#{clock}"Add these options to your ~/.tmux.conf:
# Timezone to display (default: US/Eastern)
set -g @clock-tz "Europe/London"
# Time format string (default: #[bold]%Z#[nobold]: %H:%M)
set -g @clock-fmt "#[bold]%Z#[nobold]: %H:%M"
# Foreground color (default: default)
set -g @clock-fg-color "yellow"
# Background color (default: default)
set -g @clock-bg-color "default"| Option | Default | Description |
|---|---|---|
@clock-tz |
"US/Eastern" |
Timezone to display |
@clock-fmt |
#[bold]%Z#[nobold]: %H:%M |
Time format string |
@clock-fg-color |
"default" |
Foreground color |
@clock-bg-color |
"default" |
Background color |
| Timezone | Location |
|---|---|
US/Eastern |
New York |
US/Central |
Chicago |
US/Pacific |
Los Angeles |
Europe/London |
London |
Europe/Paris |
Paris |
Europe/Amsterdam |
Amsterdam |
Asia/Tokyo |
Tokyo |
Asia/Shanghai |
Shanghai |
UTC |
Coordinated UTC |
Install dependencies using Nix:
nix developOr install manually: bash, tmux, bats
bats tests/Enable trace output with the DEBUG environment variable:
DEBUG=1 /path/to/tmux-clock/scripts/tmux_clock.shGPL-3.0