From 8f311d65318bc3fffbcfd0b72da80cea2a838e6e Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Mon, 21 Aug 2023 17:29:20 +0700 Subject: [PATCH] Emacs: Get correct config for run launcher, no extra scratch buffers --- .config/emacs/init.org | 39 +++++++++++++++++----------------- .config/herbstluftwm/autostart | 4 ++-- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.config/emacs/init.org b/.config/emacs/init.org index fdab52d..2309f9c 100644 --- a/.config/emacs/init.org +++ b/.config/emacs/init.org @@ -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)) (add-to-list 'consult-buffer-sources 'beframe-consult-source)) - +(setq beframe-create-frame-scratch-buffer nil) (beframe-mode +1) #+end_src *** Popper @@ -1515,26 +1515,14 @@ When called interactively, prompt for BUFFER." ** App Launcher #+begin_src emacs-lisp (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) - (with-selected-frame - (make-frame '((name . "emacs-run-launcher") - (minibuffer . only) - (fullscreen . 0) ; no fullscreen - (undecorated . t) ; remove title bar - ;;(auto-raise . t) ; focus on this frame - ;;(tool-bar-lines . 0) - ;;(menu-bar-lines . 0) - (internal-border-width . 30) - (width . 100) - (height . 20))) - (unwind-protect - (app-launcher-run-app) - (delete-frame)))) + (unwind-protect + (app-launcher-run-app) + (delete-frame))) +(defun joe/vterm-scratch () + (interactive) + (unwind-protect + (joe/vterm-here))) #+end_src ** Dirvish/Dired #+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) (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 ** Magit diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index 1487372..bad7a19 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -32,8 +32,8 @@ hc keybind $Mod-Ctrl-q quit hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-q close 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-space spawn emacsclient -w 2 -a "" -e "(emacs-run-launcher)" +hc keybind $Mod-v spawn emacs-app +hc keybind $Mod-space spawn emacs-run-launcher # basic movement in tiling and floating mode # focusing clients