Skip to content

Latest commit

 

History

History
85 lines (71 loc) · 4.28 KB

01-main.org

File metadata and controls

85 lines (71 loc) · 4.28 KB

Main Config

#+TAGS[]: emacs config

Main config

This is the main entry point for my literate configuration. I’ve decided to split my configurations into seperate .org files to keep related stuff together. You can find this configuration at GitHub, and on www.faijdherbe.net.

To use this configuration add the following codeblock to your ~/.emacs.d/init.el, changing the path to this configuration file accordingly.

;; load main literate configuration file
;(setq user-init-file (or load-file-name (buffer-file-name)))
;(setq user-emacs-directory (concat (file-name-directory user-init-file) "../.emacs.d"))

(package-initialize)

(setq faijdherbe-config--config-path
      "~/Documents/git/faijdherbe.net/emacs-config/literate")

(org-babel-load-file
 (expand-file-name (concat (string-trim faijdherbe-config--config-path "/")
                           "/01-main.org")))

Alternatively, you can press C-c C-c on this codeblock to evaluate immediately.

Desktop file for testing

During debugging i’d like to use a desktop file for quick launching Emacs with our own configuration. Let’s call our app Mymacs.

The path from the configuration earlier is injected upon tangling this file (C-c C-v t).

[Desktop Entry]
Name=Mymacs
Type=Application
Comment=Emacs with my WIP Configuration
Exec=/usr/bin/emacs -Q --eval "(setq jf/dev-env t)" -l "~/Documents/git/faijdherbe.net/emacs-config/literate/init.el"
Icon=/opt/giteye/icon.xpm
Name[en_US]=Mymacs

note: It looks like GitHub and Hugo don’t support =conf-desktop=, hence the lack of syntax highlighting. I’ll need to look into this some other time.

Specific Configurations

Below we find all our configuration files. I should be able to merge the first two columns as it’s pretty much redundant info, but let’s postpone this for now.

configfilenameenableddescription
package02-package.orgyessetup package repository and package manager.
exwm03-exwm.orgnosetup emacs as window-manager
theme20-theme.orgyestheme and ui config
navigation30-navigation.orgyesnavigation and autocomplete
dev40-dev.orgyesgeneric development
phpnoas this is my main language, it deserves its own config file
org-modenoorg-roam and org-agenda configuration
config99-config.orgyesLocal config that can set some specific settings

The following script will use the table above as source to load all other configurations in order - if enabled.

(dolist (record files)
  (let* ((filename (cadr record))
         (enabled (caddr record))
         (dir (or faijdherbe-config--config-path ""))
         (path (expand-file-name (concat (string-trim dir "/")
                                         "/" filename))))
    (if (and (string= "yes" enabled)
             (file-readable-p path))
        (progn 
          (message "load: %s" filename)
          (org-babel-load-file path)))))