emacs: add more bloats

This commit is contained in:
FollieHiyuki 2021-03-03 10:45:15 +03:00
parent 40c9496e1f
commit 312c2df5fe
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
6 changed files with 115 additions and 61 deletions

View File

@ -9,9 +9,9 @@
browse-url-generic-program "qutebrowser") browse-url-generic-program "qutebrowser")
;; Font settings ;; Font settings
(setq doom-font (font-spec :family "Iosevka Nerd Font" :size 16) (setq doom-font (font-spec :family "Iosevka" :size 16)
doom-variable-pitch-font (font-spec :family "sans" :size 16) doom-variable-pitch-font (font-spec :family "sans" :size 16)
doom-big-font (font-spec :family "Iosevka Nerd Font" :size 24)) doom-big-font (font-spec :family "Iosevka" :size 24))
;;(setq inhibit-compacting-font-caches t) ;;(setq inhibit-compacting-font-caches t)
(custom-set-faces! (custom-set-faces!
'(font-lock-comment-face :slant italic) '(font-lock-comment-face :slant italic)
@ -96,11 +96,17 @@
(use-package! ivy-rich (use-package! ivy-rich
:after all-the-icons-ivy-rich) :after all-the-icons-ivy-rich)
;; Completion + lsp ;; Company
(after! company (after! company
(setq company-idle-delay 0.5 (setq company-idle-delay 0.5
company-minimum-prefix-length 2 company-minimum-prefix-length 2
company-show-numbers nil)) company-show-numbers nil))
;; lsp
(use-package! lsp-treemacs
:after treemacs
:config
(lsp-treemacs-sync-mode 1))
(setq lsp-clients-clangd-args '("-j=2" (setq lsp-clients-clangd-args '("-j=2"
"--background-index" "--background-index"
"--clang-tidy" "--clang-tidy"
@ -108,7 +114,7 @@
"--pch-storage=memory" "--pch-storage=memory"
"--header-insertion=iwyu" "--header-insertion=iwyu"
"--header-insertion-decorators")) "--header-insertion-decorators"))
;;(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls (after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
(setq lua-lsp-dir "~/.config/emacs/.local/etc/lsp/lua-language-server/" (setq lua-lsp-dir "~/.config/emacs/.local/etc/lsp/lua-language-server/"
lua-lsp-completion-call-snippet "Replace") lua-lsp-completion-call-snippet "Replace")
@ -164,6 +170,7 @@
;; Magit ;; Magit
(after! magit (after! magit
(setq magit-diff-refine-hunk 'all)) (setq magit-diff-refine-hunk 'all))
;;(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1)))
;; Here are some additional functions/macros that could help you configure Doom: ;; Here are some additional functions/macros that could help you configure Doom:
;; ;;

View File

@ -5,6 +5,7 @@
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
(defun follie/set-wallpaper () (defun follie/set-wallpaper ()
"Change the current wallpaper with feh"
(interactive) (interactive)
(start-process-shell-command (start-process-shell-command
"feh" nil "feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*")) "feh" nil "feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*"))
@ -168,6 +169,7 @@
;; xbps but with Emacs ;; xbps but with Emacs
;;(use-package! system-packages ;;(use-package! system-packages
;; :after exwm
;; :config ;; :config
;; (setq system-packages-use-sudo t)) ;; (setq system-packages-use-sudo t))
@ -175,38 +177,64 @@
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" doom-private-dir))) (setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" doom-private-dir)))
;;(add-hook! 'elfeed-search-mode-hook 'elfeed-update) ;;(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
;; playerctl status on modeline
;; (use-package! doom-modeline-now-playing
;; :after doom-modeline
;; :defer t
;; :config
;; (doom-modeline-now-playing-timer)
;; ;; Enable almost everywhere
;; (doom-modeline-def-modeline 'main
;; '(bar workspace-name window-number modals matches buffer-info remote-host buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info persp-name battery grip irc mu4e gnus github debug repl lsp minor-modes input-method indent-info buffer-encoding major-mode process vcs checker))
;; (doom-modeline-def-modeline 'special
;; '(bar window-number modals matches buffer-info buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info battery irc-buffers debug minor-modes input-method indent-info buffer-encoding major-mode process))
;; (doom-modeline-def-modeline 'project
;; '(bar window-number buffer-default-directory now-playing)
;; '(misc-info battery irc mu4e gnus github debug minor-modes input-method major-mode process))
;; (doom-modeline-def-modeline 'vcs
;; '(bar window-number modals matches buffer-info buffer-position parrot selection-info now-playing)
;; '(misc-info battery irc mu4e gnus github debug minor-modes buffer-encoding major-mode process))
;; (doom-modeline-def-modeline 'info
;; '(bar window-number buffer-info info-nodes buffer-position parrot selection-info now-playing)
;; '(misc-info buffer-encoding major-mode))
;; (doom-modeline-def-modeline 'media
;; '(bar window-number buffer-size buffer-info now-playing)
;; '(misc-info media-info major-mode process vcs))
;; (doom-modeline-def-modeline 'message
;; '(bar window-number modals matches buffer-info-simple buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info battery debug minor-modes input-method indent-info buffer-encoding major-mode))
;; (doom-modeline-def-modeline 'pdf
;; '(bar window-number matches buffer-info pdf-pages now-playing)
;; '(misc-info major-mode process vcs))
;; (doom-modeline-def-modeline 'org-src
;; '(bar window-number modals matches buffer-info-simple buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info debug lsp minor-modes input-method indent-info buffer-encoding major-mode process checker))
;; (doom-modeline-def-modeline 'timemachine
;; '(bar window-number matches git-timemachine buffer-position word-count parrot selection-info now-playing)
;; '(misc-info minor-modes indent-info buffer-encoding major-mode)))
;; Mapping for built-in mpc-mode ;; Mapping for built-in mpc-mode
(map! :leader :desc "music" "e" nil (map! :leader :desc "music" "e" nil
:leader :desc "MPC play track" :leader "e RET" #'mpc-play-at-point
"e RET" #'mpc-play-at-point :leader "e v" #'mpc-select-toggle
:leader :desc "MPC select track" :leader "e >" #'mpc-next
"e v" #'mpc-select-toggle :leader "e <" #'mpc-prev
:leader :desc "MPC next track" :leader "e f" #'mpc-seek-current
"e >" #'mpc-next :leader "e p" #'mpc-pause
:leader :desc "MPC previous track" :leader "e q" #'mpc-quit
"e <" #'mpc-prev :leader "e s" #'mpc-toggle-play
:leader :desc "MPC seek within current track" :leader "e c" #'mpc-toggle-consume
"e f" #'mpc-seek-current :leader "e 1" #'mpc-toggle-single
:leader :desc "MPC pause track" :leader "e r" #'mpc-toggle-repeat
"e p" #'mpc-pause :leader "e z" #'mpc-toggle-shuffle
:leader :desc "MPC quit" :leader "e l" #'mpc-playlist)
"e q" #'mpc-quit
:leader :desc "MPC toggle playing"
"e s" #'mpc-toggle-play
:leader :desc "MPC toggle consume"
"e c" #'mpc-toggle-consume
:leader :desc "MPC toggle single"
"e 1" #'mpc-toggle-single
:leader :desc "MPC toggle repeat"
"e r" #'mpc-toggle-repeat
:leader :desc "MPC toggle shuffle"
"e z" #'mpc-toggle-shuffle
:leader :desc "MPC show playlist"
"e l" #'mpc-playlist)
;; EMMS ;; EMMS
;; (use-package! emms ;; (use-package! emms
;; :after exwm ;; :after exwm
;; :defer t
;; :init ;; :init
;; (setq emms-seek-seconds 10) ;; (setq emms-seek-seconds 10)
;; :config ;; :config
@ -228,18 +256,12 @@
;; (add-to-list 'emms-info-functions ;; (add-to-list 'emms-info-functions
;; ;;'emms-info-mpd ;; ;;'emms-info-mpd
;; 'emms-info-exiftool) ;; 'emms-info-exiftool)
;; (map! :leader :desc "EMMS playlist" ;; (map! :leader "e a" #'emms-playlist-mode-go
;; "e a" #'emms-playlist-mode-go ;; :leader "e b" #'emms-browse-by-album
;; :leader :desc "EMMS browse by album" ;; :leader "e x" #'emms-pause
;; "e b" #'emms-browse-by-album ;; :leader "e g" #'emms-stop
;; :leader :desc "EMMS pause track" ;; :leader "e j" #'emms-previous
;; "e x" #'emms-pause ;; :leader "e k" #'emms-next))
;; :leader :desc "EMMS stop track"
;; "e g" #'emms-stop
;; :leader :desc "EMMS previous track"
;; "e j" #'emms-previous
;; :leader :desc "EMMS next track"
;; "e k" #'emms-next))
;; Truncate emms module on mode line ;; Truncate emms module on mode line
;;(use-package! emms-mode-line-cycle ;;(use-package! emms-mode-line-cycle
;; :after emms ;; :after emms
@ -263,6 +285,21 @@
(setq counsel-web-search-dynamic-update nil) (setq counsel-web-search-dynamic-update nil)
(exwm-input-set-key (kbd "s-d") #'counsel-web-search)) (exwm-input-set-key (kbd "s-d") #'counsel-web-search))
;; Elpher
(defun elpher--init-hook ()
(setq visual-fill-column-center-text t)
(font-lock-mode -1)
(visual-fill-column-mode 1))
(use-package! elpher
:defer t
:config
(setq elpher-use-tls t
elpher-auto-disengage-TLS t
elpher-connection-timeout 10
elpher-gemini-max-fill-width 80
elpher-gemini-TLS-cert-checks nil)
(add-hook 'elpher-mode-hook 'elpher--init-hook))
;; Function keys ;; Function keys
(use-package! desktop-environment (use-package! desktop-environment
:after exwm :after exwm
@ -316,7 +353,7 @@
(defun greenclip--select-item (str) (defun greenclip--select-item (str)
"Copy selected item to clipboard" "Copy selected item to clipboard"
(setq str (replace-regexp-in-string "\u00a0" "\n" str)) (setq str (replace-regexp-in-string "\u00a0" "\n" str))
;; (kill-new str) ;; (kill-new str) ;; Add the item to Emacs kill ring as well
(condition-case nil (condition-case nil
(cond (cond
((fboundp 'ns-set-pasteboard) ((fboundp 'ns-set-pasteboard)
@ -340,7 +377,7 @@
:action (lambda (str) :action (lambda (str)
(greenclip--select-item str))))) (greenclip--select-item str)))))
(defun greenclip-clear-history () (defun greenclip-clear-history ()
"Clear clipboard history cache" "Clear X clipboard history"
(interactive) (interactive)
(start-process-shell-command "greenclip" nil "pkill greenclip && greenclip clear") (start-process-shell-command "greenclip" nil "pkill greenclip && greenclip clear")
(follie/run-in-background "greenclip daemon")) (follie/run-in-background "greenclip daemon"))

View File

@ -93,9 +93,9 @@
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
(spell ; tasing you for misspelling mispelling (spell ; tasing you for misspelling mispelling
+flyspell ;;+everywhere
+hunspell +hunspell
+everywhere) +flyspell)
grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
@ -107,8 +107,11 @@
;;ein ; tame Jupyter notebooks with emacs ;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation (lookup ; navigate your code and its documentation
lsp +dictionary
;;+offline
+docsets)
(lsp +peek)
(magit +forge) ; a git porcelain for Emacs (magit +forge) ; a git porcelain for Emacs
make ; run make tasks from Emacs make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
@ -147,7 +150,7 @@
(haskell +dante) ; a language that's lazier than I am (haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; ;;idris ;
json ; At least it ain't XML (json +lsp) ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome ;;(java +meghanada) ; the poster child for carpal tunnel syndrome
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
@ -184,7 +187,7 @@
+poetry +poetry
+pyright +pyright
+cpython) +cpython)
;;qt ; the 'cutest' gui framework ever qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client rest ; Emacs as a REST client
@ -193,13 +196,15 @@
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
;;scheme ; a fully conniving family of lisps ;;scheme ; a fully conniving family of lisps
(sh +fish) ; she sells {ba,z,fi}sh shells on the C xor (sh ; she sells {ba,z,fi}sh shells on the C xor
+lsp
+fish)
;;sml ;;sml
;;solidity ; do you need a blockchain? No. ;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables? ;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance. ;;terra ; Earth and Moon in alignment for performance.
web ; the tubes web ; the tubes
yaml ; JSON, but readable (yaml +lsp) ; JSON, but readable
:email :email
(mu4e +gmail) (mu4e +gmail)

View File

@ -49,23 +49,27 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
;; Emacs is an OS
(package! exwm) (package! exwm)
(package! exwm-edit) (package! exwm-edit)
(package! desktop-environment) (package! desktop-environment)
(package! ebuku) (package! ebuku)
(package! counsel-web) (package! counsel-web)
(package! elpher)
(package! pinentry) (package! pinentry)
(package! sudoku) (package! sudoku)
;;(package! system-packages)
;;(package! emms)
;;(package! emms-mode-line-cycle)
;;(package! ivy-emms)
;;(package! edwina)
;; Improvements
(package! vimrc-mode) (package! vimrc-mode)
(package! gemini-mode)
(package! lsp-treemacs)
(package! magit-delta) (package! magit-delta)
(package! all-the-icons-ivy-rich) (package! all-the-icons-ivy-rich)
(package! nerd-fonts (package! nerd-fonts
:recipe (:host github :repo "FollieHiyuki/nerd-fonts.el")) :recipe (:host github :repo "FollieHiyuki/nerd-fonts.el"))
;;(package! 2048-game)
;;(package! org-ql)
;;(package! org-wild-notifier)
;;(package! system-packages)
;;(package! emms)
;;(package! ivy-emms)
;;(package! emms-mode-line-cycle)
;;(package! doom-modeline-now-playing)
;;(package! edwina)

View File

@ -29,7 +29,7 @@
# the top and down respectively. # the top and down respectively.
# The width can be negative. In this case the actual width is the # The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option. # screen width minus the width defined in within the geometry option.
geometry = "0x5-5+30" geometry = "300x5-5+30"
# Turn on the progess bar # Turn on the progess bar
progress_bar = true progress_bar = true

View File

@ -2,6 +2,7 @@ font=Sarasa Fixed J 12
border-size=4 border-size=4
border-radius=10 border-radius=10
margin=10,10,10 margin=10,10,10
width=300
max-visible=10 max-visible=10
default-timeout=5000 default-timeout=5000
ignore-timeout=1 ignore-timeout=1