Powerline date segment with timezone and 30s rotation support
Project description
powerline-date
A drop-in replacement for Powerline's
built-in date segment that adds timezone support and lets a single segment
rotate through several timezones on a fixed interval.
Features
- Render the time or date in any IANA timezone.
- Rotate one segment through a list of zones — each with its own
formatand colorscheme highlight group — instead of stacking a segment per zone. - Stateless: the active zone is derived from the wall clock, so nothing is kept between renders and no daemon state is required.
Installation
Install into the same environment as Powerline. If you manage Powerline with pipx:
pipx inject powerline-status powerline-date
Otherwise:
pip install powerline-date
Usage
The package exposes powerline_date.date, usable anywhere a Powerline segment
function is accepted (e.g. a tmux theme's segments).
A single timezone
{
"function": "powerline_date.date",
"name": "utc_time",
"args": {
"format": "%H:%M %Z",
"timezone": "UTC"
}
}
Rotating through timezones
One segment can cycle through a list of zones. Each entry may carry its own
format and highlight_group (a suffix appended to time:), so each zone can
be colored differently in your colorscheme.
{
"function": "powerline_date.date",
"name": "rotating_time",
"args": {
"cycle_seconds": 30,
"timezones": [
{"timezone": "America/New_York", "format": "%I:%M %p 🗽", "highlight_group": "eastern"},
{"timezone": "America/Chicago", "format": "%I:%M %p %Z 🤠", "highlight_group": "central"},
{"timezone": "UTC", "format": "%H:%M %Z 👾", "highlight_group": "UTC"}
]
}
}
The active entry is chosen deterministically from the current time, so no state
is kept between renders. For the rotation to look smooth, Powerline must
re-render at least as often as cycle_seconds. In tmux:
set -g status-interval 5
Arguments
| Argument | Default | Description |
|---|---|---|
format |
%Y-%m-%d |
strftime format. Used as the fallback when a rotation entry omits its own format. |
timezone |
None |
IANA name (e.g. America/New_York). Local time is used when unset. |
timezones |
None |
List of rotation entries, each with timezone and optional format / highlight_group. Takes precedence over timezone. |
cycle_seconds |
5 |
Seconds each entry is shown before rotating to the next. |
Colorscheme
Each rendered entry uses the highlight groups
["time:<highlight_group>", "time"], falling back to time when the specific
group is undefined, with time:divider for the divider. Define these in your
colorscheme to color each zone:
{
"groups": {
"time": {"fg": "white", "bg": "darkblue"},
"time:divider": {"fg": "black", "bg": "darkblue"},
"time:eastern": {"fg": "white", "bg": "darkblue"},
"time:central": {"fg": "white", "bg": "darkgreen"},
"time:UTC": {"fg": "white", "bg": "darkestpurple"}
}
}
When highlight_group is omitted, the timezone name itself is used as the
suffix (e.g. time:America/New_York).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file powerline_date-202605.0.tar.gz.
File metadata
- Download URL: powerline_date-202605.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
401751924c4e65a52ae466027a72af3456d3291ff281268c557463c699eb3934
|
|
| MD5 |
6994b5771c517be59c996763714d982e
|
|
| BLAKE2b-256 |
497a03b84564388da4c326241600ccbd5500dda3572a50c3fda8638f2ea9040e
|
Provenance
The following attestation bundles were made for powerline_date-202605.0.tar.gz:
Publisher:
release.yml on cwood/powerline-date
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powerline_date-202605.0.tar.gz -
Subject digest:
401751924c4e65a52ae466027a72af3456d3291ff281268c557463c699eb3934 - Sigstore transparency entry: 1597307774
- Sigstore integration time:
-
Permalink:
cwood/powerline-date@e46f53f9cc47fcca98278811e69a6eb908b1d05a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/cwood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e46f53f9cc47fcca98278811e69a6eb908b1d05a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file powerline_date-202605.0-py3-none-any.whl.
File metadata
- Download URL: powerline_date-202605.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0773ab6cce70075bcd5fa625ce372b6fb19f0ab724d8b705124d2861e5f7c19
|
|
| MD5 |
e7a2a88b53e1624813558b41b838d802
|
|
| BLAKE2b-256 |
fb70c48a558a4b9d9fd8d412c96d5df2e782ff0f3a85ff3189aec6c6a3335ef3
|
Provenance
The following attestation bundles were made for powerline_date-202605.0-py3-none-any.whl:
Publisher:
release.yml on cwood/powerline-date
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powerline_date-202605.0-py3-none-any.whl -
Subject digest:
d0773ab6cce70075bcd5fa625ce372b6fb19f0ab724d8b705124d2861e5f7c19 - Sigstore transparency entry: 1597308086
- Sigstore integration time:
-
Permalink:
cwood/powerline-date@e46f53f9cc47fcca98278811e69a6eb908b1d05a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/cwood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e46f53f9cc47fcca98278811e69a6eb908b1d05a -
Trigger Event:
workflow_dispatch
-
Statement type: