Archived
1
0
Fork 0

add day job initial config

This commit is contained in:
KemoNine 2023-04-11 12:08:54 -04:00
parent 80a7dc502e
commit f8c273e7fd
6 changed files with 115 additions and 0 deletions

View file

@ -14,6 +14,11 @@
(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 (eq system-type 'windows-nt) (when (eq system-type 'windows-nt)
@ -25,6 +30,10 @@
(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")

View file

@ -52,6 +52,31 @@
) )
) )
(when kmn/is-dayjob
(defun kmn/workspace-org ()
(interactive)
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
(ignore-errors (kill-buffer "*scratch*"))
; front load org-agenda so it doesnt reshuffle the frame layout on us
(org-agenda nil "r")
(split-window-below)
(next-multiframe-window)
; show slipbox
(find-file "~/org/orgzly/_slipbox.org")
; split window for additional file to show
(split-window-below)
(next-multiframe-window)
(find-file "~/org/_habits.org")
(find-file "~/org/_todo.org")
(find-file "~/org/_index.org")
; switch to top of agenda window so most useful window is focused
(next-multiframe-window)
(goto-char 0)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; org-mode workspace for termux devices (mobile / android) ; org-mode workspace for termux devices (mobile / android)
(when (not kmn/is-dayjob) (when (not kmn/is-dayjob)

View file

@ -90,6 +90,13 @@
"~/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"
))
)
(require 'org-super-agenda) (require 'org-super-agenda)
(org-super-agenda-mode) (org-super-agenda-mode)
@ -186,3 +193,43 @@
) )
) )
) )
(when kmn/is-dayjob
(setq org-super-agenda-groups
'(
(:name "Habits" :habit 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)
))
(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)
))
)
)
)
)
)

View file

@ -168,3 +168,21 @@
) )
)) ))
) )
(when (not 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"
)
))
)

View file

@ -28,3 +28,11 @@
(lambda () (interactive) (find-file "~/org/culinary/_culinary.org")) (lambda () (interactive) (find-file "~/org/culinary/_culinary.org"))
) )
) )
(when kmn/is-dayjob
(global-set-key (kbd "C-c t")
(lambda () (interactive) (find-file "~/org/_todo.org"))
)
(global-set-key (kbd "C-c s")
(lambda () (interactive) (find-file "~/org/_slipbox.org"))
)
)

View file

@ -13,6 +13,10 @@
(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
@ -26,6 +30,10 @@
(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")