Emacs: Get correct config for run launcher, no extra scratch buffers

This commit is contained in:
Joseph Ferano 2023-08-21 17:29:20 +07:00
parent d219ccadc2
commit 8f311d6531
2 changed files with 21 additions and 22 deletions

View File

@ -998,7 +998,7 @@ Ace Window will show a hint if there are more than 2 windows, but I don't really
:state ,#'consult--buffer-state)) :state ,#'consult--buffer-state))
(add-to-list 'consult-buffer-sources 'beframe-consult-source)) (add-to-list 'consult-buffer-sources 'beframe-consult-source))
(setq beframe-create-frame-scratch-buffer nil)
(beframe-mode +1) (beframe-mode +1)
#+end_src #+end_src
*** Popper *** Popper
@ -1515,26 +1515,14 @@ When called interactively, prompt for BUFFER."
** App Launcher ** App Launcher
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun emacs-run-launcher () (defun emacs-run-launcher ()
"Create and select a frame called emacs-run-launcher which
consists only of a minibuffer and has specific dimensions. Runs
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"
(interactive) (interactive)
(with-selected-frame (unwind-protect
(make-frame '((name . "emacs-run-launcher") (app-launcher-run-app)
(minibuffer . only) (delete-frame)))
(fullscreen . 0) ; no fullscreen (defun joe/vterm-scratch ()
(undecorated . t) ; remove title bar (interactive)
;;(auto-raise . t) ; focus on this frame (unwind-protect
;;(tool-bar-lines . 0) (joe/vterm-here)))
;;(menu-bar-lines . 0)
(internal-border-width . 30)
(width . 100)
(height . 20)))
(unwind-protect
(app-launcher-run-app)
(delete-frame))))
#+end_src #+end_src
** Dirvish/Dired ** Dirvish/Dired
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -2333,6 +2321,17 @@ and there's no need for a middle-man when it's already been implemented.
(org-roam-setup) (org-roam-setup)
(evil-define-key 'normal calendar-mode-map (kbd "RET") #'org-calendar-select) (evil-define-key 'normal calendar-mode-map (kbd "RET") #'org-calendar-select)
(defun org-capture-today()
(concat "<" (format-time-string "%Y-%m-%d") ">"))
;; (setq org-capture-templates
;; '(("d" "New Coding Challenge" entry
;; (file+headline "~/Notes/Daily.org")
;; (concat "* Today's Date" "\n"
;; "** Schedule" "\n"
;; "** Notes & Resources" "\n"))))
#+end_src #+end_src
** Magit ** Magit

View File

@ -32,8 +32,8 @@ hc keybind $Mod-Ctrl-q quit
hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-q close hc keybind $Mod-Shift-q close
hc keybind $Mod-Return spawn kitty # use your $TERMINAL with xterm as fallback hc keybind $Mod-Return spawn kitty # use your $TERMINAL with xterm as fallback
hc keybind $Mod-v spawn emacsclient -nc -e "(joe/vterm-here)" hc keybind $Mod-v spawn emacs-app
hc keybind $Mod-space spawn emacsclient -w 2 -a "" -e "(emacs-run-launcher)" hc keybind $Mod-space spawn emacs-run-launcher
# basic movement in tiling and floating mode # basic movement in tiling and floating mode
# focusing clients # focusing clients