merge branch niri into v3 #1
@ -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))])))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user