fix: load different custom file per entity
This commit is contained in:
parent
a1f4e6398c
commit
0606398072
1 changed files with 43 additions and 42 deletions
85
init.el
85
init.el
|
@ -1,15 +1,48 @@
|
|||
(require 'server)
|
||||
(unless (server-running-p) (server-start))
|
||||
|
||||
;; CUSTOM_FILE
|
||||
(when (eq system-type 'windows-nt)
|
||||
(setq custom-file "~/.emacs.d/bundle/custom_win32.el"))
|
||||
;; PACKAGE
|
||||
(require 'package)
|
||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
||||
(not (gnutls-available-p))))
|
||||
(proto (if no-ssl "http" "https")))
|
||||
(when no-ssl
|
||||
(warn "\
|
||||
Your version of Emacs does not support SSL connections,
|
||||
which is unsafe because it allows man-in-the-middle attacks.
|
||||
There are two things you can do about this warning:
|
||||
1. Install an Emacs version that does support SSL and be safe.
|
||||
2. Remove this warning from your init file so you won't see it again."))
|
||||
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
|
||||
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
||||
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
|
||||
(when (< emacs-major-version 24)
|
||||
;; For important compatibility libraries like cl-lib
|
||||
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
|
||||
(package-initialize)
|
||||
|
||||
;; OS SETTINGS
|
||||
(defun evo-load-paths ()
|
||||
(unless (file-directory-p (expand-file-name "~/Documents"))
|
||||
(defvar *docs-path* (getenv "DOCS_PATH"))))
|
||||
|
||||
(when (eq system-type 'gnu/linux)
|
||||
(setq custom-file "~/.emacs.d/bundle/custom_gnu.el"))
|
||||
|
||||
(when (eq system-type 'windows-nt)
|
||||
(setq custom-file "~/.emacs.d/bundle/custom_win32.el")
|
||||
(setq python-shell-interpreter "python")
|
||||
(add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets"))
|
||||
(cd "~/opt")
|
||||
(when (string= (system-name) "EVG02667NB")
|
||||
(evo-load-paths)
|
||||
(setq custom-file "~/.emacs.d/bundle/custom_win32_EVG02667NB.el"))
|
||||
(when (string= (system-name) "XPS-8930")))
|
||||
|
||||
;; CUSTOM_FILE
|
||||
(load custom-file :noerror)
|
||||
|
||||
;; DISPLAY SETTINGS
|
||||
|
||||
;; General userinterface and appearance
|
||||
(tool-bar-mode -1) ; No toolbar
|
||||
(menu-bar-mode -1) ; No Menubar
|
||||
|
@ -31,6 +64,7 @@
|
|||
(add-to-list 'default-frame-alist '(fullscreen . maximized)) ; Maximize Window
|
||||
(add-to-list 'default-frame-alist '(font . "Iosevka Term-12"))
|
||||
(add-to-list 'default-frame-alist '(undecorated . t))
|
||||
(load-theme 'nord t)
|
||||
|
||||
;; GLOBAL KEYS
|
||||
(global-set-key (kbd "C-c l") 'org-store-link)
|
||||
|
@ -44,19 +78,6 @@
|
|||
(global-set-key (kbd "C-c n") 'newsticker-start)
|
||||
(global-set-key (kbd "M-o") 'ace-window)
|
||||
|
||||
;; OS SETTINGS
|
||||
(defun evo-load-paths ()
|
||||
(unless (file-directory-p (expand-file-name "~/Documents"))
|
||||
(defvar *docs-path* (getenv "DOCS_PATH"))))
|
||||
|
||||
(when (eq system-type 'windows-nt)
|
||||
(setq python-shell-interpreter "python")
|
||||
(add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets"))
|
||||
(cd "~/opt")
|
||||
(when (string= (system-name) "EVG02667NB")
|
||||
(evo-load-paths))
|
||||
(when (string= (system-name) "XPS-8930")))
|
||||
|
||||
|
||||
;; UTF-8 FTW
|
||||
(prefer-coding-system 'utf-8)
|
||||
|
@ -67,33 +88,13 @@
|
|||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
(with-current-buffer "*scratch*" (emacs-lock-mode 'kill))
|
||||
|
||||
;; PACKAGE
|
||||
(require 'package)
|
||||
;; Added by Package.el. This must come before configurations of
|
||||
;; installed packages. Don't delete this line. If you don't want it,
|
||||
;; just comment it out by adding a semicolon to the start of the line.
|
||||
;; You may delete these explanatory comments.
|
||||
|
||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
||||
(not (gnutls-available-p))))
|
||||
(proto (if no-ssl "http" "https")))
|
||||
(when no-ssl
|
||||
(warn "\
|
||||
Your version of Emacs does not support SSL connections,
|
||||
which is unsafe because it allows man-in-the-middle attacks.
|
||||
There are two things you can do about this warning:
|
||||
1. Install an Emacs version that does support SSL and be safe.
|
||||
2. Remove this warning from your init file so you won't see it again."))
|
||||
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
|
||||
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
||||
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
|
||||
(when (< emacs-major-version 24)
|
||||
;; For important compatibility libraries like cl-lib
|
||||
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
|
||||
(package-initialize)
|
||||
;; PACKAGES
|
||||
(ivy-mode 1)
|
||||
(load-theme 'nord t)
|
||||
|
||||
(use-package elpy
|
||||
:ensure t
|
||||
:init
|
||||
(elpy-enable))
|
||||
;; ORG_MODE SETTINGS
|
||||
(setq org-agenda-dim-blocked-tasks nil
|
||||
org-agenda-files (quote
|
||||
|
|
Loading…
Add table
Reference in a new issue