summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/init.el19
-rw-r--r--emacs.d/lib/bindings.el8
-rw-r--r--emacs.d/lib/config.el (renamed from emacs.d/lib/my-settings.el)6
-rw-r--r--emacs.d/lib/funcs.el (renamed from emacs.d/lib/my-functions.el)5
4 files changed, 29 insertions, 9 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 26cde75..67ceecf 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -9,20 +9,29 @@
   (message "Refreshing ELPA package archives...")
   (package-refresh-contents))
 
+;; install the package 'use-package' unless it's already installed
 (unless (package-installed-p 'use-package)
   (progn
-    (package-refresh-contents)
     (package-install 'use-package)))
 
+;; ... and load 'use-package'
 (require 'use-package)
 
-(eval-and-compile
-  (add-to-list 'load-path (expand-file-name "lib" user-emacs-directory)))
+(use-package config
+  :load-path (lambda () (expand-file-name  "lib" user-emacs-directory)))
 
-(use-package my-settings)
-(use-package my-functions)
+(use-package funcs
+  :load-path (lambda () (expand-file-name  "lib" user-emacs-directory))
+  :commands (fc/load-time)
+  :bind (("s-=" . fc/scale-up-font)
+         ("s--" . fc/scale-down-font)
+         ("s-0" . fc/reset-font-size)))
+
+(use-package bindings
+  :load-path (lambda () (expand-file-name  "lib" user-emacs-directory)))
 
 (use-package server
+  ;; start emacs server if not already running
   :config
   (unless (server-running-p) (server-start)))
 
diff --git a/emacs.d/lib/bindings.el b/emacs.d/lib/bindings.el
new file mode 100644
index 0000000..2320fb5
--- /dev/null
+++ b/emacs.d/lib/bindings.el
@@ -0,0 +1,8 @@
+;; some bindings
+(global-set-key (kbd "M-j") 'join-line)
+(global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)
+
+(define-key emacs-lisp-mode-map (kbd "C-c C-e") 'eval-buffer)
+(define-key emacs-lisp-mode-map (kbd "C-c C-r") 'eval-region)
+
+(provide 'bindings)
diff --git a/emacs.d/lib/my-settings.el b/emacs.d/lib/config.el
index 89ce365..1c43223 100644
--- a/emacs.d/lib/my-settings.el
+++ b/emacs.d/lib/config.el
@@ -58,6 +58,8 @@
 (set-face-attribute 'mode-line nil  :height 110 :background "grey90")
 
 ;; nicer background than plain white
-(set-face-background 'default "#F6F6F6")
+(set-face-background 'default "#FAF6EB")
 
-(provide 'my-settings)
+(setq custom-file (expand-file-name "var/emacs-custom.el" user-emacs-directory))
+
+(provide 'config)
diff --git a/emacs.d/lib/my-functions.el b/emacs.d/lib/funcs.el
index 3513a84..18899f6 100644
--- a/emacs.d/lib/my-functions.el
+++ b/emacs.d/lib/funcs.el
@@ -1,4 +1,5 @@
-;; these functions are for loading my configuration
+;;; funcs.el --- functions for my own usage
+
 (defun fc/load-time (emacs-start-time)
   "How long did it take to load the configuration."
   (let ((load-time (float-time (time-subtract (current-time) emacs-start-time))))
@@ -96,4 +97,4 @@ Visit the file after creation."
   (interactive "sName of the temporary file: ")
   (fc/start--file (expand-file-name (format "/nest:~/tmp/%s" file-name))))
 
-(provide 'my-functions)
+(provide 'funcs)