summaryrefslogtreecommitdiff
path: root/.emacs.d/modules/thanos-org-config.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/modules/thanos-org-config.el')
-rw-r--r--.emacs.d/modules/thanos-org-config.el79
1 files changed, 79 insertions, 0 deletions
diff --git a/.emacs.d/modules/thanos-org-config.el b/.emacs.d/modules/thanos-org-config.el
new file mode 100644
index 0000000..845dea5
--- /dev/null
+++ b/.emacs.d/modules/thanos-org-config.el
@@ -0,0 +1,79 @@
+;;; thanos-org-config.el --- org config -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023 Thanos Apollo
+
+;; Author: Thanos Apollo <[email protected]>
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(require 'org)
+(require 'org-agenda)
+
+(setf org-directory "~/org/"
+ org-agenda-files '("~/org/agenda.org")
+ org-default-notes-file (expand-file-name "notes.org" org-directory)
+ org-ellipsis " ▼ "
+ org-log-done 'time
+ org-hide-emphasis-markers nil ;;change to t to hide emphasis markers
+ org-table-convert-region-max-lines 20000
+ org-log-done 'time
+ org-log-into-drawer t
+ org-todo-keywords ;; This overwrites the default Doom org-todo-keywords
+ '((sequence
+ "TODO(t)" ;; A task that is ready to be tackled
+ "BLOG(b)" ;; Blog writing assignments
+ "GYM(g)" ;; Things to accomplish at the gym
+ "WAIT(w)" ;; Something is holding up this task
+ "|" ;; The pipe necessary to separate "active" states and "inactive" states
+ "DONE(d)" ;; Task has been completed
+ "CANCELLED(c)" )))
+
+(define-key org-mode-map (kbd "C-c t") 'org-time-stamp-inactive)
+(define-key org-mode-map (kbd "C-c s") 'org-download-screenshot)
+
+(add-hook 'org-mode-hook 'thanos/org-theme-gruvbox)
+(add-hook 'org-mode-hook 'flyspell-mode)
+(add-hook 'org-mode-hook 'toc-org-mode)
+
+(defadvice org-edit-src-code (around set-buffer-file-name activate compile)
+ (let ((file-name (buffer-file-name))) ;; (1)
+ ad-do-it ;; (2)
+ (setf buffer-file-name file-name))) ;; (3)
+
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((emacs-lisp . t)
+ (python . t)))
+
+
+(setf org-structure-template-alist
+ '(("e" . "src emacs-lisp")
+ ("p" . "src python")
+ ("l" . "src lisp")
+ ("b" . "src bash")
+ ("q" . "QUOTE")))
+
+;;Auto tangle
+(add-hook 'org-mode-hook 'org-auto-tangle-mode)
+
+
+(provide 'thanos-org-config)
+;;; thanos-org-config.el ends here