commit 0bae5a8aaeed93556e7f11214f7e5dbbf02ec7f9
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Tue, 12 Sep 2017 23:06:42 -0500
initial commit
Diffstat:
6 files changed, 217 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,16 @@
+# ignore everything
+*
+
+# git stuff
+!.gitignore
+!LICENCE
+!README.org
+
+# simplemacs init
+!init.el
+
+# modules
+!modules/
+!modules/aesthetics.org
+!modules/auctex.org
+!modules/package.org+
\ No newline at end of file
diff --git a/README.org b/README.org
@@ -0,0 +1,20 @@
+#+TITLE: My Emacs Config
+#+AUTHOR: Shimmy Xu
+
+* Introduction
+
+My humble collection of Emacs config, modeled after [[https://github.com/admiralakber/simplemacs][simplemacs]].
+
+After installation, you may need to run ~M-x list-packages~ and reload ~init.el~.
+
+
+* Modules
+
+|-----------------------------+-----------------------|
+| File | Notes |
+|-----------------------------+-----------------------|
+| [[file:modules/package.org]] | Package management. |
+| [[file:modules/aesthetics.org]] | UI and theme configs. |
+| [[file:modules/auctex.org ]] | ~auctex~ settings. |
+|-----------------------------+-----------------------|
+
diff --git a/init.el b/init.el
@@ -0,0 +1,43 @@
+;; Shimmy Xu's Emacs (@shimmy1996)
+;; ------------------------------------------------------------------------
+
+;; 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.
+(package-initialize)
+
+(require 'org)
+
+;; package: Emacs Package Manager
+;; ------------------------------------------------------------------------
+(org-babel-load-file (expand-file-name
+ "~/.emacs.d/modules/package.org"
+ user-emacs-directory))
+
+;; aesthetics: UI and quality of life changes
+;; ------------------------------------------------------------------------
+(org-babel-load-file (expand-file-name
+ "~/.emacs.d/modules/aesthetics.org"
+ user-emacs-directory))
+
+;; auctex: Better Latex Support
+;; ------------------------------------------------------------------------
+(org-babel-load-file (expand-file-name
+ "~/.emacs.d/modules/auctex.org"
+ user-emacs-directory))
+
+;; Auto appended from here on
+;; ------------------------------------------------------------------------
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(package-selected-packages (quote (linum-relative fcitx base16-theme auctex))))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
diff --git a/modules/aesthetics.org b/modules/aesthetics.org
@@ -0,0 +1,85 @@
+#+TITLE: aesthetics
+#+AUTHOR: Shimmy Xu
+
+* UI Settings
+
+Hide menu, scrollbar and toolbars.
+
+#+BEGIN_SRC emacs-lisp
+ (menu-bar-mode -1)
+ (toggle-scroll-bar -1)
+ (tool-bar-mode -1)
+#+END_SRC
+
+Remove scrollbar for any new frames as well, useful for ~emacsclient~.
+
+#+BEGIN_SRC emacs-lisp
+ (add-to-list 'default-frame-alist
+ '(vertical-scroll-bars . nil))
+#+END_SRC
+
+Fills up gap in the border when tiling emacs to half-screen.
+
+#+BEGIN_SRC emacs-lisp
+(setq frame-resize-pixelwise t)
+#+END_SRC
+
+Use Source Code Pro as the default font.
+
+#+BEGIN_SRC emacs-lisp
+ (set-frame-font "Source Code Pro-12" nil t)
+#+END_SRC
+
+* Color Theme
+
+Solarized light or monokai.
+
+#+BEGIN_SRC emacs-lisp
+ (load-theme 'base16-monokai t)
+#+END_SRC
+
+* Line Highlighting
+
+Enable line highlighting.
+
+#+BEGIN_SRC emacs-lisp
+ (global-hl-line-mode t)
+#+END_SRC
+
+* Line Numbering
+
+Enable line numbering.
+
+#+BEGIN_SRC emacs-lisp
+ (linum-mode)
+#+END_SRC
+
+Install relative line numbering support.
+
+#+BEGIN_SRC emacs-lisp
+ (package-install 'linum-relative)
+#+END_SRC
+
+Enable relative mode, and display current line number instead of 0.
+
+#+BEGIN_SRC emacs-lisp
+ (linum-relative-global-mode)
+ (setq linum-relative-current-symbol "")
+#+END_SRC
+
+Force width of line numbering bar to 3 digit wide.
+
+#+BEGIN_SRC emacs-lisp
+ (setq linum-format "%3d ")
+#+END_SRC
+
+* Fcitx
+
+Install fcitx support.
+
+#+BEGIN_SRC emacs-lisp
+ (package-install 'fcitx)
+ (require 'fcitx)
+ (fcitx-aggressive-setup)
+ (setq fcitx-use-dbus t)
+#+END_SRC
diff --git a/modules/auctex.org b/modules/auctex.org
@@ -0,0 +1,17 @@
+#+TITLE: auctex
+#+AUTHOR: Shimmy Xu
+
+* Latex Mode Settings
+Placeholder for now.
+
+#+BEGIN_SRC emacs-lisp
+ (setq TeX-auto-save t)
+ (setq TeX-parse-self t)
+ (setq-default TeX-master nil)
+ (add-hook 'LaTeX-mode-hook 'auto-fill-mode)
+ (add-hook 'LaTeX-mode-hook 'flyspell-mode)
+ (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
+ (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
+ (setq reftex-plug-into-AUCTeX t)
+#+END_SRC
+
diff --git a/modules/package.org b/modules/package.org
@@ -0,0 +1,35 @@
+#+TITLE: package
+#+AUTHOR: Shimmy Xu
+
+* Package Repositories
+
+Initialize Emacs Package Manager and add repositories (only melpa for now).
+
+#+BEGIN_SRC emacs-lisp
+ (require 'package)
+ (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
+ (not (gnutls-available-p))))
+ (url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
+ (add-to-list 'package-archives (cons "melpa" url) t))
+ (when (< emacs-major-version 24)
+ ;; For important compatibility libraries like cl-lib
+ (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
+ (package-initialize)
+#+END_SRC
+
+* Base packages to install
+
+List the base packages I would like to install here.
+
+#+BEGIN_SRC emacs-lisp
+ (setq my-package-list '(auctex
+ base16-theme))
+#+END_SRC
+
+* Install base packages
+
+Makes sure all packages listed above are installed.
+
+#+BEGIN_SRC emacs-lisp
+ (mapc #'package-install my-package-list)
+#+END_SRC