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:
parent
85d26d2d65
commit
b260a7c997
|
@ -256,3 +256,12 @@ position between last non-whitespace and `end-of-line'."
|
||||||
(defun kmn/date-string-minus-three-days (date-string)
|
(defun kmn/date-string-minus-three-days (date-string)
|
||||||
(kmn/date-string-days-math date-string -3)
|
(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)))
|
||||||
|
)
|
||||||
|
|
|
@ -30,10 +30,11 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Reusable hugo dev workspace
|
; Reusable hugo dev workspace
|
||||||
(defun kmn/workspace-hugo-generic (src-sub-dir)
|
(defun kmn/workspace-hugo-generic (src-sub-dir)
|
||||||
|
(interactive)
|
||||||
|
(kmn/possibly-create-frame)
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(centaur-tabs-mode t)
|
(centaur-tabs-mode t)
|
||||||
(setq src-sub-dir (concat "~/src/" src-sub-dir))
|
(setq src-sub-dir (concat "~/src/" src-sub-dir))
|
||||||
(interactive)
|
|
||||||
(kmn/dired-directory-on-left src-sub-dir nil nil -1)
|
(kmn/dired-directory-on-left src-sub-dir nil nil -1)
|
||||||
(kmn/eshell-on-left src-sub-dir nil nil 0)
|
(kmn/eshell-on-left src-sub-dir nil nil 0)
|
||||||
(kmn/eww-on-right "http://localhost:1313")
|
(kmn/eww-on-right "http://localhost:1313")
|
||||||
|
@ -68,6 +69,7 @@
|
||||||
(when (not kmn/is-dayjob)
|
(when (not kmn/is-dayjob)
|
||||||
(defun kmn/workspace-org ()
|
(defun kmn/workspace-org ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(kmn/possibly-create-frame)
|
||||||
; start with fresh frame
|
; start with fresh frame
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(kmn/kill-other-buffers)
|
(kmn/kill-other-buffers)
|
||||||
|
@ -93,6 +95,7 @@
|
||||||
(when kmn/is-dayjob
|
(when kmn/is-dayjob
|
||||||
(defun kmn/workspace-org ()
|
(defun kmn/workspace-org ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(kmn/possibly-create-frame)
|
||||||
; start with fresh frame
|
; start with fresh frame
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(kmn/kill-other-buffers)
|
(kmn/kill-other-buffers)
|
||||||
|
@ -140,6 +143,7 @@
|
||||||
; empty code workspace
|
; empty code workspace
|
||||||
(defun kmn/workspace-code-empty (&optional dir_path)
|
(defun kmn/workspace-code-empty (&optional dir_path)
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(kmn/possibly-create-frame)
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(kmn/kill-other-buffers)
|
(kmn/kill-other-buffers)
|
||||||
(ignore-errors (kill-buffer "*scratch*"))
|
(ignore-errors (kill-buffer "*scratch*"))
|
||||||
|
|
Reference in a new issue