Skip to content

Instantly share code, notes, and snippets.

@tkurtbond
Created February 1, 2023 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkurtbond/e9e413248a49f0aa319b48606a76dbac to your computer and use it in GitHub Desktop.
Save tkurtbond/e9e413248a49f0aa319b48606a76dbac to your computer and use it in GitHub Desktop.
Emacs function to popup a menu to select a frame to bring the front.
(defun tkb-select-frame-popup ()
(interactive)
(let* ((frames (cl-loop for frame in (frame-list)
collect (cons (frame-parameter frame 'name)
frame)
into frames finally return frames))
(frame (x-popup-menu t `("Pick a frame" ("frames" ,@frames)))))
(when frame
(raise-frame frame)
(select-frame frame))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment