Compare commits
4 Commits
9d882886ec
...
8edac33374
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8edac33374 | ||
|
|
f49896ae32 | ||
|
|
b17a6df1b9 | ||
|
|
bdd32a8a6d |
21
main.janet
21
main.janet
@@ -211,12 +211,11 @@
|
||||
|
||||
(defn seat/focus [seat window]
|
||||
(defn focus-window [window]
|
||||
(unless (= (seat :focused) window)
|
||||
(:focus-window (seat :obj) (window :obj))
|
||||
(put seat :focused window)
|
||||
(set (wm :render-order) (filter |(not (= $ window)) (wm :render-order)))
|
||||
(array/push (wm :render-order) window)
|
||||
(:place-top (window :node))))
|
||||
(:focus-window (seat :obj) (window :obj))
|
||||
(put seat :focused window)
|
||||
(set (wm :render-order) (filter |(not (= $ window)) (wm :render-order)))
|
||||
(array/push (wm :render-order) window)
|
||||
(:place-top (window :node)))
|
||||
(defn clear-focus []
|
||||
(when (seat :focused)
|
||||
(:clear-focus (seat :obj))
|
||||
@@ -287,6 +286,9 @@
|
||||
(if (or (not (seat :focused-output)) ((seat :focused-output) :removed))
|
||||
(seat/focus-output seat (first (wm :outputs))))
|
||||
|
||||
(when (not= (seat :layer-focus) :non-exclusive)
|
||||
(seat/focus seat (seat :focused)))
|
||||
|
||||
(seat/focus seat nil)
|
||||
|
||||
(if-let [window (seat :window-interaction)]
|
||||
@@ -428,7 +430,7 @@
|
||||
:period ">"
|
||||
"")
|
||||
" "
|
||||
(string/join (map |(string ":" $) (output :tags-other)))))
|
||||
(string/join (map |(string ":" $) (filter keyword? (output :tags-other))))))
|
||||
|
||||
|
||||
(defn action/target-in [obj list dir]
|
||||
@@ -444,7 +446,8 @@
|
||||
(action/target-in window windows dir)))
|
||||
|
||||
(defn spawn [command]
|
||||
(ev/spawn (os/proc-wait (os/spawn ["/bin/sh" "-c" command] :p))))
|
||||
(ev/spawn (os/proc-wait (os/spawn ["/bin/sh" "-c" command] :p)))
|
||||
true)
|
||||
|
||||
(defn action/spawn [command]
|
||||
(fn [seat binding] (spawn command)))
|
||||
@@ -606,8 +609,6 @@
|
||||
|
||||
# TODO: layout flexibility
|
||||
|
||||
# TODO: swap display tags
|
||||
|
||||
# TODO: reload with repl?
|
||||
|
||||
(defn configure-keymap []
|
||||
|
||||
Reference in New Issue
Block a user