summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el60
1 files changed, 40 insertions, 20 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 96cbf58..3f4d459 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -42,7 +42,7 @@
sentence-end-double-space t
default-input-method "bulgarian-phonetic"
;; fix emacs hangs
- gc-cons-threshold 2000000)
+ gc-cons-threshold 5000000)
(define-key global-map (kbd "M-<backspace>") 'backward-kill-sexp)
(define-key global-map (kbd "C-c L") 'display-line-numbers-mode)
@@ -81,10 +81,9 @@
;; Autoinsert
(auto-insert-mode 1)
-(define-auto-insert
- '("\\.sh\\'" . "Bash skeleton")
- '("Description:"
- "#!/bin/bash\n\n"))
+
+(setq auto-insert-alist '((python-mode . "python.template"))
+ auto-insert-directory (locate-user-emacs-file "insert"))
(add-to-list 'completion-styles 'initials t)
@@ -108,7 +107,6 @@
(setf use-package-enable-imenu-support t)
;; Install straight.el
-
(defvar bootstrap-version)
(let ((bootstrap-file
@@ -151,22 +149,31 @@
(add-hook 'enable-theme-functions #'theme-invisible-dividers)
;;;; Theming ;;;;
-
(setf inhibit-startup-message t
initial-scratch-message nil)
(blink-cursor-mode -1)
-(menu-bar--visual-line-mode-enable)
-(global-visual-line-mode 1)
+(global-visual-line-mode 0)
-(setf visible-bell t)
+(setf visible-bell nil
+ display-line-numbers-type 'relative)
(column-number-mode)
(global-display-line-numbers-mode 1)
-(menu-bar--display-line-numbers-mode-relative)
;; Transparency
-(add-to-list 'default-frame-alist '(alpha-background . 90))
+(add-to-list 'default-frame-alist '(alpha-background . 85))
+
+;; theming
+(global-hl-line-mode)
+
+(defun thanos/terminal-theming ()
+ "Customize theming when laucning Emacs as TUI."
+ (unless (display-graphic-p (selected-frame))
+ (set-face-background 'default "unspecified-bg" (selected-frame))
+ (global-hl-line-mode 0)))
+
+(add-hook 'window-setup-hook 'thanos/terminal-theming)
(when (equal is-phone nil)
(scroll-bar-mode -1)
@@ -175,7 +182,7 @@
(tool-bar-mode -1)
(tooltip-mode -1)
(menu-bar-mode -1)
-(global-hl-line-mode)
+
(use-package org
:ensure t
@@ -241,7 +248,7 @@
(setf org-roam-capture-templates
'(("d" "default" plain
"%?"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+startup: overview\n")
:unnarrowed t)
("p" "MUS" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: MUS")
@@ -255,6 +262,11 @@
"\n* Daily Notes\n\n* Goals\n+ []\n\n* Extras %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n#+filetags: :journal:\n"))))
+ (defun org-roam-ref-add-book ()
+ "Insert org-link from Library."
+ (interactive)
+ (let ((book (format "file:%s" (read-file-name "Book: " (if is-zeus "/hdd/Library/" "~/Library/")))))
+ book))
(defun org-roam-sync-notes ()
"Sync org-oram notes"
@@ -301,12 +313,12 @@
modus-themes-org-blocks 'tinted-background)
;; Palette overrides
(setf modus-themes-common-palette-overrides
- '((fg-line-number-inactive "gray40")
+ '(;; (fg-line-number-inactive "gray40")
(fg-line-number-active cyan-intense)
;; (bg-main "#1d2021") ;;grubox-hard
- (bg-main "#191919") ;; 1337
+ ;; (bg-main "#191919") ;; 1337
;; (bg-main "#1d1f21") ;; tomorrow night
- ;; (bg-main "#171717") ;; badger
+ (bg-main "#171717") ;; badger
;; (overline-heading-1 gold)
(fg-heading-1 red-warmer)
;; (bg-heading-1 bg-blue-nuanced)
@@ -416,7 +428,6 @@
("https://annas-blog.org/rss.xml"
anna piracy)
("https://rss-bridge.thanosapollo.org/?action=display&bridge=CssSelectorBridge&home_page=https%3A%2F%2Fwww.theguardian.com%2Feurope&url_selector=a.dcr-lv2v9o&url_pattern=&content_selector=div.article-body-commercial-selector&content_cleanup=figure.dcr-173mewl%2C+div.dcr-ut4tvs&title_cleanup=News%2C+sport+and+opinion+from+the+Guardian%27s+Europe+edition+%7C&limit=&format=Atom" news guardian europe)
-
("https://planet.emacslife.com/atom.xml" emacs emacslife)
("https://localmonero.co/static/rss/the-monero-standard/feed.xml" monero)
("https://devonzuegel.com/feed" devon)
@@ -433,6 +444,14 @@
:config
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
+(use-package pyenv
+ :defer t)
+
+(use-package elpy
+ :ensure t
+ :init
+ (elpy-enable))
+
;; Clojure
(use-package cider
:defer t)
@@ -611,7 +630,6 @@
(eshell-syntax-highlighting-global-mode 1)
:bind (("C-c e" . eshell))
:hook ((eshell-mode . (lambda ()
- (hl-line-mode 'toggle)
(thanos/set-eshell-aliases thanos/aliases)
(display-line-numbers-mode -1)))))
@@ -801,7 +819,8 @@
(let* ((choice (completing-read "Choose an action: "
'("AUTO" "COPY PASS" "COPY USERNAME" "EDIT" "GENERATE")))
(action (pcase choice
- ("AUTO" #'(lambda (entry) (let ((user (password-store-get-field entry "user")) (pass (password-store-get entry)))
+ ("AUTO" #'(lambda (entry) (let ((user (password-store-get-field entry "user"))
+ (pass (password-store-get entry)))
(start-process-shell-command
"xdotool" nil
(format "sleep 0.3 && xdotool getactivewindow type %s && xdotool key Tab && xdotool getactivewindow type %s"
@@ -849,4 +868,5 @@
(require 'thanos-commands) ;; Misc commands
(when (or is-zeus is-hermes)
(require 'thanos-mu4e))
+
;;; init.el ends here