163 lines
5.2 KiB
EmacsLisp
163 lines
5.2 KiB
EmacsLisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; various workspaces used day to day
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; load most recent auto save
|
|
(defun kmn/workspace-load-auto ()
|
|
(interactive)
|
|
(persp-load-state-from-file "persp-auto-save")
|
|
(persistent-scratch-restore)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; save the current workspace to `latest` filename
|
|
(defun kmn/workspace-save-latest ()
|
|
(interactive)
|
|
(persp-save-state-to-file "latest")
|
|
(persistent-scratch-save-to-file
|
|
(expand-file-name ".persistent-scratch-latest" user-emacs-directory))
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; load `latest` file name to current workspace
|
|
(defun kmn/workspace-load-latest ()
|
|
(interactive)
|
|
(persp-load-state-from-file "latest")
|
|
(persistent-scratch-restore-from-file
|
|
(expand-file-name ".persistent-scratch-latest" user-emacs-directory))
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; 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))
|
|
(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")
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; org-mode workspace
|
|
(defun kmn/workspace-org ()
|
|
(interactive)
|
|
(kmn/possibly-create-frame)
|
|
; start with fresh frame
|
|
(delete-other-windows)
|
|
(kmn/kill-other-buffers)
|
|
(ignore-errors (kill-buffer "*scratch*"))
|
|
; Open main files used as 'gateway' to everything else
|
|
(find-file "~/org/_habits.org")
|
|
(find-file "~/org/_todo.org")
|
|
(find-file "~/org/_slipbox.org")
|
|
(find-file "~/org/_index.org")
|
|
; top window for habits/scheduled
|
|
(org-agenda nil "h")
|
|
(goto-char 0)
|
|
; main todo/slipbox
|
|
(split-window-below)
|
|
(next-multiframe-window)
|
|
(org-agenda nil "t")
|
|
(goto-char 0)
|
|
(next-multiframe-window)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; 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)
|
|
(ignore-errors (kill-buffer "*scratch*"))
|
|
; Open main files used as 'gateway' to everything else
|
|
(find-file "~/org/_habits.org")
|
|
(find-file "~/org/_todo.org")
|
|
(find-file "~/org/_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)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; 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)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; 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)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; 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*"))
|
|
(scratch 'text-mode)
|
|
; show dired at `~` in left side window
|
|
(kmn/dired-directory-on-left dir_path)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; hugo development
|
|
(defun kmn/workspace-code-generic()
|
|
(interactive)
|
|
(kmn/workspace-code-empty "~/src")
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; _global.el for scratch workspace definitions
|