summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-06-03 19:54:12 +0200
committerAlan Pearce2017-06-03 19:54:12 +0200
commit73b0984d7408c7f2e9876de6f34aa97a7eba8390 (patch)
tree938a4dc30fc34dc6c87dd270e916fb5f9185d47a /emacs
parent0086666d6d5f43ef8042a2efcf34c6405681406d (diff)
parentfee42496ab1efd7267578d40f844c55014f6c260 (diff)
downloadnixfiles-73b0984d7408c7f2e9876de6f34aa97a7eba8390.tar.lz
nixfiles-73b0984d7408c7f2e9876de6f34aa97a7eba8390.tar.zst
nixfiles-73b0984d7408c7f2e9876de6f34aa97a7eba8390.zip
Merge branch 'master' of ssh://alanpearce.eu/dotfiles
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org82
1 files changed, 49 insertions, 33 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 0bcacb1e..1529a6d2 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -179,11 +179,14 @@ Eziam looks nice, too
 #+BEGIN_SRC emacs-lisp
 (use-package eziam-light-theme
   :ensure eziam-theme
+  :if (or window-system
+          server-name)
   :defines (eziam-scale-headings)
   :config (progn
             (setq eziam-scale-headings nil)
             (load-theme 'eziam-light t)
             (custom-theme-set-faces 'user
+                                    '(default ((t (:background "#ffffff"))))
                                     '(js2-function-call ((t (:underline nil))))
                                     '(font-lock-keyword-face ((t (:weight normal))))
                                     '(git-gutter-fr:added ((t (:foreground "#96a4ab"))))
@@ -316,7 +319,8 @@ Sometimes I like to hide clutter.  Other times, it's useful.
 (when mode-line-default-hidden
   (call-interactively #'hide-mode-line))
 
-(setq-default indicate-buffer-boundaries 'left)
+(setq-default indicate-buffer-boundaries nil)
+(fringe-mode '(4 . 4))
 
 (defun hide-mode-line-if-default-hidden ()
   (if mode-line-default-hidden
@@ -567,7 +571,9 @@ based upon some folder conventions I use.
                   projectile-completion-system 'ivy)))
 
 (use-package counsel-projectile
-  :config (counsel-projectile-on))
+  :config (progn
+            (counsel-projectile-on)
+            (define-key projectile-mode-map [remap counsel-projectile-ag] #'counsel-projectile-rg)))
 #+END_SRC
 
 ** vc
@@ -603,15 +609,15 @@ fringe so it doesn’t interfere with flycheck.
             (setq-default fringes-outside-margins t)
             ;; thin fringe bitmaps
             (fringe-helper-define 'git-gutter-fr:added '(center repeated)
-              "XXX.....")
+              ".XXX....")
             (fringe-helper-define 'git-gutter-fr:modified '(center repeated)
-              "XXX.....")
+              ".XXX....")
             (fringe-helper-define 'git-gutter-fr:deleted 'bottom
-              "X......."
-              "XX......"
-              "XXX....."
-              "XXXX....")
-            (setq git-gutter-fr:side 'left-fringe)))
+              ".......X"
+              "......XX"
+              ".....XXX"
+              "....XXXX")
+            (setq git-gutter-fr:side 'right-fringe)))
 #+END_SRC
 
 ** magit
@@ -631,6 +637,17 @@ time.  Make sure to set it up with a nice =completing-read-function=
   :init (add-hook 'magit-mode-hook #'magit-load-config-extensions))
 #+END_SRC
 
+** git-messenger
+
+Popup the last commit that changed the line at point.
+
+#+BEGIN_SRC emacs-lisp
+(use-package git-messenger
+  :bind* (("C-x v p" . git-messenger:popup-message))
+  :config (progn
+            (setq git-messenger:use-magit-popup t)))
+#+END_SRC
+
 ** git-timemachine
 
 This package allow me to go through a file’s history with just a few
@@ -1188,6 +1205,17 @@ Expand subfolders like a tree inside the parent
             (bind-key "i" #'dired-subtree-toggle dired-mode-map))))
 #+END_SRC
 
+** Disk usage
+
+Combine dired and du (disk usage).
+
+#+BEGIN_SRC emacs-lisp
+(use-package dired-du
+  :after dired
+  :config (progn
+            (setq dired-du-size-format t)))
+#+END_SRC
+
 ** Dired-narrow
 One can already use dired with wildcards to browse a filtered
 directory listing, but it opens a new buffer.  Dired-narrow is a
@@ -1317,7 +1345,7 @@ information here as well.
 #+BEGIN_SRC emacs-lisp
 (use-package bbdb
   :config (progn
-            (bbdb-initialize 'gnus 'mail 'message 'pgp)
+            (bbdb-initialize 'gnus 'message 'pgp)
             (bbdb-mua-auto-update-init 'gnus 'message)
             (setq bbdb-send-mail-style 'gnus
                   bbdb-complete-mail-allow-cycling t
@@ -1619,13 +1647,15 @@ works really nicely.
             (ledger-report "Budget (Cumulative)" nil)))
   :config (progn
             (setq ledger-use-iso-dates t
-                  ledger-post-use-completion-engine :built-in
+                  ledger-post-use-completion-engine :ido
                   ledger-reconcile-default-commodity "€"
                   ledger-clear-whole-transactions t
                   ledger-narrow-on-reconcile t
-                  ledger-default-date-format "%Y-%m-%d"
-                  ledger-reports '(("Monthly Expenses" "ledger -f %(ledger-file) reg -M Expenses --real -l \"payee != 'Opening Balances'\"")
-                                   ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Expenses -p \"this month\"")
+                  ledger-reports `(("Monthly Expenses" "ledger -f %(ledger-file) reg -M \\^Flex --real -X EUR -l \"payee != 'Opening Balances'\"")
+                                   ("Average Monthly Expenses (Past 12 Months)" ,(concat "ledger -f %(ledger-file) -b "
+                                                                                    (format-time-string "%Y-%m" (time-add (current-time) (days-to-time -365)))
+                                                                                    " --monthly --average balance ^Flex"))
+                                   ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Flex -p \"this month\"")
                                    ("On-budget Balances" "ledger -f %(ledger-file) bal --current -R :Budget: Assets:Receivable Liabilities:Personal")
                                    ("All Account Balances" "ledger -f %(ledger-file) bal --current -R \\^Assets \\^Liabilities")
                                    ("Budget Values (Current Month)" "ledger -f %(ledger-file) bal -p \"this month\" --limit \"payee=~/budget/\" \\^Funds")
@@ -1658,7 +1688,9 @@ Org is wünderbar.
 (use-package org
   :bind (("C-c C-a" . org-agenda-list)
          ("C-c a" . org-agenda)
-         ("C-c l" . org-store-link))
+         ("C-c l" . org-store-link)
+         :map org-src-mode-map
+         ("C-x C-s" . org-edit-src-exit))
   :defer 8
   :init (setq org-replace-disputed-keys t
               org-ellipsis "…")
@@ -1753,10 +1785,10 @@ On-the-fly error checking in programming modes?  Yes please.
   :config (progn
             (global-flycheck-mode)
             (setq flycheck-check-syntax-automatically '(save mode-enabled))
-            (setq flycheck-indication-mode 'right-fringe)
+            (setq flycheck-indication-mode 'left-fringe)
             (with-eval-after-load 'git-gutter-fringe
               (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated)
-                ".XXXXXXX"))
+                ".XXX...."))
             (if (executable-find "eslint_d")
                 (setq flycheck-javascript-eslint-executable "eslint_d"))))
 #+END_SRC
@@ -2468,22 +2500,6 @@ I like to use the clipboard more than the primary selection in X11.
   (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
 #+END_SRC
 
-*** Copy formatted code
-
-#+BEGIN_SRC emacs-lisp
-(bind-key* "C-c w" (define-prefix-command 'copy-as-map))
-(use-package copy-as-format
-  :bind (("C-c C-w" . copy-as-format)
-         :map copy-as-map
-         ("b" . copy-as-format-bitbucket)
-         ("g" . copy-as-format-github)
-         ("h" . copy-as-format-hipchat)
-         ("w" . copy-as-format-html)
-         ("j" . copy-as-format-jira)
-         ("m" . copy-as-format-markdown)
-         ("s" . copy-as-format-slack)))
-#+END_SRC
-
 ** Selection
 
 I’m quite used to deleting text by selecting it and typing.  Emacs has