diff --git a/contrapunctus/cp-ui.el b/contrapunctus/cp-ui.el index 1d8d92a..929607d 100644 --- a/contrapunctus/cp-ui.el +++ b/contrapunctus/cp-ui.el @@ -1,16 +1,3 @@ -;; Simplify the GUI, thanks -;; http://www.masteringemacs.org/articles/2010/10/04/beginners-guide-to-emacs/ -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) -(horizontal-scroll-bar-mode -1) -(display-time-mode t) -(setq focus-follows-mouse t - mouse-autoselect-window t - display-time-format "%a, %d %h %Y %T" - display-time-interval 1 - use-dialog-box nil) - ;; Highlight current line (global-hl-line-mode 1) diff --git a/init.el b/init.el index 683c14e..febe348 100644 --- a/init.el +++ b/init.el @@ -41,39 +41,8 @@ ;; input - modal, hindi ;;;; Code: - -(eval-when-compile - (add-to-list 'load-path "~/.emacs.d/elisp-git/use-package/") - (require 'use-package)) - -(require 'package) -(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) - (not (gnutls-available-p)))) - (proto (if no-ssl "http" "https"))) - ;; 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 '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) -(package-initialize) - -;; from https://github.com/jorgenschaefer/Config/blob/master/emacs.el#L796-L800 -(mapc (lambda (path) - (when (file-directory-p path) - (add-to-list 'load-path path) - (dolist (dirname (directory-files path t "^[^.]")) - (when (file-directory-p dirname) - (let ((try1 (concat dirname "/elisp")) - (try2 (concat dirname "/lisp"))) - (add-to-list 'load-path - (cond ((file-exists-p try1) try1) - ((file-exists-p try2) try2) - (t dirname)))))))) - '("~/.emacs.d/elisp-git/" - "~/.emacs.d/contrapunctus" - "~/.emacs.d/elpa/" - "~/.emacs.d/user")) +(org-babel-load-file + (locate-user-emacs-file "init.org")) (load "cp-ui") diff --git a/init.org b/init.org new file mode 100644 index 0000000..c76c0ba --- /dev/null +++ b/init.org @@ -0,0 +1,43 @@ + +#+BEGIN_SRC emacs-lisp +#+END_SRC + +* Packages + #+BEGIN_SRC emacs-lisp + (add-to-list 'load-path "~/.emacs.d/elisp-git/use-package/") + (require 'use-package) + (require 'package) + (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + ;; 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 '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) + (package-initialize) + #+END_SRC + +* UI +** Built-ins + Simplify the GUI; from http://www.masteringemacs.org/articles/2010/10/04/beginners-guide-to-emacs/ + #+BEGIN_SRC emacs-lisp + (menu-bar-mode -1) + (tool-bar-mode -1) + (scroll-bar-mode -1) + (horizontal-scroll-bar-mode -1) + #+END_SRC + + #+BEGIN_SRC emacs-lisp + (display-time-mode t) + (setq focus-follows-mouse t + mouse-autoselect-window t + display-time-format "%a, %d %h %Y %T" + display-time-interval 1 + use-dialog-box nil) + #+END_SRC + + #+BEGIN_SRC emacs-lisp + + #+END_SRC