blob: b202a7b1c74212460c164c60d700be075775a0be (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
#+TITLE: Emacs Configuration
#+PROPERTY: header-args :tangle test.el
#+auto_tangle: t
#+STARTUP: show2levels
* Table of contents
:PROPERTIES:
:TOC: :include all
:END:
:CONTENTS:
- [[#table-of-contents][Table of contents]]
- [[#setting-up-packages][Setting up Packages]]
- [[#setup-for-guixsd-machines][Setup for GuixSD machines]]
- [[#define-and-install-packages][Define and install packages]]
- [[#ui-settings][UI Settings]]
- [[#basic-ui][Basic UI]]
- [[#all-the-icons-diredel][all-the-icons-dired.el]]
- [[#functions][Functions]]
- [[#mu4e-setup--email-configuration][mu4e setup | Email configuration]]
- [[#custom-key-bindings][Custom key-bindings]]
- [[#org-mode-configuration][Org-mode Configuration]]
:END:
* TODO Setting up Packages
#+begin_src emacs-lisp
(require 'package)
;; recheck | Add custon snippets to my path
(add-to-list 'load-path "~/dotfiles/.emacs.d/snippets")
;; Add the entire dotfiles folder in path,
;; in case we need to load from .exwm.el
(add-to-list 'load-path "~/dotfiles")
;; Set custom.el in a different file, in user-emacs-directory
(setq custom-file (concat user-emacs-directory "/custom.el"))
#+end_src
** Setup for GuixSD machines
We check the ~$HOSTNAME~, if it's one of my devices running GuixSD.
we use ~guix-emacs-autoload-packages~ to load emacs packages installed using guix if ~t~
+ If you are running GuixSD, replace the following hostnames ~fsociety~ or ~heisenberg~ with your own ~$HOSTNAME~
#+begin_src emacs-lisp
(when (or (string= (system-name) "fsociety")
(string= (system-name) "heisenberg"))
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
(guix-emacs-autoload-packages))
#+end_src
** Define and install packages
First, we set our ~package-archives~
#+begin_src emacs-lisp
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")))
#+end_src
Load our emacs packages and activate them
#+begin_src emacs-lisp
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
#+end_src
Now we list our packages in ~my-package-list~
#+begin_src emacs-lisp
(defconst my-package-list '(org-snooze
all-the-icons
general
doom-themes
doom-modeline
counsel
which-key
ivy
ivy-rich
all-the-icons-ivy-rich
helpful
org
org-modern
visual-fill-column
rainbow-delimiters
flycheck
lsp-mode
lsp-ui
json-mode
rjsx-mode
typescript-mode
python-mode
pyvenv
company
company-box
magit
elfeed
elfeed-goodies
paredit
corfu
monkeytype
sudo-edit
exwm
exwm-mff
exwm-firefox-core
consult
alsamixer
simple-httpd
circe
eshell-syntax-highlighting
pdf-tools
org-superstar
mastodon))
#+end_src
Now we define a list to be populated at each startup.
/Contains the list of packages that need to be installed/
#+begin_src emacs-lisp
(defvar my-missing-packages '()
#+end_src
Install missing packages
#+begin_src emacs-lisp
(dolist (p my-package-list)
(when (not (package-installed-p p))
(add-to-list 'my-missing-packages p)))
(when my-missing-packages
(message "Emacs is now refreshing its package database...")
(package-refresh-contents)
;; Install the missing packages
(dolist (p my-missing-packages)
(message "Installing `%s' .." p)
(package-install p))
(setq my-missing-packages '()))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
#+end_src
* TODO UI Settings
** TODO Basic UI
** TODO all-the-icons-dired.el
* TODO Functions
* TODO mu4e setup | Email configuration
* TODO Custom key-bindings
* TODO Org-mode Configuration
|