From a1908de8d3a44b0384a6bf25371171e92db1c7b9 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 26 Apr 2022 22:13:51 +0100 Subject: [PATCH] resize and show view on creation --- modeline.fnl | 2 +- rc.fnl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modeline.fnl b/modeline.fnl index 488aff1..b8abbb3 100644 --- a/modeline.fnl +++ b/modeline.fnl @@ -9,7 +9,7 @@ ;(local battery (require :blinkenlicht.metric.battery)) (local cpustat (require :blinkenlicht.metric.cpustat)) -(stylesheet "licht.css") +(stylesheet "modeline.css") (fn battery-icon-codepoint [status percent] (if (= status "Charging") 0xf0e7 diff --git a/rc.fnl b/rc.fnl index 7f8404e..d1a3a30 100644 --- a/rc.fnl +++ b/rc.fnl @@ -1,4 +1,13 @@ (kiwmi:on "output" #(doto $1 (: :set_mode 360 720 0))) +(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))))) ;(kiwmi:spawn "swaybg -c '#ff00ff'")