Compare commits

...

3 Commits

9 changed files with 186 additions and 34 deletions

View File

@ -1,5 +1,5 @@
#+title: Setup Fschl Ide Configuration #+title: Setup Fschl Ide Configuration
#+PROPERTY: header-args:emacs-lisp :tangle ./fschl-ide.el :mkdirp yes #+PROPERTY: header-args:emacs-lisp :tangle ./modules/fschl-ide.el :mkdirp yes :tangle-mode "ugo=r"
* Basic configuration * Basic configuration
** Additional Packages ** Additional Packages

View File

@ -1,5 +1,5 @@
#+title: Setup Fschl Org Configuration #+title: Setup Fschl Org Configuration
#+PROPERTY: header-args:emacs-lisp :tangle ./fschl-org.el :mkdirp yes #+PROPERTY: header-args:emacs-lisp :tangle ./modules/fschl-org.el :mkdirp yes :tangle-mode "ugo=r"
* Basic configuration * Basic configuration
** Additional Packages ** Additional Packages
@ -15,12 +15,21 @@
;(add-to-list 'package-selected-packages 'org-roam) ;(add-to-list 'package-selected-packages 'org-roam)
;(add-to-list 'package-selected-packages 'org-roam-ui) ;(add-to-list 'package-selected-packages 'org-roam-ui)
(add-to-list 'package-selected-packages 'denote) (add-to-list 'package-selected-packages 'denote)
(add-to-list 'package-selected-packages 'org-modern)
(add-to-list 'package-selected-packages 'ox-latex) (add-to-list 'package-selected-packages 'ox-latex)
(add-to-list 'package-selected-packages 'ox-koma-letter) (add-to-list 'package-selected-packages 'ox-koma-letter)
(package-install-selected-packages :noconfirm) (package-install-selected-packages :noconfirm)
#+end_src #+end_src
** Setup Org-mode Key Map * Beautify Org
https://github.com/minad/org-modern
#+begin_src emacs-lisp
(with-eval-after-load 'org (global-org-modern-mode))
#+end_src
* Setup Org-mode Key Map
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-default-notes-file "~/Documents/Org/inbox.org") (setq org-default-notes-file "~/Documents/Org/inbox.org")
(keymap-global-set "C-c o c" #'org-capture) (keymap-global-set "C-c o c" #'org-capture)
@ -28,10 +37,10 @@
(keymap-global-set "C-c o a" #'org-agenda) (keymap-global-set "C-c o a" #'org-agenda)
(keymap-global-set "<f7>" #'org-cycle-agenda-files) (keymap-global-set "<f7>" #'org-cycle-agenda-files)
(keymap-global-set "<f8>" #'find-file org-default-notes-file) ;(keymap-global-set "<f8>" #'find-file org-default-notes-file)
#+end_src #+end_src
** Setup Agenda Files * Setup Agenda Files
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-agenda-files (setq org-agenda-files
@ -46,7 +55,7 @@
("~/Documents/Org/private.org" :maxlevel . 2))) ("~/Documents/Org/private.org" :maxlevel . 2)))
#+end_src #+end_src
*** Custom TODO keywords * Custom TODO keywords
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-todo-keywords (setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)") (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
@ -62,7 +71,9 @@
("PHONE" :foreground "forest green" :weight bold)))) ("PHONE" :foreground "forest green" :weight bold))))
#+end_src #+end_src
*** Add Week to Calendar * Add Week to Calendar
- [ ] this should go into 'fschl-ui.el'
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq calendar-week-start-day 1) (setq calendar-week-start-day 1)
@ -79,12 +90,13 @@
'font-lock-face 'font-lock-keyword-face)) 'font-lock-face 'font-lock-keyword-face))
#+end_src #+end_src
** Setup Capture Templates * Setup Capture Templates
- https://orgmode.org/manual/Template-elements.html - https://orgmode.org/manual/Template-elements.html
- https://orgmode.org/manual/Template-expansion.html - https://orgmode.org/manual/Template-expansion.html
*** Export Letter ** TODO Export Letter [0/1]
- [ ] hide behind a 'latex installed' guard
#+begin_src emacs-lisp #+begin_src emacs-lisp
(eval-after-load 'ox '(require 'ox-koma-letter)) (eval-after-load 'ox '(require 'ox-koma-letter))
(eval-after-load 'ox '(require 'ox-moderncv)) (eval-after-load 'ox '(require 'ox-moderncv))
@ -110,7 +122,29 @@
(expand-file-name (format "%s.org" name) "~/Documents/letters/") )) (expand-file-name (format "%s.org" name) "~/Documents/letters/") ))
#+end_src #+end_src
*** Capture Templates ** Org-Tempo shortcuts
#+begin_src emacs-lisp
;; This is needed as of Org 9.2
(use-package org-tempo
:ensure nil
:after org
:config
(dolist (item '(("sh" . "src sh")
("el" . "src emacs-lisp")
("li" . "src lisp")
("sc" . "src scheme")
("ts" . "src typescript")
("py" . "src python")
("go" . "src go")
("einit" . "src emacs-lisp :tangle ~/.config/emacs/init.el :mkdirp yes")
("emodule" . "src emacs-lisp :tangle ~/.config/emacs/modules/fschl-MODULE.el :mkdirp yes")
("yaml" . "src yaml")
("json" . "src json")))
(add-to-list 'org-structure-template-alist item)))
#+end_src
** Capture Templates
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-capture-templates (setq org-capture-templates
'(("t" "todo list item" entry '(("t" "todo list item" entry
@ -172,7 +206,7 @@
) )
#+end_src #+end_src
** extra * Setup Babel Support
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; active Babel languages ;; active Babel languages
@ -273,12 +307,13 @@
(add-hook 'dired-mode-hook #'denote-dired-mode)) (add-hook 'dired-mode-hook #'denote-dired-mode))
#+end_src #+end_src
* TeX and research * TeX and research [0/1]
- Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/ - Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/
cloned to Path =~/src/org-cv= cloned to Path =~/src/org-cv=
- requires: ~texlive-latex-extra texlive-xetex~ - requires: ~texlive-latex-extra texlive-xetex~
- =git clone https://github.com/posquit0/Awesome-CV ~/texmf/tex/latex/awesome-cv= - =git clone https://github.com/posquit0/Awesome-CV ~/texmf/tex/latex/awesome-cv=
- [ ] hide behind a 'latex installed' guard
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ox-awesomecv (use-package ox-awesomecv
:load-path "~/src/org-cv/" :load-path "~/src/org-cv/"

View File

@ -16,7 +16,7 @@ solution, e.g. set it up to auto-tangle all .org files within/below
- State "HOLD" from "TODO" [2024-02-21 Wed 17:19] \\ - State "HOLD" from "TODO" [2024-02-21 Wed 17:19] \\
would make it impossible to use the config on windows. would make it impossible to use the config on windows.
windows compatiblity is the only reason to keep this separate from my =guix home= config windows compatiblity is the only reason to keep this separate from my =guix home= config
*** TODO refactor to use crafted-emacs as git-submodule *** DONE refactor to use crafted-emacs as git-submodule
*** TODO attempt windows-compatibility for work *** TODO attempt windows-compatibility for work
** Missing Features ** Missing Features
@ -45,7 +45,9 @@ is it possible to detect based on existing content?
*** TODO make org-roam work with simple key chords *** TODO make org-roam work with simple key chords
*** TODO beautify org-mode *** CANCELLED beautify org-mode
- State "CANCELLED" from "TODO" [2024-04-18 Thu 14:08] \\
org-modern is fine enough
- https://zhangda.wordpress.com/2016/02/15/configurations-for-beautifying-emacs-org-mode/ - https://zhangda.wordpress.com/2016/02/15/configurations-for-beautifying-emacs-org-mode/
- https://zzamboni.org/post/beautifying-org-mode-in-emacs/ - https://zzamboni.org/post/beautifying-org-mode-in-emacs/
- https://lucidmanager.org/productivity/ricing-org-mode/ - https://lucidmanager.org/productivity/ricing-org-mode/

@ -1 +1 @@
Subproject commit bc094c618afcc70940d852812223aa7c42e59692 Subproject commit 1ab250cb3b4da194477cc44819483f496a1ccf46

55
init.el
View File

@ -18,6 +18,11 @@
(require 'crafted-ide-packages) (require 'crafted-ide-packages)
(require 'crafted-writing-packages) (require 'crafted-writing-packages)
(add-to-list 'package-selected-packages 'vterm)
(add-to-list 'package-selected-packages 'all-the-icons-dired)
(add-to-list 'package-selected-packages 'ranger)
(add-to-list 'package-selected-packages 'dired-ranger)
(package-install-selected-packages :noconfirm) (package-install-selected-packages :noconfirm)
(require 'crafted-defaults-config) (require 'crafted-defaults-config)
@ -29,9 +34,21 @@
(require 'crafted-ide-config) (require 'crafted-ide-config)
(require 'crafted-writing-config) (require 'crafted-writing-config)
(require 'vterm)
(unless crafted-startup-inhibit-splash (unless crafted-startup-inhibit-splash
(setq initial-buffer-choice #'crafted-startup-screen)) (setq initial-buffer-choice #'crafted-startup-screen))
(defvar dw/is-termux
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
(defvar dw/is-guix-system (and (eq system-type 'gnu/linux)
(file-exists-p "/etc/os-release")
(with-temp-buffer
(insert-file-contents "/etc/os-release")
(search-forward "ID=guix" nil t))
t))
(keymap-global-unset "M-#") (keymap-global-unset "M-#")
(define-key global-map (kbd "s-b") 'switch-to-buffer) (define-key global-map (kbd "s-b") 'switch-to-buffer)
@ -40,12 +57,34 @@
(define-key global-map (kbd "s-o") 'other-window) (define-key global-map (kbd "s-o") 'other-window)
(define-key global-map (kbd "C-z") nil) (define-key global-map (kbd "C-z") nil)
(defvar fschl-org-file (expand-file-name "fschl-org.el" user-emacs-directory)) (use-package all-the-icons-dired)
(when (and fschl-org-file (use-package dired-ranger)
(file-exists-p fschl-org-file))
(load fschl-org-file nil :nomessage))
(defvar fschl-ide-file (expand-file-name "fschl-ide.el" user-emacs-directory)) (defun dw/dired-mode-hook ()
(when (and fschl-ide-file (interactive)
(file-exists-p fschl-ide-file)) (dired-hide-details-mode 0)
(load fschl-ide-file nil :nomessage)) (unless (or dw/is-termux
(string-equal "/gnu/store/" (expand-file-name default-directory)))
(all-the-icons-dired-mode 1))
(hl-line-mode 1))
(use-package dired
:ensure nil
:bind (:map dired-mode-map
("b" . dired-up-directory)
("H" . dired-hide-details-mode))
:config
(setq dired-listing-switches "-agho --group-directories-first"
dired-omit-files "^\\.[^.].*"
dired-omit-verbose nil
dired-dwim-target 'dired-dwim-target-next
dired-hide-details-hide-symlink-targets nil
dired-kill-when-opening-new-dired-buffer t
delete-by-moving-to-trash t)
(add-hook 'dired-mode-hook #'dw/dired-mode-hook)
(global-set-key (kbd "s-j") #'dired-jump))
(load (expand-file-name "modules/fschl-ide.el" user-emacs-directory))
(load (expand-file-name "modules/fschl-org.el" user-emacs-directory))

View File

@ -1,5 +1,5 @@
#+title: Setup Crafted Emacs User Configuration File #+title: Setup Crafted Emacs User Configuration File
#+PROPERTY: header-args:emacs-lisp :tangle ./init.el :mkdirp yes #+PROPERTY: header-args:emacs-lisp :tangle ./init.el :mkdirp yes :tangle-mode "ugo=r"
* Basic configuration * Basic configuration
@ -27,6 +27,14 @@
(require 'crafted-ui-packages) (require 'crafted-ui-packages)
(require 'crafted-ide-packages) (require 'crafted-ide-packages)
(require 'crafted-writing-packages) (require 'crafted-writing-packages)
#+end_src
** Add more packages
#+begin_src emacs-lisp
(add-to-list 'package-selected-packages 'vterm)
(add-to-list 'package-selected-packages 'all-the-icons-dired)
(add-to-list 'package-selected-packages 'ranger)
(add-to-list 'package-selected-packages 'dired-ranger)
(package-install-selected-packages :noconfirm) (package-install-selected-packages :noconfirm)
#+end_src #+end_src
@ -42,10 +50,30 @@
(require 'crafted-ide-config) (require 'crafted-ide-config)
(require 'crafted-writing-config) (require 'crafted-writing-config)
(require 'vterm)
(unless crafted-startup-inhibit-splash (unless crafted-startup-inhibit-splash
(setq initial-buffer-choice #'crafted-startup-screen)) (setq initial-buffer-choice #'crafted-startup-screen))
#+end_src #+end_src
** Identify the system
Some of my personal configuration depends on the system we're running on.
- [ ] add windows
#+begin_src emacs-lisp
(defvar dw/is-termux
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
(defvar dw/is-guix-system (and (eq system-type 'gnu/linux)
(file-exists-p "/etc/os-release")
(with-temp-buffer
(insert-file-contents "/etc/os-release")
(search-forward "ID=guix" nil t))
t))
#+end_src
** Custom key remap ** Custom key remap
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -57,16 +85,43 @@
(define-key global-map (kbd "s-o") 'other-window) (define-key global-map (kbd "s-o") 'other-window)
(define-key global-map (kbd "C-z") nil) (define-key global-map (kbd "C-z") nil)
#+end_src #+end_src
** Load my custom files
#+begin_src emacs-lisp
(defvar fschl-org-file (expand-file-name "fschl-org.el" user-emacs-directory))
(when (and fschl-org-file
(file-exists-p fschl-org-file))
(load fschl-org-file nil :nomessage))
(defvar fschl-ide-file (expand-file-name "fschl-ide.el" user-emacs-directory)) ** Dired
(when (and fschl-ide-file
(file-exists-p fschl-ide-file)) #+begin_src emacs-lisp
(load fschl-ide-file nil :nomessage))
(use-package all-the-icons-dired)
(use-package dired-ranger)
(defun dw/dired-mode-hook ()
(interactive)
(dired-hide-details-mode 0)
(unless (or dw/is-termux
(string-equal "/gnu/store/" (expand-file-name default-directory)))
(all-the-icons-dired-mode 1))
(hl-line-mode 1))
(use-package dired
:ensure nil
:bind (:map dired-mode-map
("b" . dired-up-directory)
("H" . dired-hide-details-mode))
:config
(setq dired-listing-switches "-agho --group-directories-first"
dired-omit-files "^\\.[^.].*"
dired-omit-verbose nil
dired-dwim-target 'dired-dwim-target-next
dired-hide-details-hide-symlink-targets nil
dired-kill-when-opening-new-dired-buffer t
delete-by-moving-to-trash t)
(add-hook 'dired-mode-hook #'dw/dired-mode-hook)
(global-set-key (kbd "s-j") #'dired-jump))
#+end_src #+end_src
** Load my custom files
#+begin_src emacs-lisp
(load (expand-file-name "modules/fschl-ide.el" user-emacs-directory))
(load (expand-file-name "modules/fschl-org.el" user-emacs-directory))
#+end_src

View File

@ -9,10 +9,13 @@
;(add-to-list 'package-selected-packages 'org-roam) ;(add-to-list 'package-selected-packages 'org-roam)
;(add-to-list 'package-selected-packages 'org-roam-ui) ;(add-to-list 'package-selected-packages 'org-roam-ui)
(add-to-list 'package-selected-packages 'denote) (add-to-list 'package-selected-packages 'denote)
(add-to-list 'package-selected-packages 'org-modern)
(add-to-list 'package-selected-packages 'ox-latex) (add-to-list 'package-selected-packages 'ox-latex)
(add-to-list 'package-selected-packages 'ox-koma-letter) (add-to-list 'package-selected-packages 'ox-koma-letter)
(package-install-selected-packages :noconfirm) (package-install-selected-packages :noconfirm)
(with-eval-after-load 'org (global-org-modern-mode))
(setq org-default-notes-file "~/Documents/Org/inbox.org") (setq org-default-notes-file "~/Documents/Org/inbox.org")
(keymap-global-set "C-c o c" #'org-capture) (keymap-global-set "C-c o c" #'org-capture)
(keymap-global-set "C-c o l" #'org-store-link) (keymap-global-set "C-c o l" #'org-store-link)
@ -81,6 +84,24 @@
(let ((name (read-string "Filename: "))) (let ((name (read-string "Filename: ")))
(expand-file-name (format "%s.org" name) "~/Documents/letters/") )) (expand-file-name (format "%s.org" name) "~/Documents/letters/") ))
;; This is needed as of Org 9.2
(use-package org-tempo
:ensure nil
:after org
:config
(dolist (item '(("sh" . "src sh")
("el" . "src emacs-lisp")
("li" . "src lisp")
("sc" . "src scheme")
("ts" . "src typescript")
("py" . "src python")
("go" . "src go")
("einit" . "src emacs-lisp :tangle ~/.config/emacs/init.el :mkdirp yes")
("emodule" . "src emacs-lisp :tangle ~/.config/emacs/modules/fschl-MODULE.el :mkdirp yes")
("yaml" . "src yaml")
("json" . "src json")))
(add-to-list 'org-structure-template-alist item)))
(setq org-capture-templates (setq org-capture-templates
'(("t" "todo list item" entry '(("t" "todo list item" entry
(file+olp+datetree "~/Documents/Org/inbox.org") (file+olp+datetree "~/Documents/Org/inbox.org")