summaryrefslogtreecommitdiff
path: root/assets/outbox/2026-02-10-waybar-date-worldclock.txt
blob: 4cd4668075d6156510258ca0146cb61cabce5b05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Waybar: Split clock into separate date and world clock modules
==============================================================

Split the single Waybar clock module into two custom modules so that
each has its own tooltip: date shows a calendar, time shows a world clock.

What changed
------------

Replaced the built-in "clock" module with two custom modules:

- custom/date: Shows "Tue, Feb 10 2026" on the bar. Tooltip displays the
  current month stacked above the next month, with today highlighted in
  dupre gold (#daa520).

- custom/worldclock: Shows "04:36 PM CST" on the bar. Tooltip lists all
  configured timezones with their current times. The local timezone is
  highlighted in dupre gold. Reads from ~/.config/waybar/worldclock.conf
  so timezones can be added/removed without touching any scripts.

Files added
-----------

- dotfiles/hyprland/.local/bin/waybar-date
  Shell script outputting JSON. Generates the two-month stacked calendar
  using cal, highlights today via Pango markup.

- dotfiles/hyprland/.local/bin/waybar-worldclock
  Shell script outputting JSON. Reads worldclock.conf, detects local
  timezone via /etc/localtime, highlights it in gold.

- dotfiles/hyprland/.config/waybar/worldclock.conf
  Timezone list sorted earliest to latest:
  Honolulu, Anchorage, Berkeley, New Orleans, New York, London, Paris,
  Athens, Istanbul, Yerevan, Delhi, Shanghai, Tokyo, Sydney, Wellington.

Files modified
--------------

- dotfiles/hyprland/.config/waybar/config
  Replaced "clock" in modules-right with "custom/date" and
  "custom/worldclock". Removed the clock block, added the two new
  module definitions (interval 60s for date, 30s for worldclock).

- dotfiles/hyprland/.config/waybar/style.css
  Replaced #clock with #custom-date and #custom-worldclock in the shared
  selector. Added overrides to tighten spacing: the two modules sit close
  together (0.2rem padding between them, zero margin), and the date
  module's left side is flush against the tray.

Deployment
----------

Scripts are deployed via stow (stow -R hyprland -t $HOME from the
dotfiles directory). After any changes, reload with:
  killall waybar && waybar &

To customize timezones, edit ~/.config/waybar/worldclock.conf. Changes
appear within 30 seconds.