2 years ago
8.8 kB
Loading /home/su/.emacs.d/init_bkk.el (source)...
Loading which-key...done
Cannot insert ("N" "Forge" forge-dispatch) into magit-dispatch; o not found
Setting ‘forge-add-default-bindings’ to nil in ‘evil-collection-forge-setup’.
To suppress this message you can set this variable to nil in your init.el file.
Loading /home/su/.emacs.d/init_bkk.el (source)...done
Loaded /home/su/.emacs.d/init_bkk.el
Turning on magit-auto-revert-mode...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Emacs ready in 2.47 seconds with 43 garbage collections.
Package cl is deprecated
Mark set
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help


(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
'silent 'inhibit-cookies)
(goto-char (point-max))
(load bootstrap-file nil 'nomessage))
(require 'org)
(expand-file-name "init_bkk.org"
(defun package-reinstall-all-activated-packages ()
"Refresh and reinstall all activated packages."
(dolist (package-name package-activated-list)
(when (package-installed-p package-name)
(unless (ignore-errors                   
(package-reinstall package-name))
(warn "Package %s failed to reinstall" package-name)))))


#+BEGIN_SRC emacs-lisp
(setq inhibit-startup-message t)
(scroll-bar-mode -1)        
(tool-bar-mode -1)          
(tooltip-mode -1)           
(menu-bar-mode -1)         
(set-fringe-mode 10)        
(setq visible-bell t)
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(unless package-archive-contents
(require 'use-package)
(setq use-package-always-ensure t)                     
(setq  display-line-numbers-type 'relative))
(dolist (mode '(text-mode-hook
(add-hook mode (lambda () (display-line-numbers-mode 1))))
(dolist (mode '(org-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
(use-package command-log-mode)
(setq org-src-fontify-natively t
org-src-tab-acts-natively t
org-confirm-babel-evaluate nil
org-edit-src-content-indentation 0)
(use-package ivy
:bind (("C-s" . swiper)
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
:map ivy-minibuffer-map
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
(ivy-mode 1))
(setq evil-undo-system 'undo-tree)
(use-package all-the-icons)
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1)
:custom ((doom-modeline-height 15))
:config  (setq doom-modeline-icon t))
(use-package doom-themes)
:init(load-theme 'doom-ir-black t)
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
'("266ecb1511fa3513ed7992e6cd461756a895dcc5fef2d378f165fed1c894a78c" default))
'(general doom-themes helpful counsel ivy-rich which-key rainbow-delimiters use-package no-littering ivy doom-modeline command-log-mode auto-package-update))
'(which-key-mode t))
(use-package which-key
:init (which-key-mode)
:diminish 'which-key-mode
(setq which-key-idle-delay 0))
(use-package ivy-rich
(ivy-rich-mode 1))
(use-package counsel
:bind (("M-x" . counsel-M-x)
("C-M-b" . counsel-ibuffer)
("C-x C-f" . counsel-find-file)
:map minibuffer-local-map
("C-r" . 'counsel-minibueffer-history)))
(use-package general
(general-create-definer rune/leader-keys
:keymaps '(normal insert visual emacs)
:prefix "SPC"
:global-prefix "C-SPC")
(general-create-definer bkk/ctrl-c-keys
:prefix "C-c")
"t" '(:ignore t :which-key "toggles")))
(use-package evil
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-want-fine-undo t)
(evil-mode 1) 
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state) 
(define-key evil-insert-state-map (kbd "C-m") 'delete-char)
(define-key evil-insert-state-map (kbd "RET") 'newline)
(define-key evil-normal-state-map (kbd "u")  'undo-only)
(define-key evil-normal-state-map (kbd "C-r") 'evil-redo)
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
(evil-global-set-key 'motion "k" 'evil-previous-visual-line))
(use-package evil-collection 
:after evil
(use-package hydra)
(defhydra hydra-text-scale (:timeout 4)
"scale text"
("j" text-scale-increase "in")
("k" text-scale-decrease "out")
("f" nil "finished" :exit t))
"ts" '(hydra-text-scale/body :which-key "scale text"))
(use-package projectile
:diminish projectile-mode
:config (projectile-mode)
:custom ((projectile-completion-system 'ivy))
("C-c p" . projectile-command-map)
(when (file-directory-p "~/git/")
(setq projectile-project-search-path '("~/git/")))
(setq projectile-switch-project-action #'projectile-dired))
(use-package counsel-projectile
:config (counsel-projectile-mode))
(use-package forge)
(use-package magit
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
(defun bkk/org-mode-setup ()
(message (emacs-init-time))
(variable-pitch-mode 1)
(visual-line-mode 1))
(defun bkk/org-font-setup ()
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.1)
(org-level-6 . 1.1)
(org-level-7 . 1.1)
(org-level-8 . 1.1)))
(set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)))
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil   :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-table nil   :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
(use-package org
:hook (org-mode . bkk/org-mode-setup)
:pin manual
(setq org-ellipsis " ▾")
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
(use-package org-roam
:ensure t
(setq org-roam-v2-ack t)
(org-roam-directory "~/git/orgfiles/roam")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert))
(use-package websocket
:after org-roam
:straight (:host github :repo "ahyatt/emacs-websocket" :branch "main")
(use-package simple-httpd
:after org-roam
(use-package org-roam-ui
(:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
:after org-roam
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start nil))
(use-package elfeed
:ensure t
(setq elfeed-db-directory (expand-file-name "elfeed" user-emacs-directory)
elfeed-show-entry-switch 'display-buffer)
("C-x w" . elfeed )) 
(use-package elfeed-org
:ensure t
(setq rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org")))
(use-package elfeed-goodies
:ensure t
(defun toggle-transparency ()
(let ((alpha (frame-parameter nil 'alpha)))
nil 'alpha
(if (eql (cond ((numberp alpha) alpha)
((numberp (cdr alpha)) (cdr alpha))
((numberp (cadr alpha)) (cadr alpha)))
'(65 . 65) '(100 . 100)))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
(add-hook 'emacs-startup-hook(lambda ()(message "Emacs ready in %s with %d garbage collections."(format "%.2f seconds"(float-time(time-subtract after-init-time before-init-time)))gcs-done)))
: t