Some changes of things

This commit is contained in:
Chris Cochrun 2021-08-14 09:39:21 -05:00
parent 178638f314
commit f562775f5c
2 changed files with 131 additions and 96 deletions

150
init.el
View file

@ -2,9 +2,9 @@
(defun chris/display-startup-time ()
(message "Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done))
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done))
(add-hook 'emacs-startup-hook #'chris/display-startup-time)
(setq inhibit-startup-message t)
@ -48,7 +48,7 @@
(with-selected-frame frame
(chris/set-font-faces)
(chris/set-transparency)))
(chris/set-font-faces))
(chris/set-font-faces))
(chris/set-transparency))
(setq display-line-numbers-type 'relative)
@ -65,7 +65,7 @@
;; ...especially on linux
(setq x-gtk-use-system-tooltips nil)
;; Favor vertical splits over horizontal ones. Screens are usually wide.
;; Favor vertical splits over horizontal ones. Screens are usually wide.
(setq split-width-threshold 160
split-height-threshold nil)
@ -99,8 +99,8 @@
(straight-use-package 'use-package)
(setq use-package-verbose t)
(use-package command-log-mode
:commands command-log-mode)
(use-package command-log-mode
:commands command-log-mode)
(use-package all-the-icons)
@ -294,19 +294,19 @@
;; We need to fix selectrums minibuffer handling for Emacs 28
(defun selectrum--set-window-height (window &optional height)
"Set window height of WINDOW to HEIGHT pixel.
"Set window height of WINDOW to HEIGHT pixel.
If HEIGHT is not given WINDOW will be updated to fit its content
vertically."
(let* ((lines (length
(split-string
(overlay-get selectrum--candidates-overlay 'after-string)
"\n" t)))
(dheight (or height
(* lines selectrum--line-height)))
(wheight (window-pixel-height window))
(window-resize-pixelwise t))
(window-resize
window (- dheight wheight) nil nil 'pixelwise)))
(let* ((lines (length
(split-string
(overlay-get selectrum--candidates-overlay 'after-string)
"\n" t)))
(dheight (or height
(* lines selectrum--line-height)))
(wheight (window-pixel-height window))
(window-resize-pixelwise t))
(window-resize
window (- dheight wheight) nil nil 'pixelwise)))
:general
@ -359,7 +359,9 @@ vertically."
;; Prefer richer, more heavy, annotations over the lighter default variant.
(setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
:after selectrum)
:after selectrum
:config
(setq marginalia--cache-size 60000))
(use-package company
:config
@ -416,6 +418,10 @@ vertically."
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("*org-roam*"
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("\\*elfeed-entry\\*"
(display-buffer-in-side-window)
(side . bottom)
@ -483,7 +489,7 @@ vertically."
(use-package friar
:straight (:host github :repo "warreq/friar" :branch "master"
:files (:defaults "*.lua" "*.fnl"))
:files (:defaults "*.lua" "*.fnl"))
:after fennel-mode)
(use-package yaml-mode
@ -819,26 +825,24 @@ vertically."
:after org
:init
(setq org-super-agenda-groups '((:name "Today"
:time-grid t
:scheduled today)
:time-grid t
:scheduled today)
(:name "Due Today"
:deadline today)
:deadline today)
(:name "Important"
:priority "A")
:priority "A")
(:name "Overdue"
:time-grid t
:scheduled today)
:time-grid t
:scheduled today)
(:name "Due soon"
:deadline future)))
:deadline future)))
:config
(org-super-agenda-mode)
(setq org-super-agenda-header-map nil))
(use-package org-roam
:after org
;; :ensure t
:hook
(after-init . org-roam-mode)
:ensure t
:config
(setq org-roam-directory "~/org"
org-roam-buffer-width 0.25
@ -868,27 +872,28 @@ vertically."
:immediate-finish t
:file-name "%<%Y-%m-%d>-bib"
:head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
(org-roam-setup)
(setq org-roam-v2-ack t)
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"nf" '(org-roam-find-file :which-key "org roam ff")
"nr" 'org-roam
"ni" 'org-roam-insert))
"nf" '(org-roam-node-find :which-key "org roam ff")
"nr" 'org-roam-buffer-toggle
"ni" 'org-roam-node-insert
"nc" 'org-roam-capture
"njt" 'org-roam-dailies-capture-today
"ng" 'org-roam-graph))
(use-package org-roam-server
(use-package websocket)
(use-package org-roam-ui
:straight (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out"))
:after org-roam
:config
(setq org-roam-server-host "127.0.0.1"
org-roam-server-port 8080
org-roam-server-export-inline-images t
org-roam-server-authenticate nil
org-roam-server-serve-files t
org-roam-server-network-label-truncate t
org-roam-server-network-label-truncate-length 60
org-roam-server-network-label-wrap-length 20)
:after org-roam)
(add-hook 'org-roam-mode-hook org-roam-server-mode t)
(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 t))
(use-package org-superstar
:after org
@ -1336,20 +1341,18 @@ If on a:
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
(setq eshell-command-aliases-list
'(("ls" "exa $1")
("la" "exa -la $1")
("q" "exit")
("f" "find-file $1")
("ff" "find-file $1")
("d" "dired $1")
("bd" "eshell-up $1")
("rg" "rg --color=always $*")
("ll" "ls -lah $*")
("gg" "magit-status")
("clear" "clear-scrollback")
("!c" "eshell-previous-input 2")
("yay" "paru $1")
("yeet" "paru -Rns $1")))
'(("q" "exit")
("f" "find-file $1")
("ff" "find-file $1")
("d" "dired $1")
("bd" "eshell-up $1")
("rg" "rg --color=always $*")
("ll" "ls -lah $*")
("gg" "magit-status")
("clear" "clear-scrollback")
("!c" "eshell-previous-input 2")
("yay" "paru $1")
("yeet" "paru -Rns $1")))
:general
(chris/leader-keys
@ -1364,8 +1367,8 @@ If on a:
(use-package pdf-tools
:straight (:host github
:repo "flatwhatson/pdf-tools"
:branch "fix-macros")
:repo "flatwhatson/pdf-tools"
:branch "fix-macros")
:defer 1
:config
(pdf-tools-install)
@ -1467,6 +1470,7 @@ interfere with the default `bongo-playlist-buffer'."
:matcher '(("http:" "https:" "lbry:") . t))
(setq bongo-enabled-backends '(mpv)
bongo-mpv-extra-arguments '("--profile=fast")
bongo-track-mark-icon-file-name "track-mark-icon.png")
(defun chris/bongo-mark-line-forward ()
@ -1524,11 +1528,11 @@ interfere with the default `bongo-playlist-buffer'."
transmission-files-mode
transmission-info-mode
transmission-peers-mode)))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"ot" 'transmission))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"ot" 'transmission))
(use-package auth-source-pass
:defer 1
@ -1549,6 +1553,20 @@ interfere with the default `bongo-playlist-buffer'."
(chris/leader-keys
"st" 'password-store-otp-token-copy))
(use-package plz
:straight (plz :type git :host github :repo "alphapapa/plz.el"))
(use-package ement
:straight (ement :type git :host github :repo "alphapapa/ement.el")
:config
(setq ement-room-images t)
:general
(general-def 'normal ement-room-mode-map
"q" 'bury-buffer
"RET" 'ement-room-send-message)
(chris/leader-keys
"oM" 'ement-list-rooms))
(use-package activity-watch-mode
:init
(if (string-equal (system-name) "syl")