2020-10-13 20:35:02 -04:00
|
|
|
(map! :leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "List bookmarks"
|
|
|
|
"b L" #'list-bookmarks
|
|
|
|
:leader
|
|
|
|
:desc "Save current bookmarks to bookmark file"
|
|
|
|
"b w" #'bookmark-save)
|
2020-06-19 23:43:40 -04:00
|
|
|
|
2020-10-13 20:35:02 -04:00
|
|
|
(setq centaur-tabs-set-bar 'over
|
|
|
|
centaur-tabs-set-icons t
|
|
|
|
centaur-tabs-gray-out-icons 'buffer
|
|
|
|
centaur-tabs-height 24
|
|
|
|
centaur-tabs-set-modified-marker t
|
|
|
|
centaur-tabs-style "bar"
|
|
|
|
centaur-tabs-modified-marker "•")
|
|
|
|
(map! :leader
|
|
|
|
:desc "Toggle tabs on/off"
|
2020-10-23 21:39:58 -04:00
|
|
|
"t c" #'centaur-tabs-local-mode)
|
2020-11-02 19:56:51 -05:00
|
|
|
(evil-define-key 'normal centaur-tabs-mode-map (kbd "g <right>") 'centaur-tabs-forward ; default Doom binding is 'g t'
|
|
|
|
(kbd "g <left>") 'centaur-tabs-backward ; default Doom binding is 'g T'
|
|
|
|
(kbd "g <down>") 'centaur-tabs-forward-group
|
|
|
|
(kbd "g <up>") 'centaur-tabs-backward-group)
|
2020-10-23 21:39:58 -04:00
|
|
|
|
|
|
|
(map! :leader
|
|
|
|
:desc "Dired"
|
|
|
|
"d d" #'dired
|
2020-10-13 20:35:02 -04:00
|
|
|
:leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Dired jump to current"
|
|
|
|
"d j" #'dired-jump
|
|
|
|
(:after dired
|
|
|
|
(:map dired-mode-map
|
|
|
|
:leader
|
|
|
|
:desc "Peep-dired image previews"
|
|
|
|
"d p" #'peep-dired
|
|
|
|
:leader
|
|
|
|
:desc "Dired view file"
|
|
|
|
"d v" #'dired-view-file)))
|
2020-11-07 15:05:16 -05:00
|
|
|
;; Make 'h' and 'l' go back and forward in dired. Much faster to navigate the directory structure!
|
|
|
|
(evil-define-key 'normal dired-mode-map
|
|
|
|
(kbd "h") 'dired-up-directory
|
|
|
|
(kbd "l") 'dired-open-file) ; use dired-find-file instead if not using dired-open package
|
|
|
|
;; If peep-dired is enabled, you will get image previews as you go up/down with 'j' and 'k'
|
|
|
|
(evil-define-key 'normal peep-dired-mode-map
|
|
|
|
(kbd "j") 'peep-dired-next-file
|
|
|
|
(kbd "k") 'peep-dired-prev-file)
|
2020-10-23 21:39:58 -04:00
|
|
|
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
2020-11-07 15:05:16 -05:00
|
|
|
;; Get file icons in dired
|
|
|
|
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
|
|
|
|
;; With dired-open plugin, you can launch external programs for certain extensions
|
|
|
|
;; For example, I set all .png files to open in 'sxiv' and all .mp4 files to open in 'mpv'
|
|
|
|
(setq dired-open-extensions '(("gif" . "sxiv")
|
|
|
|
("jpg" . "sxiv")
|
|
|
|
("png" . "sxiv")
|
|
|
|
("mkv" . "mpv")
|
|
|
|
("mp4" . "mpv")))
|
2020-10-23 21:39:58 -04:00
|
|
|
|
|
|
|
(setq doom-theme 'doom-one)
|
|
|
|
(map! :leader
|
|
|
|
:desc "Load new theme"
|
|
|
|
"h t" #'counsel-load-theme)
|
|
|
|
|
|
|
|
(custom-set-variables
|
|
|
|
'(elfeed-feeds
|
|
|
|
(quote
|
|
|
|
(("https://www.reddit.com/r/linux.rss" reddit linux)
|
|
|
|
("https://www.gamingonlinux.com/article_rss.php" gaming linux)
|
|
|
|
("https://hackaday.com/blog/feed/" hackaday linux)
|
|
|
|
("https://opensource.com/feed" opensource linux)
|
|
|
|
("https://linux.softpedia.com/backend.xml" softpedia linux)
|
|
|
|
("https://itsfoss.com/feed/" itsfoss linux)
|
|
|
|
("https://www.zdnet.com/topic/linux/rss.xml" zdnet linux)
|
|
|
|
("https://www.phoronix.com/rss.php" phoronix linux)
|
|
|
|
("http://feeds.feedburner.com/d0od" omgubuntu linux)
|
|
|
|
("https://www.computerworld.com/index.rss" computerworld linux)
|
|
|
|
("https://www.networkworld.com/category/linux/index.rss" networkworld linux)
|
|
|
|
("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux)
|
|
|
|
("https://betanews.com/feed" betanews linux)
|
|
|
|
("http://lxer.com/module/newswire/headlines.rss" lxer linux)
|
|
|
|
("https://distrowatch.com/news/dwd.xml" distrowatch linux)))))
|
|
|
|
|
|
|
|
(emms-all)
|
|
|
|
(emms-default-players)
|
|
|
|
(emms-mode-line 1)
|
|
|
|
(emms-playing-time 1)
|
|
|
|
(setq emms-source-file-default-directory "~/Music/Non-Classical/70s-80s/"
|
|
|
|
emms-playlist-buffer-name "*Music*"
|
|
|
|
emms-info-asynchronously t
|
|
|
|
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
|
|
|
|
(map! :leader
|
|
|
|
:desc "Go to emms playlist"
|
|
|
|
"a a" #'emms-playlist-mode-go
|
2020-10-13 20:35:02 -04:00
|
|
|
:leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Emms pause track"
|
|
|
|
"a x" #'emms-pause
|
2020-10-13 20:35:02 -04:00
|
|
|
:leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Emms stop track"
|
|
|
|
"a s" #'emms-stop
|
2020-10-13 20:35:02 -04:00
|
|
|
:leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Emms play previous track"
|
|
|
|
"a p" #'emms-previous
|
2020-10-13 20:35:02 -04:00
|
|
|
:leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Emms play next track"
|
|
|
|
"a n" #'emms-next)
|
2020-10-16 22:43:49 -04:00
|
|
|
|
|
|
|
(map! :leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Evaluate elisp in buffer"
|
|
|
|
"e b" #'eval-buffer
|
|
|
|
:leader
|
|
|
|
:desc "Evaluate defun"
|
|
|
|
"e d" #'eval-defun
|
|
|
|
:leader
|
|
|
|
:desc "Evaluate elisp expression"
|
|
|
|
"e e" #'eval-expression
|
|
|
|
:leader
|
|
|
|
:desc "Evaluate last sexpression"
|
|
|
|
"e l" #'eval-last-sexp
|
|
|
|
:leader
|
|
|
|
:desc "Evaluate elisp in region"
|
|
|
|
"e r" #'eval-region)
|
2020-10-16 22:43:49 -04:00
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(setq browse-url-browser-function 'eww-browse-url)
|
2020-10-16 22:43:49 -04:00
|
|
|
(map! :leader
|
2020-10-23 21:39:58 -04:00
|
|
|
:desc "Eww web browser"
|
|
|
|
"e w" #'eww
|
|
|
|
:leader
|
|
|
|
:desc "Eww reload page"
|
|
|
|
"e R" #'eww-reload
|
|
|
|
:leader
|
|
|
|
:desc "Search web for text between BEG/END"
|
|
|
|
"s w" #'eww-search-words)
|
2020-06-19 23:43:40 -04:00
|
|
|
|
2020-12-16 22:18:19 -05:00
|
|
|
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 15)
|
2020-10-23 21:39:58 -04:00
|
|
|
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
2020-12-16 22:18:19 -05:00
|
|
|
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
2020-10-17 19:04:49 -04:00
|
|
|
(after! doom-themes
|
2020-10-23 21:39:58 -04:00
|
|
|
(setq doom-themes-enable-bold t
|
|
|
|
doom-themes-enable-italic t))
|
|
|
|
(custom-set-faces!
|
|
|
|
'(font-lock-comment-face :slant italic)
|
|
|
|
'(font-lock-keyword-face :slant italic))
|
2020-10-17 19:04:49 -04:00
|
|
|
|
2020-11-02 19:56:51 -05:00
|
|
|
(setq ivy-posframe-display-functions-alist
|
|
|
|
'((swiper . ivy-posframe-display-at-point)
|
|
|
|
(complete-symbol . ivy-posframe-display-at-point)
|
|
|
|
(counsel-M-x . ivy-display-function-fallback)
|
|
|
|
(counsel-esh-history . ivy-posframe-display-at-window-center)
|
|
|
|
(counsel-describe-function . ivy-display-function-fallback)
|
|
|
|
(counsel-describe-variable . ivy-display-function-fallback)
|
|
|
|
(counsel-find-file . ivy-display-function-fallback)
|
|
|
|
(counsel-recentf . ivy-display-function-fallback)
|
|
|
|
(counsel-register . ivy-posframe-display-at-frame-bottom-window-center)
|
|
|
|
(dmenu . ivy-posframe-display-at-frame-top-center)
|
|
|
|
(nil . ivy-posframe-display))
|
|
|
|
ivy-posframe-height-alist
|
|
|
|
'((swiper . 20)
|
|
|
|
(dmenu . 20)
|
|
|
|
(t . 10)))
|
|
|
|
(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it.
|
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(map! :leader
|
|
|
|
:desc "Ivy push view"
|
|
|
|
"v p" #'ivy-push-view
|
|
|
|
:leader
|
|
|
|
:desc "Ivy switch view"
|
|
|
|
"v s" #'ivy-switch-view)
|
2020-10-17 19:04:49 -04:00
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(setq display-line-numbers-type t)
|
|
|
|
(map! :leader
|
|
|
|
:desc "Toggle truncate lines"
|
|
|
|
"t t" #'toggle-truncate-lines)
|
|
|
|
|
|
|
|
(after! mastodon
|
|
|
|
(setq mastodon-instance-url "https://mastodon.technology/"))
|
|
|
|
|
2020-06-19 23:43:40 -04:00
|
|
|
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
2020-12-18 20:42:21 -05:00
|
|
|
;;(require 'smtpmail)
|
2020-12-18 11:24:49 -05:00
|
|
|
(setq user-mail-address "derek@distrotube.com"
|
2020-10-16 22:43:49 -04:00
|
|
|
user-full-name "Derek Taylor"
|
2020-12-18 11:24:49 -05:00
|
|
|
;; I have my mbsyncrc in a different folder on my system, to keep it separate from the
|
|
|
|
;; mbsyncrc available publicly in my dotfiles. You MUST edit the following line.
|
|
|
|
;; Be sure that the following command is: "mbsync -c ~/.config/mu4e/mbsyncrc -a"
|
|
|
|
mu4e-get-mail-command "mbsync -c ~/.config/mu4e-dt/mbsyncrc -a"
|
|
|
|
mu4e-update-interval 300
|
2020-10-16 22:43:49 -04:00
|
|
|
mu4e-compose-signature
|
|
|
|
(concat
|
|
|
|
"Derek Taylor\n"
|
|
|
|
"http://www.youtube.com/DistroTube\n")
|
|
|
|
message-send-mail-function 'smtpmail-send-it
|
|
|
|
starttls-use-gnutls t
|
|
|
|
smtpmail-starttls-credentials '(("smtp.1and1.com" 587 nil nil))
|
2020-12-18 21:15:43 -05:00
|
|
|
smtpmail-smtp-user "derek@distrotube.com"
|
2020-10-16 22:43:49 -04:00
|
|
|
smtpmail-default-smtp-server "smtp.1and1.com"
|
|
|
|
smtpmail-smtp-server "smtp.1and1.com"
|
2020-10-23 21:39:58 -04:00
|
|
|
smtpmail-smtp-service 587
|
|
|
|
mu4e-sent-folder "/Sent"
|
2020-10-16 22:43:49 -04:00
|
|
|
mu4e-drafts-folder "/Drafts"
|
|
|
|
mu4e-trash-folder "/Trash"
|
2020-10-23 21:39:58 -04:00
|
|
|
mu4e-refile-folder "/All Mail"
|
|
|
|
mu4e-maildir-shortcuts
|
2020-10-16 22:43:49 -04:00
|
|
|
'(("/derek-distrotube/Inbox" . ?i)
|
|
|
|
("/derek-distrotube/Sent" . ?s)
|
|
|
|
("/derek-distrotube/All Mail" . ?a)
|
|
|
|
("/derek-distrotube/Trash" . ?t)))
|
2020-06-19 23:43:40 -04:00
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(after! neotree
|
|
|
|
(setq neo-smart-open t
|
|
|
|
neo-window-fixed-size nil))
|
|
|
|
(after! doom-themes
|
|
|
|
(setq doom-neotree-enable-variable-pitch t))
|
|
|
|
(map! :leader
|
|
|
|
:desc "Toggle neotree file viewer"
|
2020-12-15 18:16:29 -05:00
|
|
|
"t n" #'neotree-toggle
|
|
|
|
:leader
|
|
|
|
:desc "Open directory in neotree"
|
|
|
|
"d n" #'neotree-dir)
|
2020-06-19 23:43:40 -04:00
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(map! :leader
|
|
|
|
:desc "Edit agenda file"
|
2020-11-05 14:27:52 -05:00
|
|
|
"- a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
|
2020-10-23 21:39:58 -04:00
|
|
|
:leader
|
|
|
|
:desc "Edit doom config.org"
|
2020-11-05 14:27:52 -05:00
|
|
|
"- c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
|
2020-10-23 21:39:58 -04:00
|
|
|
:leader
|
|
|
|
:desc "Edit eshell aliases"
|
2020-11-05 14:27:52 -05:00
|
|
|
"- e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
|
2020-10-23 21:39:58 -04:00
|
|
|
:leader
|
|
|
|
:desc "Edit doom init.el"
|
2020-11-05 14:27:52 -05:00
|
|
|
"- i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
|
2020-10-23 21:39:58 -04:00
|
|
|
:leader
|
|
|
|
:desc "Edit doom packages.el"
|
2020-11-05 14:27:52 -05:00
|
|
|
"- p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
|
2020-07-14 12:54:54 -04:00
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(after! org
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
|
|
|
(setq org-directory "~/Org/"
|
|
|
|
org-agenda-files '("~/Org/agenda.org")
|
|
|
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
|
|
|
org-ellipsis " ▼ "
|
|
|
|
org-log-done 'time
|
|
|
|
org-journal-dir "~/Org/journal/"
|
2020-12-15 18:16:29 -05:00
|
|
|
org-journal-date-format "%B %d, %Y (%A) "
|
2020-10-23 21:39:58 -04:00
|
|
|
org-journal-file-format "%Y-%m-%d.org"
|
|
|
|
org-hide-emphasis-markers t
|
|
|
|
;; ex. of org-link-abbrev-alist in action
|
|
|
|
;; [[arch-wiki:Name_of_Page][Description]]
|
|
|
|
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
|
|
|
'(("google" . "http://www.google.com/search?q=")
|
|
|
|
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
|
|
|
("ddg" . "https://duckduckgo.com/?q=")
|
|
|
|
("wiki" . "https://en.wikipedia.org/wiki/"))
|
|
|
|
org-todo-keywords ; This overwrites the default Doom org-todo-keywords
|
|
|
|
'((sequence
|
|
|
|
"TODO(t)" ; A task that is ready to be tackled
|
|
|
|
"BLOG(b)" ; Blog writing assignments
|
|
|
|
"GYM(g)" ; Things to accomplish at the gym
|
|
|
|
"PROJ(p)" ; A project that contains other tasks
|
|
|
|
"VIDEO(v)" ; Video assignments
|
|
|
|
"WAIT(w)" ; Something is holding up this task
|
|
|
|
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
|
|
|
"DONE(d)" ; Task has been completed
|
|
|
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
|
|
|
|
2020-11-20 21:48:15 -05:00
|
|
|
(defun dt/org-babel-tangle-async (file)
|
|
|
|
"Invoke `org-babel-tangle-file' asynchronously."
|
|
|
|
(message "Tangling %s..." (buffer-file-name))
|
|
|
|
(async-start
|
|
|
|
(let ((args (list file)))
|
|
|
|
`(lambda ()
|
|
|
|
(require 'org)
|
|
|
|
;;(load "~/.emacs.d/init.el")
|
|
|
|
(let ((start-time (current-time)))
|
|
|
|
(apply #'org-babel-tangle-file ',args)
|
|
|
|
(format "%.2f" (float-time (time-since start-time))))))
|
|
|
|
(let ((message-string (format "Tangling %S completed after " file)))
|
|
|
|
`(lambda (tangle-time)
|
|
|
|
(message (concat ,message-string
|
|
|
|
(format "%s seconds" tangle-time)))))))
|
|
|
|
|
|
|
|
(defun dt/org-babel-tangle-current-buffer-async ()
|
|
|
|
"Tangle current buffer asynchronously."
|
|
|
|
(dt/org-babel-tangle-async (buffer-file-name)))
|
|
|
|
|
2020-10-23 21:39:58 -04:00
|
|
|
(map! :leader
|
|
|
|
:desc "Copy to register"
|
|
|
|
"r c" #'copy-to-register
|
|
|
|
:leader
|
|
|
|
:desc "Frameset to register"
|
|
|
|
"r f" #'frameset-to-register
|
|
|
|
:leader
|
|
|
|
:desc "Insert contents of register"
|
|
|
|
"r i" #'insert-register
|
|
|
|
:leader
|
|
|
|
:desc "Jump to register"
|
|
|
|
"r j" #'jump-to-register
|
|
|
|
:leader
|
|
|
|
:desc "List registers"
|
|
|
|
"r l" #'list-registers
|
|
|
|
:leader
|
|
|
|
:desc "Number to register"
|
|
|
|
"r n" #'number-to-register
|
|
|
|
:leader
|
|
|
|
:desc "Interactively choose a register"
|
|
|
|
"r r" #'counsel-register
|
|
|
|
:leader
|
|
|
|
:desc "View a register"
|
|
|
|
"r v" #'view-register
|
|
|
|
:leader
|
|
|
|
:desc "Window configuration to register"
|
|
|
|
"r w" #'window-configuration-to-register
|
|
|
|
:leader
|
|
|
|
:desc "Increment register"
|
|
|
|
"r +" #'increment-register
|
|
|
|
:leader
|
|
|
|
:desc "Point to register"
|
|
|
|
"r SPC" #'point-to-register)
|
|
|
|
|
|
|
|
(map! :leader
|
|
|
|
:desc "Ssh into distrotube.com"
|
|
|
|
"\\ d" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com"))
|
|
|
|
:leader
|
|
|
|
:desc "Ssh into my nextcloud"
|
|
|
|
"\\ n" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.net")))
|
|
|
|
|
|
|
|
(setq shell-file-name "/bin/fish"
|
2020-11-02 19:56:51 -05:00
|
|
|
eshell-aliases-file "~/.doom.d/aliases"
|
|
|
|
eshell-history-size 5000
|
|
|
|
eshell-buffer-maximum-lines 5000
|
|
|
|
eshell-hist-ignoredups t
|
|
|
|
eshell-scroll-to-bottom-on-input t
|
|
|
|
eshell-destroy-buffer-when-process-dies t
|
2020-12-15 18:16:29 -05:00
|
|
|
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh")
|
2020-11-02 19:56:51 -05:00
|
|
|
vterm-max-scrollback 5000)
|
|
|
|
(map! :leader
|
|
|
|
:desc "Counsel eshell history"
|
|
|
|
"e h" #'counsel-esh-history)
|
2020-10-23 21:39:58 -04:00
|
|
|
|
|
|
|
(defun prefer-horizontal-split ()
|
|
|
|
(set-variable 'split-height-threshold nil t)
|
|
|
|
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
|
|
|
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
|
|
|
(map! :leader
|
|
|
|
:desc "Clone indirect buffer other window"
|
|
|
|
"b c" #'clone-indirect-buffer-other-window)
|
|
|
|
|
|
|
|
(map! :leader
|
|
|
|
:desc "Winner redo"
|
|
|
|
"w <right>" #'winner-redo
|
|
|
|
:leader
|
|
|
|
:desc "Winner undo"
|
|
|
|
"w <left>" #'winner-undo)
|