Facebook
From ssssssss, 1 Week ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 103
  1. (defun emacs-run-launcher ()
  2. "Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Run app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
  3. (interactive)
  4. (with-selected-frame (make-frame '((name . "emacs-run-launcher")
  5.                                    (minibuffer . only)))
  6.   (unwind-protect
  7.       (app-launcher-run-app)
  8.     (delete-frame))))
  9.  
  10. (defun emacs-pass ()
  11.   "consult pass copy password"
  12.   (interactive)
  13.   (with-selected-frame (make-frame '((name . "emacs-pass")
  14.                                      (minibuffer . only)))
  15.     (unwind-protect
  16.         (call-interactively '+pass/consult)
  17.       (delete-frame))))
  18.  
  19. (defun toggle-buffer-fullscreen ()
  20.   (interactive)
  21.   (if (= 1 (length (window-list)))
  22.       (jump-to-register '_)
  23.     (progn
  24.       (window-configuration-to-register '_)
  25.       (delete-other-windows))))
  26.