summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/config.org147
-rw-r--r--.emacs.d/themes/materia-theme.el90
2 files changed, 237 insertions, 0 deletions
diff --git a/.emacs.d/config.org b/.emacs.d/config.org
new file mode 100644
index 0000000..9c058af
--- /dev/null
+++ b/.emacs.d/config.org
@@ -0,0 +1,147 @@
+#+TITLE: DrNuget's Emacs config
+#+AUTHOR: DrNuget
+#+STARTUP: showeverything
+
+* Disable redundant ui elements
+
+#+begin_src emacs-lisp
+
+(tool-bar-mode -1)
+(menu-bar-mode -1)
+(scroll-bar-mode -1)
+
+(setq ring-bell-function 'ignore)
+
+
+#+end_src
+
+* Enabled modes
+
+#+begin_src emacs-lisp
+
+(ido-mode 1)
+(electric-pair-mode 1)
+
+#+end_src
+
+* Line numbering
+
+#+begin_src emacs-lisp
+
+(defun line-number-hook ()
+ (setq display-line-numbers-type 'relative)
+ (display-line-numbers-mode +1)
+ )
+(add-hook 'text-mode-hook 'line-number-hook)
+(add-hook 'prog-mode-hook 'line-number-hook)
+
+#+end_src
+
+* Indentation
+
+#+begin_src emacs-lisp
+
+(setq-default indent-tabs-mode t)
+(setq-default tab-width 4)
+(setq indent-line-function 'insert-tab)
+
+#+end_src
+
+* Autopairs
+
+#+begin_src emacs-lisp
+
+(setq electric-pair-pairs
+ '(
+ (?\" . ?\")
+ (?\{ . ?\})
+ (?\( . ?\))
+ (?\[ . ?\])
+ (?\' . ?\')
+ ))
+
+#+end_src
+
+* MELPA
+
+#+begin_src emacs-lisp
+
+(require 'package)
+(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
+;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
+;; and `package-pinned-packages`. Most users will not need or want to do this.
+;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
+(package-initialize)
+
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(custom-safe-themes
+ '("f222c303b514c79fb79c3907a34102f888d6b473a4367c6366a9f10142bf0297"
+ "cb86bb04d8c43cb305fa8456e5ebbf278a53a828cf5a1584b25775bf6e3e0c05"
+ "a3ca3e616433bea2d6060672701f12caefb8aff9cfdb20923fbbec8efb4e8024"
+ "2eda8a24f66e6a1a4ebe8445c3bdcc2edb521234c475dabe1e037867a7650094"
+ "85af9fd7eabcbf051ddbcdfd13c8874e3e8483e879614a56ae6f5c190517a069"
+ default))
+ '(package-selected-packages '(## org-modern power-mode tree-sitter vterm)))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
+
+#+end_src
+
+* VTerm
+
+#+begin_src emacs-lisp
+
+(use-package vterm
+ :ensure t)
+
+#+end_src
+
+* Load custom theme
+
+#+begin_src emacs-lisp
+
+(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
+(load-theme 'materia :no-confirm)
+
+(setq font-lock-maximum-decoration t)
+(setq inhibit-startup-screen t)
+
+#+end_src
+
+* Settings to make Emacs look more like the terminal
+
+#+begin_src emacs-lisp
+
+(modify-all-frames-parameters '((alpha-background . 80)))
+(set-frame-font "Hack-9" nil t)
+
+(setq-default line-spacing 0)
+
+#+end_src
+
+
+* Tree sitter settings
+
+#+begin_src emacs-lisp
+
+(global-tree-sitter-mode)
+
+#+end_src
+
+* ORG Mode
+
+#+begin_src emacs-lisp
+
+(use-package org)
+
+(setq org-hide-emphasis-markers t)
+
+#+end_src
diff --git a/.emacs.d/themes/materia-theme.el b/.emacs.d/themes/materia-theme.el
new file mode 100644
index 0000000..d59c043
--- /dev/null
+++ b/.emacs.d/themes/materia-theme.el
@@ -0,0 +1,90 @@
+(deftheme materia "Materia/Monokai Dark")
+(defun materia--face (name &rest args)
+ (list name `((t, args))))
+
+(let ((bg "#121212")
+ (fg "#dfdfdf")
+ (black "#474747")
+ (red "#f44336")
+ (green "#4caf50")
+ (yellow "#ff9800")
+ (blue "#1a73e8")
+ (purple "#9c27b0")
+ (cyan "#0097a7")
+ (white "#ffffff")
+
+ (monokai-dark2 "#19181a")
+ (monokai-dark1 "#221f22")
+ (monokai-accent1 "#ff6188") ;; Red
+ (monokai-accent2 "#fc9867") ;; Light orange
+ (monokai-accent3 "#ffd866") ;; Yellow
+ (monokai-accent4 "#a9dc76") ;; Green
+ (monokai-accent5 "#78dce8") ;; Light blue
+ (monokai-accent6 "#ab9df2") ;; Light purple
+ (monokai-dimmed1 "#c1c0c0")
+ (monokai-dimmed2 "#939293")
+ (monokai-dimmed3 "#727072")
+ (monokai-dimmed4 "#5b595c")
+ (monokai-dimmed5 "#403e41")
+ )
+
+(custom-theme-set-faces 'materia
+ (materia--face 'default :background bg :foreground fg)
+ (materia--face 'vertical-border :inherit 'default)
+ (materia--face 'fringe :inherit 'default)
+ (materia--face 'cursor :inherit 'default)
+ (materia--face 'bold :inherit 'default :bold t)
+ (materia--face 'italic :inherit 'default)
+ (materia--face 'bold-italic :inherit 'default :bold t)
+ (materia--face 'region :foreground bg :background fg)
+ (materia--face 'underline :inherit 'default)
+ (materia--face 'custom-face-tag :inherit 'default)
+ (materia--face 'custom-state :inherit 'default)
+
+ ;; ORG Mode
+ (materia--face 'org-level-1 :foreground monokai-accent1)
+ (materia--face 'org-level-2 :foreground monokai-accent2)
+ (materia--face 'org-level-3 :foreground monokai-accent3)
+ (materia--face 'org-level-4 :foreground monokai-accent4)
+ (materia--face 'org-level-5 :foreground monokai-accent5)
+ (materia--face 'org-level-6 :foreground monokai-accent6)
+ ;; (materia--face 'org-block :foreground fg :background black)
+
+ ;; Mode line
+ (materia--face 'mode-line :background cyan :foreground white)
+ (materia--face 'mode-line-inactive :bacground black :foreground white)
+
+ ;; Line numbers
+ (materia--face 'line-number :background bg :foreground white)
+
+ ;; Syntax highlighting
+ (materia--face 'font-lock-comment-face :background bg :foreground monokai-dimmed2)
+ (materia--face 'font-lock-keyword-face :background bg :foreground monokai-accent1)
+ (materia--face 'font-lock-string-face :background bg :foreground monokai-accent3)
+ (materia--face 'font-lock-bracket-face :background bg :foreground monokai-accent1)
+ (materia--face 'font-lock-type-face :background bg :foreground monokai-accent5)
+ (materia--face 'font-lock-function-name-face :background bg :foreground monokai-accent4)
+ (materia--face 'font-lock-operator-face :background bg :foreground monokai-accent1)
+ (materia--face 'font-lock-variable-name-face :background bg :foreground monokai-accent2)
+ (materia--face 'font-lock-builtin-face :background bg :foreground monokai-accent1)
+ (materia--face 'font-lock-number-face :background bg :foreground monokai-accent6)
+
+ ;; VTerm colors
+ (materia--face 'vterm-color-white :background white :foreground white)
+ (materia--face 'vterm-color-black :background black :foreground black)
+ (materia--face 'vterm-color-red :background red :foreground red)
+ (materia--face 'vterm-color-green :background green :foreground green)
+ (materia--face 'vterm-color-yellow :background yellow :foreground yellow)
+ (materia--face 'vterm-color-blue :background blue :foreground blue)
+ (materia--face 'vterm-color-magenta :background purple :foreground purple)
+ (materia--face 'vterm-color-cyan :background cyan :foreground cyan)
+
+ (materia--face 'vterm-color-bright-black :background black :foreground black)
+ (materia--face 'vterm-color-bright-red :background red :foreground red)
+ (materia--face 'vterm-color-bright-green :background green :foreground green)
+ (materia--face 'vterm-color-bright-yellow :background yellow :foreground yellow)
+ (materia--face 'vterm-color-bright-blue :background blue :foreground blue)
+ (materia--face 'vterm-color-bright-magenta :background purple :foreground purple)
+ (materia--face 'vterm-color-bright-cyan :background cyan :foreground cyan)
+ ))
+(provide-theme 'materia)