From 79f194da3ef359e7b9aa8bb4b011fdff953fc5e1 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Fri, 26 Feb 2021 09:40:38 -0500 Subject: [PATCH] Code cleanup --- README.org | 29 +++++++++++++++++++++++------ modules/core.el | 16 +++++++++++----- modules/writing.el | 3 +++ 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/README.org b/README.org index cceed19..4109620 100644 --- a/README.org +++ b/README.org @@ -292,16 +292,26 @@ Despite having our *stateful* and *immutable* configurations seperate, it's good (use-package no-littering) #+end_src -Emacs' default user interface is horrendous, but with less than 10 lines of code we can change that. +Emacs' default user interface is *horrendous*, let's do something about that. #+begin_src emacs-lisp -(setq inhibit-startup-message t) +(setq inhibit-startup-message t + initial-scratch-message "") + (global-prettify-symbols-mode) -(scroll-bar-mode -1) -(menu-bar-mode -1) -(tool-bar-mode -1) -(tooltip-mode -1) +(when (window-system) + (tool-bar-mode -1) + (scroll-bar-mode -1) + (menu-bar-mode -1) + (tooltip-mode -1)) +#+end_src + +Emacs has a long history of running on machines without gigabytes of available memory, let it realize its full potential! Just kidding, it just smashes *CPU0*. + +#+begin_src emacs-lisp +(setq gc-cons-treshold most-positive-fixnum + gnutls-min-prime-bits 4096) #+end_src *** Babel @@ -822,6 +832,13 @@ I am using [[https://orgmode.org][org-mode]] extensively for writing projects fo :hook (org-mode . org-superstar-mode)) #+end_src +Encrypt files using symmetric key encryption via PGP. This enables my workflow of storing my personal notes anywhere. Emacs can cache the gpg password if you trust your session. + +#+begin_src emacs-lisp +(setq epa-file-select-keys 2 + epa-file-cache-passphrase-for-symmetric-encryption t) +#+end_src + *** Roam #+ATTR_ORG: :width 420px diff --git a/modules/core.el b/modules/core.el index 3ba7cb8..733bc03 100644 --- a/modules/core.el +++ b/modules/core.el @@ -23,13 +23,19 @@ (use-package no-littering) -(setq inhibit-startup-message t) +(setq inhibit-startup-message t + initial-scratch-message "") + (global-prettify-symbols-mode) -(scroll-bar-mode -1) -(menu-bar-mode -1) -(tool-bar-mode -1) -(tooltip-mode -1) +(when (window-system) + (tool-bar-mode -1) + (scroll-bar-mode -1) + (menu-bar-mode -1) + (tooltip-mode -1)) + +(setq gc-cons-treshold most-positive-fixnum + gnutls-min-prime-bits 4096) (use-package org :hook (org-mode . (lambda () diff --git a/modules/writing.el b/modules/writing.el index 549097a..b70c695 100644 --- a/modules/writing.el +++ b/modules/writing.el @@ -2,6 +2,9 @@ :after org :hook (org-mode . org-superstar-mode)) +(setq epa-file-select-keys 2 + epa-file-cache-passphrase-for-symmetric-encryption t) + (use-package org-roam :hook (after-init . org-roam-mode) :custom (org-roam-directory org-directory)