2023-04-08 16:53:12 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; various workspaces used day to day
|
|
|
|
|
2023-04-08 17:27:42 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; load most recent auto save
|
|
|
|
(defun kmn/workspace-load-auto ()
|
|
|
|
(interactive)
|
|
|
|
(persp-load-state-from-file "persp-auto-save")
|
2023-04-10 19:22:13 +00:00
|
|
|
(persistent-scratch-restore)
|
2023-04-08 17:27:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; save the current workspace to `latest` filename
|
|
|
|
(defun kmn/workspace-save-latest ()
|
|
|
|
(interactive)
|
|
|
|
(persp-save-state-to-file "latest")
|
2023-04-10 19:22:13 +00:00
|
|
|
(persistent-scratch-save-to-file
|
|
|
|
(expand-file-name ".persistent-scratch-latest" user-emacs-directory))
|
2023-04-08 17:27:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; load `latest` file name to current workspace
|
|
|
|
(defun kmn/workspace-load-latest ()
|
|
|
|
(interactive)
|
|
|
|
(persp-load-state-from-file "latest")
|
2023-04-10 19:22:13 +00:00
|
|
|
(persistent-scratch-restore-from-file
|
|
|
|
(expand-file-name ".persistent-scratch-latest" user-emacs-directory))
|
2023-04-08 17:27:42 +00:00
|
|
|
)
|
2023-04-08 16:53:12 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; org-mode workspace
|
|
|
|
(defun kmn/workspace-org ()
|
|
|
|
(interactive)
|
|
|
|
; start with fresh frame
|
|
|
|
(delete-other-windows)
|
2023-04-08 19:02:06 +00:00
|
|
|
(kmn/kill-other-buffers)
|
2023-04-10 19:22:13 +00:00
|
|
|
(kill-buffer (get-buffer "*scratch*"))
|
2023-04-08 19:02:06 +00:00
|
|
|
; front load org-agenda so it doesnt reshuffle the frame layout on us
|
|
|
|
(org-agenda nil "r")
|
|
|
|
(split-window-below)
|
|
|
|
(next-multiframe-window)
|
2023-04-08 16:53:12 +00:00
|
|
|
; show kmn's slipbox
|
|
|
|
(find-file "~/org/orgzly/_slipbox.org")
|
|
|
|
; split window for additional file to show
|
|
|
|
(split-window-below)
|
|
|
|
(next-multiframe-window)
|
|
|
|
; show kmn health notes/data tracker
|
|
|
|
(find-file "~/org/health/health_mike.org")
|
2023-04-08 19:02:06 +00:00
|
|
|
; switch to top of agenda window so most useful window is focused
|
2023-04-08 17:27:42 +00:00
|
|
|
(next-multiframe-window)
|
|
|
|
(goto-char 0)
|
|
|
|
)
|
2023-04-08 19:22:25 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; org-mode workspace for termux devices (mobile / android)
|
|
|
|
(defun kmn/workspace-org-single-window ()
|
|
|
|
(interactive)
|
|
|
|
; start with fresh frame
|
|
|
|
(delete-other-windows)
|
|
|
|
(kmn/kill-other-buffers)
|
|
|
|
; Open main files used as 'gateway' to everything else
|
|
|
|
(find-file "~/org/health/health_houdini.org")
|
|
|
|
(find-file "~/org/health/health_mike.org")
|
|
|
|
(find-file "~/org/orgzly/_habits.org")
|
|
|
|
(find-file "~/org/orgzly/_todo.org")
|
|
|
|
(find-file "~/org/orgzly/_slipbox.org")
|
|
|
|
(find-file "~/org/_index.org")
|
|
|
|
; Personal startup screen - orgmode agenda with all TODO
|
|
|
|
(org-agenda nil "r")
|
|
|
|
; start at the top of the agenda
|
|
|
|
(goto-char 0)
|
|
|
|
)
|
2023-04-08 17:27:42 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; empty code workspace
|
2023-04-08 18:52:14 +00:00
|
|
|
(defun kmn/workspace-code-empty (&optional dir_path)
|
2023-04-08 17:27:42 +00:00
|
|
|
(interactive)
|
|
|
|
(delete-other-windows)
|
2023-04-08 18:52:14 +00:00
|
|
|
(kmn/kill-other-buffers)
|
2023-04-10 19:22:13 +00:00
|
|
|
(kill-buffer "*scratch*")
|
|
|
|
(scratch 'text-mode)
|
2023-04-08 17:27:42 +00:00
|
|
|
; show dired at `~` in left side window
|
2023-04-08 18:52:14 +00:00
|
|
|
(kmn/dired-directory-on-left dir_path)
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; emacs config development
|
|
|
|
(defun kmn/workspace-code-emacs-config()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-code-empty "~/.emacs.d.profiles")
|
|
|
|
(find-file "~/.emacs.d.profiles/org/init.el")
|
|
|
|
(find-file "~/.emacs.d.profiles/code/init.el")
|
|
|
|
(find-file "~/.emacs.d.profiles/common/_global.el")
|
|
|
|
(find-file "~/.emacs.d.profiles/common/generic_functions.el")
|
|
|
|
(find-file "~/.emacs.d.profiles/common/workspaces.el")
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; hugo development
|
|
|
|
(defun kmn/workspace-code-generic()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-code-empty "~/src")
|
2023-04-08 16:53:12 +00:00
|
|
|
)
|