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-22 20:08:56 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Reusable hugo dev workspace
|
|
|
|
(defun kmn/workspace-hugo-generic (src-sub-dir)
|
2023-08-01 16:31:34 +00:00
|
|
|
(interactive)
|
|
|
|
(kmn/possibly-create-frame)
|
2023-04-22 20:08:56 +00:00
|
|
|
(delete-other-windows)
|
|
|
|
(centaur-tabs-mode t)
|
|
|
|
(setq src-sub-dir (concat "~/src/" src-sub-dir))
|
|
|
|
(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")
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Hugo blog workspace
|
|
|
|
(defun kmn/workspace-hugo-blog ()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-hugo-generic "blog.kemonine.info")
|
|
|
|
(find-file "~/org/blog/_blog.org")
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Hugo accessible.tips workspace
|
|
|
|
(defun kmn/workspace-hugo-accessible-tips ()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-hugo-generic "accessible.tips")
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Hugo culinary.kemonine.info workspace
|
|
|
|
(defun kmn/workspace-hugo-culinary ()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-hugo-generic "culinary")
|
|
|
|
(find-file "~/org/culinary/_culinary.org")
|
|
|
|
(find-file "~/org/culinary/_recipes.org")
|
|
|
|
)
|
|
|
|
|
2023-04-08 16:53:12 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; org-mode workspace
|
|
|
|
(defun kmn/workspace-org ()
|
|
|
|
(interactive)
|
2023-08-01 16:31:34 +00:00
|
|
|
(kmn/possibly-create-frame)
|
2023-04-08 16:53:12 +00:00
|
|
|
; start with fresh frame
|
|
|
|
(delete-other-windows)
|
2023-04-08 19:02:06 +00:00
|
|
|
(kmn/kill-other-buffers)
|
2023-04-11 13:28:16 +00:00
|
|
|
(ignore-errors (kill-buffer "*scratch*"))
|
2024-03-07 15:28:03 +00:00
|
|
|
; Open main files used as 'gateway' to everything else
|
|
|
|
(find-file "~/org/orgzly/_habits.org")
|
|
|
|
(find-file "~/org/orgzly/_todo.org")
|
|
|
|
(find-file "~/org/orgzly/_slipbox.org")
|
|
|
|
(find-file "~/org/_index.org")
|
2023-04-15 15:00:11 +00:00
|
|
|
; top window for habits/scheduled
|
|
|
|
(org-agenda nil "h")
|
|
|
|
(goto-char 0)
|
|
|
|
; main todo/slipbox
|
2023-04-08 16:53:12 +00:00
|
|
|
(split-window-below)
|
|
|
|
(next-multiframe-window)
|
2023-04-15 15:00:11 +00:00
|
|
|
(org-agenda nil "t")
|
|
|
|
(goto-char 0)
|
2023-04-08 17:27:42 +00:00
|
|
|
(next-multiframe-window)
|
|
|
|
)
|
2023-04-11 16:08:54 +00:00
|
|
|
|
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)
|
2023-04-11 13:28:16 +00:00
|
|
|
(ignore-errors (kill-buffer "*scratch*"))
|
2023-04-08 19:22:25 +00:00
|
|
|
; Open main files used as 'gateway' to everything else
|
|
|
|
(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
|
|
|
|
2023-08-08 20:27:01 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; org-mode workspace for general kb work that doesnt use the agenda
|
|
|
|
(defun kmn/workspace-org-index ()
|
|
|
|
(interactive)
|
|
|
|
(kmn/possibly-create-frame)
|
|
|
|
; start with fresh frame
|
|
|
|
(delete-other-windows)
|
|
|
|
; setup scratch on right
|
|
|
|
(kmn/scratch-text-on-right)
|
|
|
|
(goto-char 0)
|
|
|
|
; Open main files used as 'gateway' to everything else
|
|
|
|
(find-file "~/org/_index.org")
|
|
|
|
(goto-char 0)
|
|
|
|
)
|
|
|
|
|
2024-03-02 17:18:18 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; org-mode workspace for culinary work that doesnt use the agenda
|
|
|
|
(defun kmn/workspace-org-culinary ()
|
|
|
|
(interactive)
|
|
|
|
(kmn/possibly-create-frame)
|
|
|
|
; start with fresh frame
|
|
|
|
(delete-other-windows)
|
|
|
|
; setup scratch on right
|
|
|
|
(kmn/scratch-text-on-left)
|
|
|
|
(goto-char 0)
|
|
|
|
; Open main files used as 'gateway' to everything else
|
|
|
|
(find-file "~/org/culinary/_culinary.org")
|
|
|
|
(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)
|
2023-08-01 16:31:34 +00:00
|
|
|
(kmn/possibly-create-frame)
|
2023-04-08 17:27:42 +00:00
|
|
|
(delete-other-windows)
|
2023-04-08 18:52:14 +00:00
|
|
|
(kmn/kill-other-buffers)
|
2023-04-11 13:28:16 +00:00
|
|
|
(ignore-errors (kill-buffer "*scratch*"))
|
2023-04-10 19:22:13 +00:00
|
|
|
(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)
|
|
|
|
)
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; hugo development
|
|
|
|
(defun kmn/workspace-code-generic()
|
|
|
|
(interactive)
|
|
|
|
(kmn/workspace-code-empty "~/src")
|
2023-04-08 16:53:12 +00:00
|
|
|
)
|
2023-04-11 19:44:25 +00:00
|
|
|
|
2024-03-07 17:58:46 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; _global.el for scratch workspace definitions
|