merge branch niri into v3 #1
@ -1,9 +1,10 @@
|
||||
(import astal *)
|
||||
(import astal.gtk3 *)
|
||||
(import datetime)
|
||||
|
||||
(let [
|
||||
datetime (.poll (Variable "") 1000 "date +'%d %b %H:%M:%S'" (fn [out _] out))
|
||||
unix-seconds (.poll (Variable "") 1000 "date +%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 (fn [_] (. datetime datetime (now) (strftime "%s"))) (fn [out] out))]
|
||||
(setv clock (Widget.Box
|
||||
:class-name "clock"
|
||||
:vertical True
|
||||
@ -11,7 +12,7 @@
|
||||
:children [
|
||||
(Widget.Label
|
||||
:halign Gtk.Align.START
|
||||
:label (bind datetime))
|
||||
:label (bind time))
|
||||
(Widget.Label
|
||||
:halign Gtk.Align.START
|
||||
:label (bind unix-seconds))])))
|
||||
|
Loading…
x
Reference in New Issue
Block a user