Compare commits
4 commits
a92bd363e4
...
014025d8a7
Author | SHA1 | Date | |
---|---|---|---|
KemoNine | 014025d8a7 | ||
KemoNine | 9025732e3b | ||
KemoNine | e8745cf990 | ||
KemoNine | 5ea1a73beb |
15
code/init.el
15
code/init.el
|
@ -14,11 +14,6 @@
|
||||||
(setq kmn/is-termux
|
(setq kmn/is-termux
|
||||||
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
||||||
|
|
||||||
;; day job env?
|
|
||||||
(setq kmn/is-dayjob
|
|
||||||
(string= "PCE" (getenv "USERDOMAIN"))
|
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; os specific config
|
; os specific config
|
||||||
(when (and (eq system-type 'windows-nt)
|
(when (and (eq system-type 'windows-nt)
|
||||||
|
@ -31,10 +26,6 @@
|
||||||
(add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/sqlite3")
|
(add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/sqlite3")
|
||||||
(add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/MultiMarkdown-Windows-6.6.0/bin")
|
(add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/MultiMarkdown-Windows-6.6.0/bin")
|
||||||
)
|
)
|
||||||
(when kmn/is-dayjob
|
|
||||||
(setenv "HOME" "I:/")
|
|
||||||
(setq default-directory "I:/")
|
|
||||||
)
|
|
||||||
(when kmn/is-termux
|
(when kmn/is-termux
|
||||||
; setup storage locations -- cheat so mobile/desktop look alike for file urls
|
; setup storage locations -- cheat so mobile/desktop look alike for file urls
|
||||||
;(setq user-init-file "/data/data/com.termux/files/home/storage/shared/.emacs")
|
;(setq user-init-file "/data/data/com.termux/files/home/storage/shared/.emacs")
|
||||||
|
@ -75,11 +66,9 @@
|
||||||
(add-to-list 'package-selected-packages
|
(add-to-list 'package-selected-packages
|
||||||
'(helm-xref helm-lsp lsp-ui lsp-mode json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
|
'(helm-xref helm-lsp lsp-ui lsp-mode json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
|
||||||
)
|
)
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(add-to-list 'package-selected-packages
|
(add-to-list 'package-selected-packages
|
||||||
'(auctex-latexmk auctex dockerfile-mode)
|
'(auctex-latexmk auctex dockerfile-mode)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; activate helm after its fully configured (may be configured beyond global defaults in other profiles so we have to activate locally)
|
; activate helm after its fully configured (may be configured beyond global defaults in other profiles so we have to activate locally)
|
||||||
|
@ -123,10 +112,8 @@
|
||||||
(setq lua-indent-level 4)
|
(setq lua-indent-level 4)
|
||||||
|
|
||||||
; dockerfile
|
; dockerfile
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(autoload 'dockerfile-mode "dockerfile-mode" "Dockerfile editing mode." t)
|
(autoload 'dockerfile-mode "dockerfile-mode" "Dockerfile editing mode." t)
|
||||||
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))
|
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))
|
||||||
)
|
|
||||||
|
|
||||||
; yaml
|
; yaml
|
||||||
(autoload 'yaml-mode "yaml-mode" "YAML editing mode." t)
|
(autoload 'yaml-mode "yaml-mode" "YAML editing mode." t)
|
||||||
|
@ -159,12 +146,10 @@
|
||||||
(add-to-list 'auto-mode-alist '("\\.ps1\\'" . powershell))
|
(add-to-list 'auto-mode-alist '("\\.ps1\\'" . powershell))
|
||||||
|
|
||||||
; [la]tex
|
; [la]tex
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(use-package tex
|
(use-package tex
|
||||||
:ensure auctex)
|
:ensure auctex)
|
||||||
(setq TeX-parse-self t)
|
(setq TeX-parse-self t)
|
||||||
(setq-default TeX-master nil)
|
(setq-default TeX-master nil)
|
||||||
)
|
|
||||||
|
|
||||||
; python
|
; python
|
||||||
(autoload 'python-mode "python-mode" "python editing mode" t)
|
(autoload 'python-mode "python-mode" "python editing mode" t)
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; start emacs server (daemon) via real client so org-mode and other 'workspaces' can be setup as faux daemonized emacs
|
; windows performance tweaks, add to top of init.el as well
|
||||||
; (server-start)
|
(when (eq system-type 'windows-nt)
|
||||||
|
; https://lists.gnu.org/archive/html/bug-gnu-emacs/2012-10/msg00274.html
|
||||||
|
; https://gioorgi.com/2013/solving-emacs-freeze-andor-slowdown-on-windows7/
|
||||||
|
(setq w32-get-true-file-attributes nil)
|
||||||
|
|
||||||
;; critical built in for tuning startup
|
; https://www.reddit.com/r/emacs/comments/c9ef5i/comment/esx5ndr/
|
||||||
(setq kmn/is-dayjob
|
(setq inhibit-compacting-font-caches t)
|
||||||
(string= "PCE" (getenv "USERDOMAIN"))
|
|
||||||
|
; https://www.reddit.com/r/emacs/comments/c9ef5i/comment/esx5snw/
|
||||||
|
(when (boundp 'w32-pipe-read-delay)
|
||||||
|
(setq w32-pipe-read-delay 0))
|
||||||
)
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -15,11 +21,9 @@
|
||||||
(add-to-list 'package-selected-packages
|
(add-to-list 'package-selected-packages
|
||||||
'(which-key all-the-icons revert-buffer-all centaur-tabs scratch persistent-scratch persp-mode rainbow-mode rainbow-delimiters markdown-mode focus zoom popwin dired-single diredfl doominhibitinhibit-modeline helpful helm helm-org dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package)
|
'(which-key all-the-icons revert-buffer-all centaur-tabs scratch persistent-scratch persp-mode rainbow-mode rainbow-delimiters markdown-mode focus zoom popwin dired-single diredfl doominhibitinhibit-modeline helpful helm helm-org dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package)
|
||||||
)
|
)
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(add-to-list 'package-selected-packages
|
(add-to-list 'package-selected-packages
|
||||||
'(devdocs devdocs-browser magit helm-ls-git xclip)
|
'(devdocs devdocs-browser magit helm-ls-git xclip)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
|
|
||||||
; helper functions
|
; helper functions
|
||||||
|
@ -180,7 +184,6 @@
|
||||||
("\\.markdown\\'" . markdown-mode))
|
("\\.markdown\\'" . markdown-mode))
|
||||||
:init (setq markdown-command "multimarkdown"))
|
:init (setq markdown-command "multimarkdown"))
|
||||||
|
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(use-package markdown-preview-mode
|
(use-package markdown-preview-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:if (boundp 'mdcommand)
|
:if (boundp 'mdcommand)
|
||||||
|
@ -192,7 +195,6 @@
|
||||||
(markdown-preview-host "127.0.0.1")
|
(markdown-preview-host "127.0.0.1")
|
||||||
(markdown-preview-http-host "127.0.0.1"))
|
(markdown-preview-http-host "127.0.0.1"))
|
||||||
(setq markdown-preview-stylesheets (list "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css"))
|
(setq markdown-preview-stylesheets (list "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css"))
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; origami config
|
; origami config
|
||||||
|
@ -261,6 +263,10 @@
|
||||||
(global-set-key (kbd "C-s") 'isearch-forward)
|
(global-set-key (kbd "C-s") 'isearch-forward)
|
||||||
(global-set-key (kbd "C-f") 'isearch-forward)
|
(global-set-key (kbd "C-f") 'isearch-forward)
|
||||||
|
|
||||||
|
; C-h find/replace
|
||||||
|
(global-set-key (kbd "C-h") 'query-replace)
|
||||||
|
(global-set-key (kbd "C-H") 'query-replace-regexp)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Set some global config
|
; Set some global config
|
||||||
(setq inhibit-splash-screen t) ; why do you need to tell me things i know by default
|
(setq inhibit-splash-screen t) ; why do you need to tell me things i know by default
|
||||||
|
@ -285,9 +291,7 @@
|
||||||
(global-auto-revert-mode 1)
|
(global-auto-revert-mode 1)
|
||||||
|
|
||||||
; Clipboard integration
|
; Clipboard integration
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(use-package xclip :config (xclip-mode 1))
|
(use-package xclip :config (xclip-mode 1))
|
||||||
)
|
|
||||||
|
|
||||||
;; use y or n instead of yes or no
|
;; use y or n instead of yes or no
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
|
@ -454,7 +458,6 @@
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; flyspell
|
; flyspell
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(require 'flyspell)
|
(require 'flyspell)
|
||||||
(setenv "LANG" "en_US")
|
(setenv "LANG" "en_US")
|
||||||
(setq ispell-program-name "hunspell")
|
(setq ispell-program-name "hunspell")
|
||||||
|
@ -500,7 +503,6 @@
|
||||||
; flyspell keyboard shortcuts
|
; flyspell keyboard shortcuts
|
||||||
(global-set-key (kbd "C-x y") 'flyspell-toggle)
|
(global-set-key (kbd "C-x y") 'flyspell-toggle)
|
||||||
(global-set-key (kbd "C-x w") 'flyspell-correct-wrapper)
|
(global-set-key (kbd "C-x w") 'flyspell-correct-wrapper)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; zoom (replaces golden-ratio)
|
; zoom (replaces golden-ratio)
|
||||||
|
@ -535,6 +537,8 @@
|
||||||
(use-package popwin
|
(use-package popwin
|
||||||
:bind ( :map popwin:keymap
|
:bind ( :map popwin:keymap
|
||||||
("h" . popwin:close-popup-window)
|
("h" . popwin:close-popup-window)
|
||||||
|
("r" . kmn/workspace-frame-scratch)
|
||||||
|
("R" . kmn/popwin-scratch)
|
||||||
("q" . kmn/popwin-quick-ref))
|
("q" . kmn/popwin-quick-ref))
|
||||||
:config
|
:config
|
||||||
(global-set-key (kbd "C-w") popwin:keymap)
|
(global-set-key (kbd "C-w") popwin:keymap)
|
||||||
|
@ -544,7 +548,6 @@
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; devdocs
|
; devdocs
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(require 'devdocs)
|
(require 'devdocs)
|
||||||
(require 'devdocs-browser)
|
(require 'devdocs-browser)
|
||||||
; devdocs
|
; devdocs
|
||||||
|
@ -553,7 +556,6 @@
|
||||||
; devdocs-browser
|
; devdocs-browser
|
||||||
(setq devdocs-browser-cache-directory "~/devdocs-browser")
|
(setq devdocs-browser-cache-directory "~/devdocs-browser")
|
||||||
(global-set-key (kbd "C-x n") 'devdocs-browser-open)
|
(global-set-key (kbd "C-x n") 'devdocs-browser-open)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; tabs-bar
|
; tabs-bar
|
||||||
|
|
|
@ -150,6 +150,33 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; open text-mode scratch in left side window
|
||||||
|
(defun kmn/scratch-prompt-on-left ()
|
||||||
|
(defvar parameters
|
||||||
|
'(window-parameters . ((no-other-window . t)
|
||||||
|
(no-delete-other-windows . t))))
|
||||||
|
|
||||||
|
(setq fit-window-to-buffer-horizontally t)
|
||||||
|
(setq window-resize-pixelwise t)
|
||||||
|
|
||||||
|
"Display `default-directory' in side window on left, hiding details."
|
||||||
|
(interactive)
|
||||||
|
(let ((buffer (scratch (let ((current-prefix-arg t)) (scratch--buffer-querymode)))))
|
||||||
|
(display-buffer-in-side-window
|
||||||
|
buffer `((side . left) (slot . -1)
|
||||||
|
(window-width . fit-window-to-buffer)
|
||||||
|
, parameters)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; text-mode scratch buffer as a pop up window
|
||||||
|
(defun kmn/popwin-scratch ()
|
||||||
|
(interactive)
|
||||||
|
(popwin:popup-buffer (scratch 'text-mode)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; quick reference notes as a pop up window
|
; quick reference notes as a pop up window
|
||||||
(defun kmn/popwin-quick-ref ()
|
(defun kmn/popwin-quick-ref ()
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; org-mode workspace
|
; org-mode workspace
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(defun kmn/workspace-org ()
|
(defun kmn/workspace-org ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(kmn/possibly-create-frame)
|
(kmn/possibly-create-frame)
|
||||||
|
@ -98,35 +97,9 @@
|
||||||
; focus top most frame
|
; focus top most frame
|
||||||
(next-multiframe-window)
|
(next-multiframe-window)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
(when kmn/is-dayjob
|
|
||||||
(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*"))
|
|
||||||
; show varied org files so their buffers exist prior to jumping in from org-agenda
|
|
||||||
(find-file "~/org/_habits.org")
|
|
||||||
(find-file "~/org/_index.org")
|
|
||||||
(find-file "~/org/_todo.org")
|
|
||||||
(find-file "~/org/_slipbox.org")
|
|
||||||
; front load org-agenda so it doesnt reshuffle the frame layout on us
|
|
||||||
(org-agenda nil "r")
|
|
||||||
; show scratch on right
|
|
||||||
(kmn/scratch-text-on-right)
|
|
||||||
; delete the current window (agenda triggers a vertical split on my computer, this undoes that non desired outcome)
|
|
||||||
(delete-window)
|
|
||||||
; switch to top of agenda window where i prefer to start my reading
|
|
||||||
(goto-char 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; org-mode workspace for termux devices (mobile / android)
|
; org-mode workspace for termux devices (mobile / android)
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(defun kmn/workspace-org-single-window ()
|
(defun kmn/workspace-org-single-window ()
|
||||||
(interactive)
|
(interactive)
|
||||||
; start with fresh frame
|
; start with fresh frame
|
||||||
|
@ -146,11 +119,9 @@
|
||||||
; start at the top of the agenda
|
; start at the top of the agenda
|
||||||
(goto-char 0)
|
(goto-char 0)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; org-mode workspace for general kb work that doesnt use the agenda
|
; org-mode workspace for general kb work that doesnt use the agenda
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(defun kmn/workspace-org-index ()
|
(defun kmn/workspace-org-index ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(kmn/possibly-create-frame)
|
(kmn/possibly-create-frame)
|
||||||
|
@ -163,11 +134,9 @@
|
||||||
(find-file "~/org/_index.org")
|
(find-file "~/org/_index.org")
|
||||||
(goto-char 0)
|
(goto-char 0)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; org-mode workspace for culinary work that doesnt use the agenda
|
; org-mode workspace for culinary work that doesnt use the agenda
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(defun kmn/workspace-org-culinary ()
|
(defun kmn/workspace-org-culinary ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(kmn/possibly-create-frame)
|
(kmn/possibly-create-frame)
|
||||||
|
@ -180,7 +149,6 @@
|
||||||
(find-file "~/org/culinary/_culinary.org")
|
(find-file "~/org/culinary/_culinary.org")
|
||||||
(goto-char 0)
|
(goto-char 0)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; empty code workspace
|
; empty code workspace
|
||||||
|
|
|
@ -80,7 +80,6 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'")
|
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'")
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(setq org-agenda-files (list
|
(setq org-agenda-files (list
|
||||||
"~/org/health/_health.org"
|
"~/org/health/_health.org"
|
||||||
"~/org/health/health_couples.org"
|
"~/org/health/health_couples.org"
|
||||||
|
@ -89,14 +88,7 @@
|
||||||
"~/org/orgzly/_todo.org"
|
"~/org/orgzly/_todo.org"
|
||||||
"~/org/orgzly/_slipbox.org"
|
"~/org/orgzly/_slipbox.org"
|
||||||
))
|
))
|
||||||
)
|
|
||||||
(when kmn/is-dayjob
|
|
||||||
(setq org-agenda-files (list
|
|
||||||
"~/org/_index.org"
|
|
||||||
"~/org/_slipbox.org"
|
|
||||||
"~/org/_todo.org"
|
|
||||||
))
|
|
||||||
)
|
|
||||||
|
|
||||||
; use *all* org agenda files as refile targets
|
; use *all* org agenda files as refile targets
|
||||||
(setq org-refile-targets
|
(setq org-refile-targets
|
||||||
|
@ -106,7 +98,6 @@
|
||||||
(require 'org-super-agenda)
|
(require 'org-super-agenda)
|
||||||
(org-super-agenda-mode)
|
(org-super-agenda-mode)
|
||||||
|
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(setq org-super-agenda-groups
|
(setq org-super-agenda-groups
|
||||||
'(
|
'(
|
||||||
(:name "Health"
|
(:name "Health"
|
||||||
|
@ -241,47 +232,4 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
(when kmn/is-dayjob
|
|
||||||
(setq org-super-agenda-groups
|
|
||||||
'(
|
|
||||||
(:name "Habits" :habit t)
|
|
||||||
(:order 100 :auto-parent "t")
|
|
||||||
(:name "Active"
|
|
||||||
:todo ("WIP" "READY"))
|
|
||||||
(:name "Slip Box" :tag "slipbox")
|
|
||||||
(:name "To Do" :priority>= "C")
|
|
||||||
(:name "Low Priority" :priority< "C")))
|
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
|
||||||
'(
|
|
||||||
("r" "PCE"
|
|
||||||
(
|
|
||||||
(agenda "" (
|
|
||||||
(org-agenda-overriding-header "Scheduled")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
(org-deadline-warning-days 14)
|
|
||||||
(org-agenda-entry-types '(:deadline :scheduled))
|
|
||||||
))
|
|
||||||
(agenda "" (
|
|
||||||
(org-agenda-overriding-header "Habits")
|
|
||||||
(org-agenda-files (list "~/org/_habits.org"))
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
))
|
|
||||||
(todo "WIP" (
|
|
||||||
(org-agenda-overriding-header "WIP")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
))
|
|
||||||
(todo "READY" (
|
|
||||||
(org-agenda-overriding-header "Ready")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
))
|
|
||||||
(tags-todo "-TODO=\"WIP\"-TODO=\"READY\"" (
|
|
||||||
(org-agenda-overriding-header "")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
(concat prefix (org-time-stamp nil))))
|
(concat prefix (org-time-stamp nil))))
|
||||||
|
|
||||||
; orgmode capture templates
|
; orgmode capture templates
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(setq org-capture-templates '(
|
(setq org-capture-templates '(
|
||||||
("d" "TODO (Main)" entry
|
("d" "TODO (Main)" entry
|
||||||
(file "~/org/orgzly/_todo.org")
|
(file "~/org/orgzly/_todo.org")
|
||||||
|
@ -206,29 +205,3 @@
|
||||||
:empty-lines-before 1
|
:empty-lines-before 1
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
)
|
|
||||||
(when kmn/is-dayjob
|
|
||||||
(setq org-capture-templates '(
|
|
||||||
("d" "TODO (Main)" entry
|
|
||||||
(file "~/org/_todo.org")
|
|
||||||
(file "~/org/template_todo.org")
|
|
||||||
:prepend t
|
|
||||||
:immediate-finish "f"
|
|
||||||
:jump-to-captured "t"
|
|
||||||
)
|
|
||||||
("s" "TODO (Slipbox)" entry
|
|
||||||
(file "~/org/_slipbox.org")
|
|
||||||
(file "~/org/template_slipbox.org")
|
|
||||||
:prepend t
|
|
||||||
:immediate-finish "f"
|
|
||||||
:jump-to-captured "t"
|
|
||||||
)
|
|
||||||
("p" "Deployment" entry
|
|
||||||
(file "~/org/_todo.org")
|
|
||||||
(file "~/org/template_deploy.org")
|
|
||||||
:prepend t
|
|
||||||
:immediate-finish "f"
|
|
||||||
:jump-to-captured "t"
|
|
||||||
)
|
|
||||||
))
|
|
||||||
)
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
(global-set-key (kbd "C-c d n")
|
(global-set-key (kbd "C-c d n")
|
||||||
(lambda () (interactive) (find-file "~/org/_index.org"))
|
(lambda () (interactive) (find-file "~/org/_index.org"))
|
||||||
)
|
)
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(global-set-key (kbd "C-c d t")
|
(global-set-key (kbd "C-c d t")
|
||||||
(lambda () (interactive) (find-file "~/org/orgzly/_todo.org"))
|
(lambda () (interactive) (find-file "~/org/orgzly/_todo.org"))
|
||||||
)
|
)
|
||||||
|
@ -30,12 +29,3 @@
|
||||||
(lambda () (interactive) (find-file "~/org/photography/_photography.org"))
|
(lambda () (interactive) (find-file "~/org/photography/_photography.org"))
|
||||||
)
|
)
|
||||||
(global-set-key (kbd "C-c d r") 'kmn/workspace-org-culinary)
|
(global-set-key (kbd "C-c d r") 'kmn/workspace-org-culinary)
|
||||||
)
|
|
||||||
(when kmn/is-dayjob
|
|
||||||
(global-set-key (kbd "C-c d t")
|
|
||||||
(lambda () (interactive) (find-file "~/org/_todo.org"))
|
|
||||||
)
|
|
||||||
(global-set-key (kbd "C-c d s")
|
|
||||||
(lambda () (interactive) (find-file "~/org/_slipbox.org"))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
(setq org-todo-keyword-faces
|
(setq org-todo-keyword-faces
|
||||||
'(("TODO" . "turquoise") ("READY" . "yellow") ("WIP" . "magenta") ("COMPLETE" . "green") ("CANCELED" . "orange"))
|
'(("TODO" . "turquoise") ("READY" . "yellow") ("WIP" . "magenta") ("COMPLETE" . "green") ("CANCELED" . "orange"))
|
||||||
)
|
)
|
||||||
(when (not kmn/is-dayjob)
|
|
||||||
(setq org-tags-exclude-from-inheritance (quote ("@recipe" "@budgetbytes"
|
(setq org-tags-exclude-from-inheritance (quote ("@recipe" "@budgetbytes"
|
||||||
"@vegan" "@vegetarian"
|
"@vegan" "@vegetarian"
|
||||||
"@instapot" "@slowcooker" "@onepot" "@oven" "@baked" "@baking" "@dehydrator" "@ricecooker"
|
"@instapot" "@slowcooker" "@onepot" "@oven" "@baked" "@baking" "@dehydrator" "@ricecooker"
|
||||||
|
@ -21,4 +20,4 @@
|
||||||
"@coconutmilk" "@oatmilk" "@coconutwater"
|
"@coconutmilk" "@oatmilk" "@coconutwater"
|
||||||
"@kemonine" "@waltdk"
|
"@kemonine" "@waltdk"
|
||||||
)))
|
)))
|
||||||
)
|
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
(require 'subr-x)
|
(require 'subr-x)
|
||||||
(setq kmn/is-termux
|
(setq kmn/is-termux
|
||||||
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
||||||
;; day job env?
|
|
||||||
(setq kmn/is-dayjob
|
|
||||||
(string= "PCE" (getenv "USERDOMAIN"))
|
|
||||||
)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; os specific config
|
; os specific config
|
||||||
|
@ -31,10 +27,6 @@
|
||||||
(add-to-list 'exec-path "C:/msys64/usr/bin/unzip.exe")
|
(add-to-list 'exec-path "C:/msys64/usr/bin/unzip.exe")
|
||||||
(setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH")))
|
(setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH")))
|
||||||
)
|
)
|
||||||
(when kmn/is-dayjob
|
|
||||||
(setenv "HOME" "I:/")
|
|
||||||
(setq default-directory "I:/")
|
|
||||||
)
|
|
||||||
(when kmn/is-termux
|
(when kmn/is-termux
|
||||||
; setup storage locations -- cheat so mobile/desktop look alike for file urls
|
; setup storage locations -- cheat so mobile/desktop look alike for file urls
|
||||||
;(setq user-init-file "/data/data/com.termux/files/home/storage/shared/.emacs")
|
;(setq user-init-file "/data/data/com.termux/files/home/storage/shared/.emacs")
|
||||||
|
|
Reference in a new issue