Skip to content

Instantly share code, notes, and snippets.

@sjl sjl/move-focus.lisp
Created Jun 12, 2018

What would you like to do?
(defcommand move-focus* (direction)
((:direction "Enter a direction: "))
(labels ((in-float-p ()
(typep (current-group) 'float-group))
(focus-first-frame ()
(unless (in-float-p)
(dotimes (i 10)
(move-focus (ecase direction
(:left :right)
(:right :left))))))
(next-group ()
(ecase direction
(:right (gnext))
(:left (gprev)))
(unless (in-float-p)
(if (in-float-p)
(let ((frame (current-frame)))
(move-focus direction)
(when (eql frame (current-frame))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.