add auto creation of frames to various workspaces -- this is setup to only pop a new frame if outside of termux where a new frame wouldnt be helpful

This commit is contained in:
KemoNine 2023-08-01 12:31:34 -04:00
parent 85d26d2d65
commit b260a7c997
2 changed files with 14 additions and 1 deletions

View File

@ -256,3 +256,12 @@ position between last non-whitespace and `end-of-line'."
(defun kmn/date-string-minus-three-days (date-string)
(kmn/date-string-days-math date-string -3)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; create new frame if not inside termux
(defun kmn/possibly-create-frame ()
(interactive)
(when (not kmn/is-termux)
(let ((frame (make-frame)))
(select-frame-set-input-focus frame)))
)

View File

@ -30,10 +30,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Reusable hugo dev workspace
(defun kmn/workspace-hugo-generic (src-sub-dir)
(interactive)
(kmn/possibly-create-frame)
(delete-other-windows)
(centaur-tabs-mode t)
(setq src-sub-dir (concat "~/src/" src-sub-dir))
(interactive)
(kmn/dired-directory-on-left src-sub-dir nil nil -1)
(kmn/eshell-on-left src-sub-dir nil nil 0)
(kmn/eww-on-right "http://localhost:1313")
@ -68,6 +69,7 @@
(when (not kmn/is-dayjob)
(defun kmn/workspace-org ()
(interactive)
(kmn/possibly-create-frame)
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
@ -93,6 +95,7 @@
(when kmn/is-dayjob
(defun kmn/workspace-org ()
(interactive)
(kmn/possibly-create-frame)
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
@ -140,6 +143,7 @@
; empty code workspace
(defun kmn/workspace-code-empty (&optional dir_path)
(interactive)
(kmn/possibly-create-frame)
(delete-other-windows)
(kmn/kill-other-buffers)
(ignore-errors (kill-buffer "*scratch*"))