Untitled

 avatar
user_8550978567
plain_text
2 years ago
8.8 kB
4
Indexable
Never
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
Quit
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


;;init.el


(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)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(require 'org)
(org-babel-load-file
(expand-file-name "init_bkk.org"
user-emacs-directory))
(defun package-reinstall-all-activated-packages ()
"Refresh and reinstall all activated packages."
(interactive)
(package-refresh-contents)
(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)))))






;;init_bkk.org

#+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/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(require 'use-package)
(setq use-package-always-ensure t)                     
(column-number-mode)
(global-display-line-numbers-mode  
(setq  display-line-numbers-type 'relative))
(dolist (mode '(text-mode-hook
prog-mode-hook
conf-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
:diminish
: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))
:config
(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))
(custom-set-variables
'(custom-safe-themes
'("266ecb1511fa3513ed7992e6cd461756a895dcc5fef2d378f165fed1c894a78c" default))
'(package-selected-packages
'(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))
(custom-set-faces
)
(use-package which-key
:init (which-key-mode)
:diminish 'which-key-mode
:config
(setq which-key-idle-delay 0))
(use-package ivy-rich
:init
(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
:config
(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")
(rune/leader-keys
"t" '(:ignore t :which-key "toggles")))
(use-package evil
:init
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-want-fine-undo t)
:config
(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
:config
(evil-collection-init))
(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))
(rune/leader-keys
"ts" '(hydra-text-scale/body :which-key "scale text"))
(use-package projectile
:diminish projectile-mode
:config (projectile-mode)
:custom ((projectile-completion-system 'ivy))
:bind-keymap
("C-c p" . projectile-command-map)
:init
(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
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
(defun bkk/org-mode-setup ()
(org-indent-mode)
(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
:config
(setq org-ellipsis " ▾")
(bkk/org-font-setup))
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
(use-package org-roam
:ensure t
:init
(setq org-roam-v2-ack t)
:custom
(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))
:config
(org-roam-setup))
(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
:straight
(:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
:after org-roam
:config
(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
:config
(setq elfeed-db-directory (expand-file-name "elfeed" user-emacs-directory)
elfeed-show-entry-switch 'display-buffer)
:bind
("C-x w" . elfeed )) 
(use-package elfeed-org
:ensure t
:config
(setq rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org")))
(elfeed-org)
(use-package elfeed-goodies
:ensure t
:config
(elfeed-goodies/setup))
(defun toggle-transparency ()
(interactive)
(let ((alpha (frame-parameter nil 'alpha)))
(set-frame-parameter
nil 'alpha
(if (eql (cond ((numberp alpha) alpha)
((numberp (cdr alpha)) (cdr alpha))
((numberp (cadr alpha)) (cadr alpha)))
100)
'(65 . 65) '(100 . 100)))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
(toggle-transparency)
(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)))
#+END_SRC
#+RESULTS:
: t