blob: 319f9eac0dea07680217f1fbcf226c5ff90816c0 (
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
|
#+TITLE: Emacs Configuration
#+PROPERTY: header-args :tangle test.el
#+auto_tangle: t
* 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 ~$HOSTNAME~ if it's one of my devices running GuixSD, if ~t~
we use ~guix-emacs-autoload-packages~ to load emacs packages installed using guix
/If you are running guix, change the following hostnames ~fsociety~ or ~heisenberg~ to your own/
#+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 Function
* TODO email-module
* TODO keys.el
* TODO all-the-icons-dired.el
* TODO org-config
* UI Settings
** Basic UI
|