merge branch niri into v3 #1

Merged
nat merged 2 commits from niri into v3 2025-03-17 01:50:49 -07:00
Showing only changes of commit 4e545f07ef - Show all commits

View File

@ -1,9 +1,10 @@
(import astal *) (import astal *)
(import astal.gtk3 *) (import astal.gtk3 *)
(import datetime)
(let [ (let [
datetime (.poll (Variable "") 1000 "date +'%d %b %H:%M:%S'" (fn [out _] out)) time (.poll (Variable "") 1000 (fn [_] (. datetime datetime (now) (strftime "%d %b %H:%M:%S"))) (fn [out] out))
unix-seconds (.poll (Variable "") 1000 "date +%s" (fn [out _] out))] unix-seconds (.poll (Variable "") 1000 (fn [_] (. datetime datetime (now) (strftime "%s"))) (fn [out] out))]
(setv clock (Widget.Box (setv clock (Widget.Box
:class-name "clock" :class-name "clock"
:vertical True :vertical True
@ -11,7 +12,7 @@
:children [ :children [
(Widget.Label (Widget.Label
:halign Gtk.Align.START :halign Gtk.Align.START
:label (bind datetime)) :label (bind time))
(Widget.Label (Widget.Label
:halign Gtk.Align.START :halign Gtk.Align.START
:label (bind unix-seconds))]))) :label (bind unix-seconds))])))