2023-09-07 18:48:10 +04:00
|
|
|
#+title Sakomacs configuration
|
|
|
|
#+PROPERTY: header-args:emacs-lisp :tangle ./init-new.el
|
|
|
|
|
|
|
|
* Emacs from scratch
|
2023-09-07 22:22:28 +04:00
|
|
|
where we are right now https://youtu.be/kkqVTDbfYp4?t=2795
|
|
|
|
** TODO move init.el to here
|
2023-09-07 18:48:10 +04:00
|
|
|
|
|
|
|
* Usage
|
|
|
|
org-bable-tangle
|
|
|
|
|
|
|
|
* ui configuration
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; UI/UX
|
|
|
|
(setq inhibit-startup-message t)
|
|
|
|
;; make it look like neovim a little
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(tooltip-mode -1)
|
|
|
|
(set-fringe-mode 10)
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
;; Line Numbers
|
|
|
|
(column-number-mode)
|
|
|
|
(global-display-line-numbers-mode t)
|
|
|
|
;; disable line numbers on some modes
|
|
|
|
(dolist (mode '(org-mode-hook
|
|
|
|
term-mode-hook
|
|
|
|
eshell-mode-hook))
|
|
|
|
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
|
|
|
;; Bell
|
|
|
|
(setq visible-bell t)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* Fonts
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; Font
|
|
|
|
(set-face-attribute `default nil :font "JetBrains Mono" :height 125)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
2023-09-07 22:22:28 +04:00
|
|
|
* Package setup
|
2023-09-07 18:48:10 +04:00
|
|
|
#+begin_src emacs-lisp
|
2023-09-07 22:22:28 +04:00
|
|
|
;; Package related stuqff
|
|
|
|
(require `package)
|
|
|
|
|
|
|
|
(setq package-archives `(("mepla" . "https://melpa.org/packages/")
|
|
|
|
("org" . "https://orgmode.org/elpa/")
|
|
|
|
("elpa" . "https://elpa.gnu.org/packages/")))
|
|
|
|
|
|
|
|
(package-initialize)
|
|
|
|
(unless package-archive-contents
|
|
|
|
(package-refresh-contents))
|
|
|
|
|
|
|
|
;; Init package for non-linux
|
|
|
|
(unless (package-installed-p `use-package)
|
|
|
|
(package-install `use-package))
|
|
|
|
|
|
|
|
(require 'use-package)
|
|
|
|
(setq use-package-always-ensure t)
|
|
|
|
#+end_src
|
|
|
|
** Packages
|
|
|
|
|
|
|
|
* Org Mode Configuration Setup
|
|
|
|
** Babel Languages
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(org-babel-do-load-languages
|
|
|
|
'org-babel-load-languages
|
|
|
|
'((emacs-lisp . t)
|
|
|
|
(python . t)))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Auto-tangle Configuration
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(defun sakomacs/org-babel-tangle-config ()
|
|
|
|
(when (string-equal (buffer-file-name)
|
|
|
|
(expand-file-name "~/nixos/config/emacs/emacs.org"))
|
|
|
|
(let ((org-confirm-babel-evaluate nil))
|
|
|
|
(org-babel-tangle)))
|
|
|
|
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'sakomacs/org-babel-tangle-config))))
|
2023-09-07 18:48:10 +04:00
|
|
|
#+end_src
|