2022-05-05 22:38:39 +00:00
|
|
|
(local { : GdkPixbuf } (require :lgi))
|
|
|
|
(local { : view } (require :fennel))
|
|
|
|
|
|
|
|
(var texture nil)
|
|
|
|
|
|
|
|
(local pixels
|
|
|
|
(let [(buf err) (GdkPixbuf.Pixbuf.new_from_file "globe.png")]
|
|
|
|
(if (not buf) (print :err err))
|
|
|
|
buf))
|
|
|
|
|
|
|
|
(kiwmi:on
|
|
|
|
"output"
|
|
|
|
(fn [output]
|
|
|
|
(output:set_mode 360 720 0)
|
|
|
|
(let [r (output:renderer)]
|
|
|
|
(set texture (r:texture_from_pixels
|
|
|
|
pixels.rowstride
|
|
|
|
pixels.width
|
|
|
|
pixels.height
|
|
|
|
(pixels:get_pixels)))
|
|
|
|
(output:on "render"
|
|
|
|
(fn [{: output : renderer}]
|
|
|
|
(renderer:draw_texture
|
|
|
|
texture
|
|
|
|
[1 0 0
|
|
|
|
0 1 0
|
|
|
|
0 0 1]
|
|
|
|
150 150 0.7)))
|
|
|
|
(print :texture texture))))
|
|
|
|
|
2022-04-26 21:13:51 +00:00
|
|
|
(kiwmi:on "view"
|
|
|
|
(fn [view]
|
|
|
|
(let [(w h) (: (kiwmi:active_output) :size)]
|
|
|
|
(view:resize w h)
|
|
|
|
(view:move 0 0))
|
|
|
|
(view:focus)
|
|
|
|
(view:show)
|
|
|
|
(view:on "request_move" #(view:imove))
|
|
|
|
(view:on "request_resize" (fn [ev] (view:iresize ev.edges)))))
|
2022-04-26 20:14:46 +00:00
|
|
|
|
2022-04-26 21:13:37 +00:00
|
|
|
|
|
|
|
;(kiwmi:spawn "swaybg -c '#ff00ff'")
|
|
|
|
(kiwmi:spawn "lua -l fennelrun modeline.fnl")
|
2022-04-26 22:01:30 +00:00
|
|
|
(kiwmi:spawn "lua -l fennelrun saturn/main.fnl")
|
2022-04-27 09:07:33 +00:00
|
|
|
(kiwmi:spawn "lua -l fennelrun crier/crier.fnl")
|
2022-04-27 12:26:54 +00:00
|
|
|
(kiwmi:spawn "lua -l fennelrun just/just.fnl")
|
2022-04-27 09:07:33 +00:00
|
|
|
;(kiwmi:spawn "foot")
|