Skip to content

Commit

Permalink
Bunch of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anandpiyer committed Jun 24, 2018
1 parent c0098bb commit 34d2587
Show file tree
Hide file tree
Showing 18 changed files with 200 additions and 213 deletions.
8 changes: 4 additions & 4 deletions .config/afew/config
Expand Up @@ -7,11 +7,11 @@ folders = anand.ebiz@gmail.com/inbox anand.ebiz@gmail.com/all anand.padmanabha.i
rename = True

# rules
anand.ebiz@gmail.com/inbox = 'tag:trash':anand.ebiz@gmail.com/trash
anand.ebiz@gmail.com/inbox = 'tag:trash':anand.ebiz@gmail.com/trash 'NOT tag:inbox':anand.ebiz@gmail.com/all
anand.ebiz@gmail.com/all = 'tag:trash':anand.ebiz@gmail.com/trash
anand.padmanabha.iyer@gmail.com/inbox = 'tag:trash':anand.padmanabha.iyer@gmail.com/trash
anand.padmanabha.iyer@gmail.com/inbox = 'tag:trash':anand.padmanabha.iyer@gmail.com/trash 'NOT tag:inbox':anand.padmanabha.iyer@gmail.com/all
anand.padmanabha.iyer@gmail.com/all = 'tag:trash':anand.padmanabha.iyer@gmail.com/trash
anand.iyer.p@gmail.com/inbox = 'tag:trash':anand.iyer.p@gmail.com/trash
anand.iyer.p@gmail.com/inbox = 'tag:trash':anand.iyer.p@gmail.com/trash 'NOT tag:inbox':anand.iyer.p@gmail.com/all
anand.iyer.p@gmail.com/all = 'tag:trash':anand.iyer.p@gmail.com/trash
bmail/inbox = 'tag:trash':bmail/trash
bmail/inbox = 'tag:trash':bmail/trash 'NOT tag:inbox':bmail/all
bmail/all = 'tag:trash':bmail/trash
35 changes: 19 additions & 16 deletions .emacs.d/init.el
@@ -1,10 +1,10 @@
;;; init.el --- Emacs configuration of Anand Iyer -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; Defaults.
;;------------------------------------------------------------------------------
(defconst user-emacs-config-directory
(expand-file-name (concat user-emacs-directory "config/"))
"Directory for storing user's local files.")
Expand All @@ -13,7 +13,6 @@
(expand-file-name (concat user-emacs-directory "lisp/"))
"Directory for storing modules.")


(defconst user-emacs-data-directory
(expand-file-name (concat user-emacs-directory "data/"))
"Directory where cache files are stored.")
Expand All @@ -26,25 +25,27 @@
"~/Dropbox/org-mode/"
"Directory where org files are stored.")

(defconst api-debug-enabled nil "Enable benchmarking/debugging related stuff.")

(setq-default load-prefer-newer t)

;;------------------------------------------------------------------------------
;; Bootstrap configuration.
;;------------------------------------------------------------------------------
(eval-and-compile

;; Temporarily change GC threshold and file handler alist.
(defvar api--file-name-handler-alist file-name-handler-alist)
(unless (or after-init-time noninteractive)
(progn
(when (version< emacs-version "27.0")
(unless (or after-init-time noninteractive)
(defvar api--file-name-handler-alist file-name-handler-alist)
(setq gc-cons-threshold (* 512 1024 1024)
gc-cons-percentage 1.0
file-name-handler-alist nil)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold (* 16 1024 1024)
gc-cons-percentage 0.2
file-name-handler-alist api--file-name-handler-alist)))))
(defun api|reset-gc()
(setq gc-cons-threshold (* 16 1024 1024)
gc-cons-percentage 0.1
file-name-handler-alist api--file-name-handler-alist))
(add-hook 'emacs-startup-hook #'api|reset-gc)))

;;(let ((default-directory "~/.emacs.d/elpa/"))
;; (normal-top-level-add-subdirs-to-load-path))

(add-to-list 'load-path user-emacs-modules-directory)

Expand Down Expand Up @@ -80,7 +81,7 @@
(require 'setup-org)
(require 'setup-pdf)
(require 'setup-tex)
(require 'setup-scala)
;;(require 'setup-scala)
(require 'setup-email)
(require 'setup-music)

Expand All @@ -94,4 +95,6 @@
(require 'init-locales))

(provide 'init)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init.el ends here
27 changes: 26 additions & 1 deletion .emacs.d/lisp/init-core.el
@@ -1,11 +1,15 @@
;;; core.el --- Core Emacs stuff -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; `benchmark-init': Benchmark init files.
;;------------------------------------------------------------------------------
(use-package benchmark-init
:if api-debug-enabled
:init
(require 'benchmark-init)
;; To disable collection of benchmark data after init is done.
Expand Down Expand Up @@ -40,7 +44,26 @@
(use-package fullframe
:init
(defun api|init-fullframe ()
(fullframe list-package quit-window)))
(fullframe list-package quit-window))
(add-hook 'emacs-startup-hook #'api|init-fullframe))

;;------------------------------------------------------------------------------
;; `helpful': better contextual help.
;;------------------------------------------------------------------------------
(use-package helpful
:commands (helpful-callable
helpful-key
helpful-variable
helpful-symbol)
:bind
(("C-h k" . helpful-key)
("C-h f" . helpful-callable)
("C-h v" . helpful-variable))
:init
(defalias #'describe-key #'helpful-key)
(defalias #'describe-function #'helpful-callable)
(defalias #'describe-variable #'helpful-variable)
(defalias #'describe-symbol #'helpful-symbol))

;;------------------------------------------------------------------------------
;; `no-littering': do not litter emacs.d.
Expand All @@ -61,4 +84,6 @@
:commands (terminal-here-launch terminal-here-project-launch))

(provide 'init-core)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-core.el ends here
8 changes: 5 additions & 3 deletions .emacs.d/lisp/init-editor.el
@@ -1,10 +1,10 @@
;;; init-editor.el --- Editor related settings -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; Defaults.
;;------------------------------------------------------------------------------
(setq-default fill-column 80
word-wrap t
sentence-end-double-space nil
Expand Down Expand Up @@ -200,4 +200,6 @@ t Ordinary line numbers
whitespace-style '(face tabs empty trailing lines-tail)))

(provide 'init-editor)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-editor.el ends here
8 changes: 6 additions & 2 deletions .emacs.d/lisp/init-evil.el
@@ -1,6 +1,9 @@
;;; init-evil.el --- Evil settings -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; `evil': Extensible vi layer.
Expand Down Expand Up @@ -167,8 +170,9 @@
;;------------------------------------------------------------------------------
;; `evil-nerd-commenter': Block commenting.
;;------------------------------------------------------------------------------
(use-package evil-nerd-commenter
:defer t)
(use-package evil-nerd-commenter)

(provide 'init-evil)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-evil.el ends here
8 changes: 5 additions & 3 deletions .emacs.d/lisp/init-fonts.el
@@ -1,10 +1,10 @@
;; init-fonts.el --- Fonts -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; Setup default fonts.
;;------------------------------------------------------------------------------
(defvar api-emacs-font-size 14)
(defvar api-emacs-font (font-spec :family "PragmataPro" :size api-emacs-font-size))
(defvar api-emacs-variable-pitch-font (font-spec :family "PragmataPro"))
Expand All @@ -29,4 +29,6 @@
'(#x2190 . #x2200) api-emacs-fallback-font nil 'prepend)

(provide 'init-fonts)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-fonts.el ends here
8 changes: 5 additions & 3 deletions .emacs.d/lisp/init-frames.el
@@ -1,10 +1,10 @@
;; init-frames.el --- Emacs frames -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; Defaults.
;;------------------------------------------------------------------------------
(setq-default
;; do not mess with frame size when altering fonts or settings.
frame-inhibit-implied-resize t)
Expand Down Expand Up @@ -39,4 +39,6 @@
:init (nameframe-projectile-mode t))))

(provide 'init-frames)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-frames.el ends here
9 changes: 6 additions & 3 deletions .emacs.d/lisp/init-keybindings.el
@@ -1,11 +1,12 @@
;;; init-keybindings.el --- Key bindings -*- lexical-binding: t; -*-

;;; Commentary:

;; Initialize key bindings

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; leader, super, hyper
;;------------------------------------------------------------------------------
(defvar my-leader-key "SPC"
"Anand's leader prefix key.")

Expand Down Expand Up @@ -194,4 +195,6 @@ Resize : _+_: increase height _-_: decrease height _<_:decrease width _>_:incr
"TAB" 'ace-window))

(provide 'init-keybindings)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-keybindings.el ends here
9 changes: 6 additions & 3 deletions .emacs.d/lisp/init-mac.el
@@ -1,11 +1,12 @@
;;; init-mac.el --- Mac specific settings -*- lexical-binding: t; -*-

;;; Commentary:

;; Taken from doom-emacs.

;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;------------------------------------------------------------------------------
;; Defaults.
;;------------------------------------------------------------------------------
(setq mac-command-modifier 'super
;;mac-right-control-modifier 'hyper
mac-function-modifier 'hyper ; make Fn key do Hyper
Expand Down Expand Up @@ -61,4 +62,6 @@
(exec-path-from-shell-initialize)))

(provide 'init-mac)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-mac.el ends here

0 comments on commit 34d2587

Please sign in to comment.