147 lines
5.4 KiB
EmacsLisp
147 lines
5.4 KiB
EmacsLisp
;; -*- coding: utf-8 -*-
|
|
(add-to-list 'custom-theme-load-path (expand-file-name "~/.emacs.d/bundle/nord-theme/"))
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle"))
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/markdown-mode"))
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/linum-relative"))
|
|
|
|
(setq nord-region-highlight "snowstorm")
|
|
(setq nord-comment-brightness 15)
|
|
(load-theme 'nord t)
|
|
|
|
(require 'markdown-mode)
|
|
(require 'linum-relative)
|
|
(require 'fill-column-indicator)
|
|
(require 'tls)
|
|
|
|
;; 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)
|
|
(add-to-list 'package-archives
|
|
'("melpa-stable" . "https://stable.melpa.org/packages/"))
|
|
(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.
|
|
'(cal-html-directory "~/Documents/Diary")
|
|
'(calendar-date-style (quote iso))
|
|
'(calendar-week-start-day 1)
|
|
'(custom-safe-themes
|
|
(quote
|
|
("4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default)))
|
|
'(diary-file "~/Documents/Diary/diary")
|
|
'(display-time-world-list
|
|
(quote
|
|
(("America/Los_Angeles" "Seattle")
|
|
("America/New_York" "New York")
|
|
("Europe/London" "London")
|
|
("Europe/Paris" "Paris")
|
|
("Asia/Calcutta" "Bangalore")
|
|
("Asia/Tokyo" "Tokyo"))))
|
|
'(fill-column 72)
|
|
'(font-lock-maximum-decoration t)
|
|
'(global-font-lock-mode t)
|
|
'(global-hl-line-mode t)
|
|
'(indent-tabs-mode nil)
|
|
'(inhibit-startup-screen nil)
|
|
'(line-spacing 3)
|
|
'(linum-relative-backend (quote display-line-numbers-mode))
|
|
'(major-mode (quote text-mode))
|
|
'(newsticker-download-logos nil)
|
|
'(newsticker-frontend (quote newsticker-plainview))
|
|
'(newsticker-show-descriptions-of-new-items nil)
|
|
'(newsticker-url-list-defaults
|
|
(quote
|
|
(("Emacs Wiki" "https://www.emacswiki.org/emacs?action=rss" nil 3600)
|
|
("Linuxjournal" "https://www.linuxjournal.com/node/feed")
|
|
("Phoronix" "https://www.phoronix.com/rss.php")
|
|
("Python PEP" "https://www.python.org/dev/peps/peps.rss/")
|
|
("USN" "https://usn.ubuntu.com/atom.xml"))))
|
|
'(org-agenda-files (quote ("~/Documents/Journal")))
|
|
'(org-default-notes-file "~/Documents/Journal/notes.org")
|
|
'(package-selected-packages (quote (magit)))
|
|
'(require-final-newline t)
|
|
'(timeclock-file "~/Documents/Diary/timelog")
|
|
'(timeclock-mode-line-display t)
|
|
'(visible-bell 1))
|
|
|
|
(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.
|
|
)
|
|
|
|
;; set modes
|
|
(line-number-mode -1)
|
|
(column-number-mode -1)
|
|
(blink-cursor-mode -1)
|
|
(display-battery-mode -1)
|
|
(display-time-mode 1)
|
|
(size-indication-mode -1)
|
|
|
|
;; UTF-8 FTW
|
|
(prefer-coding-system 'utf-8)
|
|
(set-keyboard-coding-system 'utf-8)
|
|
(set-terminal-coding-system 'utf-8)
|
|
|
|
;; nuke trailing whitespace when writing to a file
|
|
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
|
(add-hook 'org-mode-hook 'turn-on-font-lock)
|
|
(add-hook 'markdown-mode-hook 'turn-on-font-lock)
|
|
(add-hook 'python-mode-hook 'turn-on-font-lock)
|
|
|
|
;; I got sick of typing "yes"
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
;; Turn off chrome
|
|
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
|
|
(when (fboundp mode) (funcall mode -1)))
|
|
|
|
;; start a server, unless one is already running
|
|
(when (require 'server nil t) (unless (server-running-p) (server-start)))
|
|
|
|
;; custom packages
|
|
(when (eq system-type 'darwin)
|
|
(when (display-graphic-p)
|
|
;;(set-default-font "RobotoMono Nerd Font 13")
|
|
(set-frame-font "RobotoMono Nerd Font 13")
|
|
(add-to-list 'default-frame-alist '(font . "RobotoMono Nerd Font-13"))
|
|
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
|
|
(add-to-list 'default-frame-alist '(ns-appearance . dark))
|
|
(add-to-list 'default-frame-alist '(height . 60))
|
|
(add-to-list 'default-frame-alist '(width . 80))))
|
|
|
|
(when (eq system-type 'windows-nt)
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/__evo"))
|
|
(require 'evo-feeds)
|
|
(when (display-graphic-p)
|
|
(add-to-list 'default-frame-alist '(font . "Roboto Mono-11"))
|
|
(add-to-list 'default-frame-alist '(height . 55))
|
|
(add-to-list 'default-frame-alist '(width . 80))))
|
|
|
|
(when (eq system-type 'gnu/linux)
|
|
(setq-default line-spacing 10)
|
|
(when (display-graphic-p)
|
|
;;(add-to-list 'default-frame-alist '(font . "Roboto Mono-11"))
|
|
(add-to-list 'default-frame-alist '(height . 55))
|
|
(add-to-list 'default-frame-alist '(width . 80))))
|
|
|
|
(defun copy-whole-buffer ()
|
|
"Copy entire buffer to clipboard"
|
|
(interactive)
|
|
(clipboard-kill-ring-save (point-min) (point-max)))
|
|
|
|
(put 'upcase-region 'disabled nil)
|
|
(setq view-diary-entries-initially t
|
|
mark-diary-entries-in-calendar t
|
|
number-of-diary-entries 7)
|
|
(add-hook 'diary-display-hook 'fancy-diary-display)
|
|
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
|
|
(global-set-key "\C-cc" 'org-capture)
|
|
(global-set-key "\C-ca" 'org-agenda)
|
|
(setq org-todo-keywords
|
|
'((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
|
|
(put 'narrow-to-region 'disabled nil)
|