commit 2c51676436546ae4217ed023e97832c13db1d52e parent 36496ad126c96d19989ff13a65b9b2d4fc21d58a Author: Daniel Barlow <dan@telent.net> Date: Thu, 7 Jul 2022 12:17:46 +0100 choose view by clicking it in overview Diffstat:
| M | rc.fnl | | | 17 | +++++++++++++++++ |
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/rc.fnl b/rc.fnl @@ -110,6 +110,23 @@ } })) +(fn choose-view-at [x y] + (let [view (kiwmi:view_at x y)] + (tset app-state :focus-view view) + (tset app-state :in-overview false) + (hide-overview) + true)) + +(let [cursor (kiwmi:cursor)] + (cursor:on "button_up" + (fn [button-id] + (when app-state.in-overview + (let [geom (placements (kiwmi:active_output)) + (x y) (cursor:pos)] + (if (< y geom.application.h) + (choose-view-at x y) + false)))))) + (kiwmi:on "output" (fn [output]