aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-09-12 13:06:05 +0200
committerHimbeer <himbeer@disroot.org>2024-09-12 13:08:03 +0200
commit13e51caa9241f8e604c4337709e5c183107b6891 (patch)
treea43f7d576e8f106fa2b114ff3771073da309ea54
parent76c974d8cbaef17f40a237c132e8e8ba522a8c68 (diff)
Use custom date command
This eliminates the direct interaction between waybar and tzdata as a point of failure and displays the time in the correct zone more reliably. See https://github.com/Alexays/Waybar/issues/3575 for the issue.
-rw-r--r--waybar/config9
-rw-r--r--waybar/style.css2
2 files changed, 6 insertions, 5 deletions
diff --git a/waybar/config b/waybar/config
index b411e25..cbc6872 100644
--- a/waybar/config
+++ b/waybar/config
@@ -1,7 +1,7 @@
{
"layer": "top",
"modules-left": ["river/tags", "network#eth0", "network#wlan0"],
- "modules-right": ["tray", "cpu", "memory", "wireplumber", "battery", "backlight", "clock"],
+ "modules-right": ["tray", "cpu", "memory", "wireplumber", "battery", "backlight", "custom/clock"],
"network#eth0": {
"format-disconnected": "",
"format-linked": "{icon} ⇅",
@@ -65,8 +65,9 @@
"format-icons": ["💡"],
"scroll-step": 5
},
- "clock": {
- "format": "{:%Y-%m-%d %H:%M:%S}",
- "interval": 1
+ "custom/clock": {
+ "format": "{}",
+ "interval": 1,
+ "exec": "date +'%Y-%m-%d %H:%M:%S'"
}
}
diff --git a/waybar/style.css b/waybar/style.css
index f4d7cdb..e4c4baa 100644
--- a/waybar/style.css
+++ b/waybar/style.css
@@ -57,6 +57,6 @@ button:hover {
#wireplumber,
#battery,
#backlight,
-#clock {
+#custom-clock {
padding: 0 10px;
}