And the ~/. was with with Emacs and Emacs was ~/.

This commit is contained in:
Sebastian Schulze 2015-09-02 14:28:01 +02:00
parent f48a0e4852
commit 7b2c58f8f2
11 changed files with 265 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.elc

View File

@ -1,3 +1,4 @@
.mutt
.maid
.config
.config
.emacs.d/personal

View File

View File

@ -0,0 +1,31 @@
;;; bascht --- all the looks
;;; Commentary:
;;; All the looks
;;; Code:
(require 'moe-theme)
(setq moe-theme-highlight-buffer-id t)
(setq moe-theme-resize-org-title '(1.5 1.4 1.3 1.2 1.1 1.0 1.0 1.0 1.0))
(moe-dark)
(defun on-after-init () "Don't set a background for -nw Emacs."
(unless (display-graphic-p (selected-frame))
(set-face-background 'default "unspecified-bg" (selected-frame))))
(add-hook 'window-setup-hook 'on-after-init)
(if (display-graphic-p)
'(progn
'(menu-bar-mode)
(custom-set-faces
'(mode-line ((t (:background "#85C" :foreground "#85CEEB" :box (:line-width 1 :color "dodger blue")))))
)
(custom-set-faces
'(mode-line ((t (:background "brightblack" :foreground "#4e4e4e" :box (:line-width 1 :color "dodger blue")))))
)))
(provide 'appearance-config)
;;; appearance-config.el ends here

View File

@ -0,0 +1,46 @@
;;; bascht --- meine settings
;;; Commentary:
;;; Hacky as whatnot, but it's mime.
;;; Code:
(require 'package)
(require 'ag)
(require 'nyan-mode)
(require 'notmuch)
(require 'notmuch-address)
(require 'multiple-cursors)
(require 'yasnippet)
(require 'rspec-mode)
(require 'ansi-color)
(add-to-list 'load-path "~/.emacs.d/personal/")
(load-library "org-config")
(load-library "appearance-config")
(load-library "coding-config")
(load-library "mail-config")
(load-library "shortcut-config")
;; Archives from which to fetch.
(setq package-archives
(append '(("melpa" . "http://melpa.org/packages/"))
package-archives))
;;; Hello, Emacs!
(setq user-full-name "Sebastian Schulze")
(setq user-mail-address "github.com@bascht.com")
;;; Global modes
(projectile-global-mode)
(global-company-mode)
(global-hl-line-mode 0)
(yas-global-mode 1)
(setq ispell-dictionary "german")
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'text-mode-hook 'auto-fill-mode)
(setq browse-url-browser-function (quote browse-url-firefox))
;;; bascht.el ends here

View File

@ -0,0 +1,47 @@
;;; bascht --- Code configs
;;; Commentary:
;;; Coding related settings / libs
;;; Code:
(require 'rspec-mode)
(eval-after-load 'rspec-mode
'(rspec-install-snippets))
(defun colorize-compilation-buffer () "Nice colours there."
(read-only-mode)
(ansi-color-apply-on-region (point-min) (point-max))
(read-only-mode))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(defun do-in-root (f) "Execute command F in project root."
(if (projectile-project-p)
(funcall f (projectile-project-root))
(error "You're not in project")))
(defun helm-do-ag-in-root () "Open helm ag current project root."
(interactive)
(do-in-root 'helm-do-ag))
(defun do-ag-in-root (string) "Search for ag for STRING in current project root."
(interactive (list (read-from-minibuffer "Search string: " (ag/dwim-at-point))))
(do-in-root '(lambda (root) (ag/search string root))))
(add-hook 'rspec-mode-hook 'turn-off-flycheck)
(setq rspec-command-options "--format progress")
(setq rspec-spec-command "rspec")
(setq ruby-insert-encoding-magic-comment nil)
(setq flycheck-rust-executable "/usr/local/bin/rustc")
(setq flycheck-rust-library-path (quote ("/usr/local/lib")))
;;; Fix up rust mode
(setenv "LD_LIBRARY_PATH"
(let ((current (getenv "LD_LIBRARY_PATH"))
(new "/usr/local/libs"))
(if current (concat new ":" current) new)))
(provide 'coding-config)
;;; coding-config.el ends here

View File

@ -0,0 +1,13 @@
;;; bascht --- custom settings
;;; Commentary:
;;; Everyting emacs will spit out of M-x customize
;;; Code:
(custom-set-variables
'(custom-safe-themes
(quote
("987d1efa769be3310d48359e54e3c8f6a742449f0c46a651512368359020b87f" default))))
(provide 'custom)
;;; custom.el ends here

View File

@ -0,0 +1,53 @@
;;; bascht --- notmuch settings
;;; Commentary:
;;; notmuch and mail related settings
;;; Code:
(require 'notmuch)
(setq notmuch-address-command "/home/bascht/bin/address")
(notmuch-address-message-insinuate)
(setq notmuch-archive-tags '("-unread" "+archive"))
(add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
(defun notmuch-unread () "Filter for unread and inboxed messages."
(interactive)
(notmuch-search "tag:unread and tag:inbox"))
(defun notmuch-search-toggle-flagged ()
"Toggle flagged state on the current item."
(lambda ()
(interactive)
(if (member "flagged" (notmuch-search-get-tags))
(notmuch-search-tag (list (concat "+" "flagged"))))
(notmuch-search-tag (list(concat "-" "flagged")))
(notmuch-search-next-thread)))
(setq notmuch-crypto-process-mime t)
(setq notmuch-hello-sections
(quote
(notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-recent-searches notmuch-hello-insert-alltags notmuch-hello-insert-footer notmuch-hello-insert-inbox)))
(setq notmuch-message-headers (quote ("Subject" "To" "Cc" "Date" "Received")))
(setq notmuch-search-oldest-first nil)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program "~/bin/msmtpq"
user-full-name "Sebastian Schulze")
(setq message-sendmail-f-is-evil 't)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
(setq message-kill-buffer-on-exit t)
(setq mail-host-address "bascht.com")
;;; load mail-mode when starting up from mutt
(setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist))
(add-hook 'mail-mode-hook 'turn-on-flyspell)
(add-hook 'mail-mode-hook 'turn-on-longlines)
(add-hook 'mail-mode-hook 'auto-fill-mode)
(provide 'mail-config)
;;; mail-config.el ends here

View File

@ -0,0 +1,14 @@
;;; bascht --- org stuff
;;; Commentary:
;;; org-mode related settings
;;; Code:
(require 'org)
(setq org-directory "~/ownCloud/clientsync/Zettelkasten")
(setq org-agenda-files (quote ("~/ownCloud/clientsync/Zettelkasten")))
(setq org-default-notes-file "~/ownCloud/clientsync/Zettelkasten/refile.org")
(provide 'org-config)
;;; org-config.el ends here

View File

@ -0,0 +1,51 @@
;;; bascht --- Shortcuts
;;; Commentary:
;;; Just keyboard shortcuts
;;; Code:
(require 'notmuch)
(global-set-key [f9] 'notmuch-unread)
(define-key notmuch-search-mode-map "F"
(notmuch-search-toggle-flagged))
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x b") 'helm-buffers-list)
(global-set-key (kbd "C-c f") 'helm-recentf)
(global-set-key (kbd "C-c p s s") 'helm-do-ag-in-root)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-c H") 'helm-do-ag-in-root)
(global-set-key (kbd "M-p") 'ace-window)
;;; I <3 multiple cursors!
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C-s->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-s-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-s-c s-<") 'mc/mark-all-like-this)
(global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click)
(global-set-key (kbd "M-+") 'er/expand-region)
;;; Navigate IDO with N + N
(add-hook 'ido-setup-hook '(lambda ()
(define-key ido-completion-map "\C-h" 'ido-delete-backward-updir)
(define-key ido-completion-map "\C-n" 'ido-next-match)
(define-key ido-completion-map "\C-p" 'ido-prev-match)
))
(defun fd-switch-dictionary() "Change Flyspell Dictionary on the fly."
(interactive)
(let* ((dic ispell-current-dictionary)
(change (if (string= dic "deutsch8") "english" "deutsch8")))
(ispell-change-dictionary change)
(message "Dictionary switched from %s to %s" dic change)
))
(global-set-key (kbd "<f8>") 'fd-switch-dictionary)
(provide 'shortcut-config)
;;; shortcut-config.el ends here

View File

@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: Viele Grüße
# key: vgb
# binding: direct-keybinding
# --
Viele Grüße,
Bascht