From a09a2466b2c37d364ee5c8868317c1642c0f0bce Mon Sep 17 00:00:00 2001 From: Sako <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 26 Nov 2023 13:14:09 +0400 Subject: [PATCH] Update emacs.org --- config/emacs/emacs.org | 262 +++++++++++++++++++++-------------------- 1 file changed, 132 insertions(+), 130 deletions(-) diff --git a/config/emacs/emacs.org b/config/emacs/emacs.org index 036ebe1f..0d13a502 100644 --- a/config/emacs/emacs.org +++ b/config/emacs/emacs.org @@ -389,29 +389,44 @@ Should make startup faster, taken from doom-emacs "gci" `(forge-create-issue :which-key "issue") "gcp" `(forge-create-pullreq :which-key "pull request"))) #+end_src -** Emacs-Dashboard +** Dashboard #+begin_src emacs-lisp - (use-package dashboard - :ensure t - :straight t - :config - (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) - ;; Configuration of Dashboard - (setq dashboard-display-icons-p t) ;; display icons on both GUI and terminal - (setq dashboard-icon-type 'nerd-icons) ;; use `nerd-icons' package - ;; Set the title - (setq dashboard-banner-logo-title "Emacs is vscode for nerds") - ;; Set the banner - (setq dashboard-startup-banner 'official) - ;; center everything - (setq dashboard-center-content t) - ;; jump thing - (setq dashboard-show-shortcuts nil) - (setq dashboard-items '((projects . 5) - (agenda . 5))) - (setq dashboard-projects-switch-function 'counsel-projectile-switch-project-by-name) - (setq dashboard-footer-messages '("I think I have Emacs pinky!")) - (dashboard-setup-startup-hook)) + (use-package dashboard + :ensure t + :straight t + :config + (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) + ;; Configuration of Dashboard + (setq dashboard-display-icons-p t) ;; display icons on both GUI and terminal + (setq dashboard-icon-type 'nerd-icons) ;; use `nerd-icons' package + ;; Set the title + (setq dashboard-banner-logo-title "Emacs is vscode for nerds") + ;; Set the banner + (setq dashboard-startup-banner 'official) + ;; center everything + (setq dashboard-center-content t) + ;; jump thing + (setq dashboard-show-shortcuts nil) + (setq dashboard-items '((recent . 3) + (projects . 3) + (agenda . 5))) + (setq dashboard-projects-switch-function 'counsel-projectile-switch-project-by-name) + (setq dashboard-footer-messages '("I think I have Emacs pinky!" + "Eating a burger with no honey mustard" + "why are oranges called oranges?" + "but an apple is not called red" + "TODO find a replacement for hands" + "the best OS it just needs a good text editor" + "why are we still using one thread" + "goodness gracious!!!!" + "kanye west is literally me" + "i drive" + "happy waking up day" + "why are we still using lisp again?" + "one more ai application i swear to god")) + (dashboard-setup-startup-hook) + :hook + (dashboard-mode . hide-mode-line-mode)) #+end_src ** Evil Mode (vim) #+begin_src emacs-lisp @@ -486,14 +501,8 @@ Should make startup faster, taken from doom-emacs #+end_src ** Org-Mode #+begin_src emacs-lisp - (defun sakomacs/org-mode-setup () - (org-indent-mode) - (variable-pitch-mode 1) - (visual-line-mode 1)) - (use-package org :straight t - :hook (org-mode . sakomacs/org-mode-setup) :config (setq org-ellipsis "▼") (setq org-agenda-start-with-log-mode t) @@ -506,22 +515,22 @@ Should make startup faster, taken from doom-emacs (setq org-habit-graph-column 60) ;; archive thingy i forgot - (setq org-refile-targets - '(("archive.org" :maxlevel . 1))) + (setq org-refile-targets + '(("archive.org" :maxlevel . 1))) ;; save org buffer before refile (advice-add 'org-refile :after 'org-save-all-org-buffers) ;; org agenda files - (setq org-agenda-files - '("~/org/tasks.org" - "~/org/school.org" - "~/org/daily.org" - "~/org/irl.org" - "~/org/work.org")) + (setq org-agenda-files + '("~/org/tasks.org" + "~/org/school.org" + "~/org/daily.org" + "~/org/irl.org" + "~/org/work.org")) - ;; Following - (setq org-return-follows-link t) + ;; Following + (setq org-return-follows-link t) ;; org mode src thing (require 'org-tempo) @@ -530,116 +539,109 @@ Should make startup faster, taken from doom-emacs (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) (add-to-list 'org-structure-template-alist '("py" . "src python")) - (setq org-todo-keywords - '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") - (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANCELED(k@)"))) + (setq org-todo-keywords + '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") + (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANCELED(k@)"))) - (setq org-refile-targets - '(("archive.org" :maxlevel . 1) - ("tasks.org" :maxlevel . 1))) + (setq org-refile-targets + '(("archive.org" :maxlevel . 1) + ("tasks.org" :maxlevel . 1))) - ;; Save Org buffers after refiling! - (advice-add 'org-refile :after 'org-save-all-org-buffers) + ;; Save Org buffers after refiling! + (advice-add 'org-refile :after 'org-save-all-org-buffers) - (setq org-tag-alist - '((:startgroup) - ; Put mutually exclusive tags here - (:endgroup) - ("@errand" . ?E) - ("@home" . ?H) - ("@work" . ?W) - ("agenda" . ?a) - ("planning" . ?p) - ("publish" . ?P) - ("batch" . ?b) - ("note" . ?n) - ("idea" . ?i))) + (setq org-tag-alist + '((:startgroup) + ; Put mutually exclusive tags here + (:endgroup) + ("@errand" . ?E) + ("@home" . ?H) + ("@work" . ?W) + ("agenda" . ?a) + ("planning" . ?p) + ("publish" . ?P) + ("batch" . ?b) + ("note" . ?n) + ("idea" . ?i))) - ;; Configure custom agenda views - (setq org-agenda-custom-commands - '(("d" "Dashboard" - ((agenda "" ((org-deadline-warning-days 7))) - (todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))) - (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) + ;; Configure custom agenda views + (setq org-agenda-custom-commands + '(("d" "Dashboard" + ((agenda "" ((org-deadline-warning-days 7))) + (todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))) + (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) - ("n" "Next Tasks" - ((todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))))) + ("n" "Next Tasks" + ((todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))))) - ("W" "Work Tasks" tags-todo "+work-email") + ("W" "Work Tasks" tags-todo "+work-email") - ;; Low-effort next actions - ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" - ((org-agenda-overriding-header "Low Effort Tasks") - (org-agenda-max-todos 20) - (org-agenda-files org-agenda-files))) + ;; Low-effort next actions + ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" + ((org-agenda-overriding-header "Low Effort Tasks") + (org-agenda-max-todos 20) + (org-agenda-files org-agenda-files))) - ("w" "Workflow Status" - ((todo "WAIT" - ((org-agenda-overriding-header "Waiting on External") - (org-agenda-files org-agenda-files))) - (todo "REVIEW" - ((org-agenda-overriding-header "In Review") - (org-agenda-files org-agenda-files))) - (todo "PLAN" - ((org-agenda-overriding-header "In Planning") - (org-agenda-todo-list-sublevels nil) - (org-agenda-files org-agenda-files))) - (todo "BACKLOG" - ((org-agenda-overriding-header "Project Backlog") - (org-agenda-todo-list-sublevels nil) - (org-agenda-files org-agenda-files))) - (todo "READY" - ((org-agenda-overriding-header "Ready for Work") - (org-agenda-files org-agenda-files))) - (todo "ACTIVE" - ((org-agenda-overriding-header "Active Projects") - (org-agenda-files org-agenda-files))) - (todo "COMPLETED" - ((org-agenda-overriding-header "Completed Projects") - (org-agenda-files org-agenda-files))) - (todo "CANC" - ((org-agenda-overriding-header "Cancelled Projects") - (org-agenda-files org-agenda-files))))))) + ("w" "Workflow Status" + ((todo "WAIT" + ((org-agenda-overriding-header "Waiting on External") + (org-agenda-files org-agenda-files))) + (todo "REVIEW" + ((org-agenda-overriding-header "In Review") + (org-agenda-files org-agenda-files))) + (todo "PLAN" + ((org-agenda-overriding-header "In Planning") + (org-agenda-todo-list-sublevels nil) + (org-agenda-files org-agenda-files))) + (todo "BACKLOG" + ((org-agenda-overriding-header "Project Backlog") + (org-agenda-todo-list-sublevels nil) + (org-agenda-files org-agenda-files))) + (todo "READY" + ((org-agenda-overriding-header "Ready for Work") + (org-agenda-files org-agenda-files))) + (todo "ACTIVE" + ((org-agenda-overriding-header "Active Projects") + (org-agenda-files org-agenda-files))) + (todo "COMPLETED" + ((org-agenda-overriding-header "Completed Projects") + (org-agenda-files org-agenda-files))) + (todo "CANC" + ((org-agenda-overriding-header "Cancelled Projects") + (org-agenda-files org-agenda-files))))))) - (setq org-capture-templates - `(("t" "Tasks / Projects") - ("tt" "Task" entry (file+olp "~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" "Inbox") - "* TODO %?\n %U\n %a\n %i" :empty-lines 1) + (setq org-capture-templates + `(("t" "Tasks / Projects") + ("tt" "Task" entry (file+olp "~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" "Inbox") + "* TODO %?\n %U\n %a\n %i" :empty-lines 1) - ("j" "Journal Entries") - ("jj" "Journal" entry - (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") - "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" - ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") - :clock-in :clock-resume - :empty-lines 1) + ("j" "Journal Entries") + ("jj" "Journal" entry + (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" + ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") + :clock-in :clock-resume + :empty-lines 1) - ("w" "Workflows") - ("we" "Checking Email" entry (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") - "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) + ("w" "Workflows") + ("we" "Checking Email" entry (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) - ("m" "Metrics Capture") - ("mw" "Weight" table-line (file+headline "~/Projects/Code/emacs-from-scratch/OrgFiles/Metrics.org" "Weight") - "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t)))) + ("m" "Metrics Capture") + ("mw" "Weight" table-line (file+headline "~/Projects/Code/emacs-from-scratch/OrgFiles/Metrics.org" "Weight") + "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t)))) ;; make it look better (use-package org-superstar :after org :hook (org-mode . org-superstar-mode) - :custom - (org-superstar-headline-bullets-list'("◉" "○" "●" "○" "●" "○" "●"))) - - ;; word - (defun sakomacs/org-mode-visual-fill () - (setq visual-fill-column-width 100 - visual-fill-column-center-text t) - (visual-fill-column-mode 1)) - - (use-package visual-fill-column - :hook (org-mode . sakomacs/org-mode-visual-fill)) + :config + (setq org-superstar-headline-bullets-list '("◉" "○" "◈" "◎"))) + (use-package olivetti + :hook (org-mode . (lambda () (interactive) (olivetti-mode) (olivetti-set-width 100)))) #+end_src ** Org-Roam #+begin_src emacs-lisp