emacs.d

bloated emacs configuration
git clone git://git.ckyln.com/~cem/emacs.d.git
Log | Files | Refs | README

commit 7dcc15747a008793ec9b6b236fe8e6ec7cb0044d
parent 687161e71fd47d392fe585465ded9e3a6f6b09ec
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  6 Jul 2020 15:38:46 +0300

big update

Diffstat:
Minit.org | 203++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 166 insertions(+), 37 deletions(-)

diff --git a/init.org b/init.org @@ -33,7 +33,10 @@ this file itself. - [[#projectile][Projectile]] - [[#emacs-dashboard][emacs-dashboard]] - [[#elfeed][elfeed]] + - [[#mu4e][mu4e]] - [[#helm][helm]] + - [[#academics][Academics]] + - [[#symon-mode][symon-mode]] - [[#extras][Extras]] - [[#filetype-configurations][Filetype Configurations]] - [[#themes-and-buffer-customization][Themes and Buffer Customization]] @@ -381,14 +384,12 @@ I am quite serious on this vim stuff now. I want it everywhere. (evil-org-agenda-set-keys)) #+END_SRC -Now that we have initialized those packages, let's configure them some -further. +Now that we have initialized those packages, let's configure them some further. ** Magit -I like magit, it is quite useful when you don't want to leave emacs and -you have to manually edit hunks for specific commits. I use evil-magit -along with it. +I like magit, it is quite useful when you don't want to leave emacs and you have +to manually edit hunks for specific commits. I use evil-magit along with it. #+BEGIN_SRC emacs-lisp (use-package magit @@ -417,21 +418,19 @@ along with it. #+END_SRC *** Forge -I like being able to interact with PR's and issues on Github from -the comfort of Emacs. Forge is a good one on that. Less web browsing, -the better. + +I like being able to interact with PR's and issues on Github from the comfort of +Emacs. Forge is a good one on that. Less web browsing, the better. + #+BEGIN_SRC emacs-lisp - (use-package forge - :straight t - :after magit - ) + (use-package forge :straight t :after magit) #+END_SRC ** Flycheck -I use flycheck for async syntax and error checking. It can be really useful -and adds to the IDE-likeness of Emacs. I find things like these to be really -hacky and buggy on Vim. +I use flycheck for async syntax and error checking. It can be really useful and +adds to the IDE-likeness of Emacs. I find things like these to be really hacky +and buggy on Vim. #+BEGIN_SRC emacs-lisp (use-package flycheck @@ -476,6 +475,10 @@ far as I can wrap my head-around. #+END_SRC ** Projectile + +Projectile is a great library/tool for project management. It has great +keybindings that executes commands on a project level. + #+BEGIN_SRC emacs-lisp (use-package projectile :straight t @@ -490,7 +493,12 @@ far as I can wrap my head-around. '(:key "C-c p s g" :description "grep in project")) ) #+END_SRC + ** emacs-dashboard + +The dashboard is my default window of choice that provides me a good amount of +information when I startup Emacs. + #+BEGIN_SRC emacs-lisp (use-package dashboard :straight t @@ -503,9 +511,10 @@ far as I can wrap my head-around. (projects . 5))) :config (dashboard-setup-startup-hook)) #+END_SRC + ** elfeed -I am using elfeed as my RSS viewer, and I configure it through my org -agenda file with elfeed-org +I am using elfeed as my RSS viewer, and I configure it through my org agenda +file with elfeed-org. #+BEGIN_SRC emacs-lisp (use-package elfeed @@ -514,7 +523,7 @@ agenda file with elfeed-org (use-package elfeed-org :straight t - :custom (rmh-elfeed-org-files (list "~/.emacs.d/feed.org")) + :custom (rmh-elfeed-org-files (list (concat user-emacs-directory "feed.org"))) :config (elfeed-org)) @@ -523,18 +532,116 @@ agenda file with elfeed-org '(:key "gR" :description "Refresh feeds") '(:key "s" :description "Sort feed")) #+END_SRC + +** mu4e + +Using mail on Emacs has lots of advantages for me, as I can export mails to my +agenda along with lots of other nice stuff. Currently, I am writing a wizard for +mu4e (which outputs the following file), but it is in really early steps, and I +still couldn't make it read from the password-store. So sending mails are still +somewhat wonky. + +#+BEGIN_SRC emacs-lisp + (use-package mu4e + :straight t + :config (load-file "~/.config/mu4e/mu4e-config.el")) +#+END_SRC + ** helm + +Helm is a completion framework that I have adopted recently, and been using +quite frequently. I use it for finding files, manual pages, switching buffers, +and many more. + #+BEGIN_SRC emacs-lisp - (use-package helm + (use-package helm + :straight t + :commands (helm-find-files helm-buffers-list) + :config + (bind-key "C-x C-f" 'helm-find-files) + (bind-key "C-c m" 'helm-man-woman) + (bind-key "C-x i" 'helm-imenu) + (bind-key "C-x b" 'helm-buffers-list) + (cheatsheet-add-group 'Helm + '(:key "C-x m" :description "Open manual page") + '(:key "C-x i" :description "helm-imenu") + '(:key "C-x b" :description "helm-buffers-list"))) + (use-package helm-descbinds + :straight t + :config + (bind-key "C-x C-d" 'helm-descbinds) + (cheatsheet-add :group "Helm" :key "C-x C-d" :description "helm-descbinds")) + (use-package helm-swoop :straight t) +#+END_SRC + +** Academics + +These are the packages that I make/made use of for academic purposes. These are +the stuff for notetaking, bibliography management, etc. + +*** Org-mode stuff +I am using org-noter and org-roam (which is a zettelkasten) for note-taking, and +I find them extremely useful. + +#+BEGIN_SRC emacs-lisp + (use-package org-noter + :straight t) + + (use-package org-roam + :straight t) +#+END_SRC + +*** Bibliography stuff +I am using helm-bibtex, which is extremely useful navigating bibliography files. +#+BEGIN_SRC emacs-lisp + (use-package helm-bibtex + :straight t) +#+END_SRC + +*** PDF Tools +PDF Tools come handy when I am working with LaTeX, or when I need to take notes +while reading a document. In order to be able to use pdf-tools, you need libpng +and poppler (built with private headers). I have a custom =kiss= build for poppler +that is as follows. + +#+BEGIN_SRC sh :tangle no + #!/bin/sh -e + + export DESTDIR="$1" + + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ + -DENABLE_CPP=ON \ + -DENABLE_QT5=OFF \ + -DWITH_NSS3=OFF + + cmake --build build + cmake --install build +#+END_SRC + +#+BEGIN_SRC emacs-lisp + (use-package pdf-tools :straight t - :commands (helm-find-files helm-buffers-list) :config - (bind-key "C-x C-f" 'helm-find-files) - (bind-key "C-c m" 'helm-man-woman) - (bind-key "C-x b" 'helm-buffers-list)) - (use-package helm-descbinds :straight t) - (use-package helm-swoop :straight t) + (pdf-loader-install)) #+END_SRC + +** symon-mode +I use symon-mode for monitoring system information, which is useful when I am on +EXWM. I use it for monitoring battery, time, cpu, and memory. +#+BEGIN_SRC emacs-lisp + (use-package symon + :straight t + :custom + (symon-monitors '(symon-current-time-monitor + symon-linux-battery-monitor + symon-linux-memory-monitor + symon-linux-cpu-monitor)) + (symon-sparkline-type 'plain)) +#+END_SRC + ** Extras These don't really deserve their own sections, but I prefer to use them. @@ -594,16 +701,6 @@ Github README. :hook (org-mode . toc-org-mode)) #+END_SRC -*** writefreely.el -I publish to my writefreely blog from Emacs. It converts to GitHub -flavoured MarkDown and publishes to the website. - -#+BEGIN_SRC emacs-lisp - (use-package writefreely - :straight t - :after org - ) -#+END_SRC * Filetype Configurations I would like to have some different configurations for filetypes. Those @@ -620,6 +717,20 @@ so I avoid them wherever I can. fill-column 80) #+END_SRC +I am using column number mode to keep track of line status. + +#+BEGIN_SRC emacs-lisp + (add-hook 'prog-mode-hook 'column-number-mode) +#+END_SRC + +Electric-pair-mode (which is a built-in), matches parentheses on Emacs. While +I know that this doesn't form a healthy habit, I really like to have such a +function available to me. + +#+BEGIN_SRC emacs-lisp + (electric-pair-mode t) +#+END_SRC + *** Markdown For markdown, I want to have 4 spaces as an indentation. @@ -698,6 +809,10 @@ For Go, we are installing :after company ) #+END_SRC +*** Makefile +#+BEGIN_SRC emacs-lisp + (use-package helm-make :straight t) +#+END_SRC * Themes and Buffer Customization I used to make use of my Xresources themes, but I sometimes sadly need windows, and I actually do want some eye candy from time to @@ -724,7 +839,7 @@ The 'if' statement makes sure we have (doom-themes-org-config)) #+END_SRC -*** All the icons +** All the icons All the icons is an icon-pack. I mean it probably isn't hard to guess. Pretty straightforward. @@ -733,6 +848,7 @@ guess. Pretty straightforward. (use-package all-the-icons :straight t) #+END_SRC + ** Buffer customizations *** Modeline #+BEGIN_SRC emacs-lisp @@ -740,21 +856,34 @@ guess. Pretty straightforward. :straight t :config (doom-modeline-mode 1)) #+END_SRC + *** awesome-tabs + +awesome-tabs isn't in Melpa, but I personally couldn't install Centaur tabs. + #+BEGIN_SRC emacs-lisp (use-package awesome-tab :straight (:host github :repo "manateelazycat/awesome-tab" :branch "master") :config - (setq awesome-tab-height 100)) + (setq awesome-tab-height 100) + (awesome-tab-mode t)) #+END_SRC + *** undo-tree + +=undo-tree= provides a nice-looking UI for crawling the buffer history in a +visual tree. While this is already a dependency for some packages here, I wanted +to specify it anyway. I don't use it frequently, but this is one of the packages +that you appreciate having when its time comes. + #+BEGIN_SRC emacs-lisp (use-package undo-tree :straight t :config (cheatsheet-add :group "Common" :key "C-x u" :description "undo-tree")) #+END_SRC + * Functions ** Paste Services Here are two paste-thingies that I use. I got the first code from