about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2020-09-25 08:25:53 -0500
committerCase Duckworth2020-09-25 08:25:53 -0500
commit8461004ea40e93da733fbfc9a8298e5186f9253e (patch)
treedec8a7d905fa22ce8cbeb39acf2216d07f16e9eb /init.el
parentAdd slime & begin GNUS (diff)
downloademacs-8461004ea40e93da733fbfc9a8298e5186f9253e.tar.gz
emacs-8461004ea40e93da733fbfc9a8298e5186f9253e.zip
Remove exwm and add fonts and, apparently, whitespace??
Diffstat (limited to 'init.el')
-rw-r--r--init.el270
1 files changed, 163 insertions, 107 deletions
diff --git a/init.el b/init.el index b5d9a94..6010297 100644 --- a/init.el +++ b/init.el
@@ -6,6 +6,7 @@
6;; which pointed out that I could use `outline-mode' (or in my case, 6;; which pointed out that I could use `outline-mode' (or in my case,
7;; `outshine') to fold and navigate a pure-elisp `init.el'. So that's 7;; `outshine') to fold and navigate a pure-elisp `init.el'. So that's
8;; what I'm doing. 8;; what I'm doing.
9
9;;; Basic emacs config & built-in packages 10;;; Basic emacs config & built-in packages
10;;;; /Really/ basic emacs config 11;;;; /Really/ basic emacs config
11;; I /did/ use `better-defaults', but it turns out that that package 12;; I /did/ use `better-defaults', but it turns out that that package
@@ -88,10 +89,6 @@
88 initial-buffer-choice t 89 initial-buffer-choice t
89 initial-scratch-message nil) 90 initial-scratch-message nil)
90 91
91 ;; When at larry, fullscreen emacs.
92 (when *acdw/at-larry*
93 (add-to-list 'default-frame-alist '(fullscreen . maximized)))
94
95 ;; set up the cursor 92 ;; set up the cursor
96 (blink-cursor-mode 0) 93 (blink-cursor-mode 0)
97 (setq-default cursor-type 'bar 94 (setq-default cursor-type 'bar
@@ -196,6 +193,7 @@
196 (add-to-list 'recentf-exclude no-littering-var-directory) 193 (add-to-list 'recentf-exclude no-littering-var-directory)
197 (add-to-list 'recentf-exclude no-littering-etc-directory) 194 (add-to-list 'recentf-exclude no-littering-etc-directory)
198 (recentf-mode)) 195 (recentf-mode))
196
199;;;; Save places in files 197;;;; Save places in files
200(use-package saveplace 198(use-package saveplace
201 :init 199 :init
@@ -225,6 +223,7 @@
225 223
226;;; General-ish Packages 224;;; General-ish Packages
227;;;; General improvements 225;;;; General improvements
226
228;;;;; Diminish TODO: is this necessary? 227;;;;; Diminish TODO: is this necessary?
229(use-package diminish) 228(use-package diminish)
230 229
@@ -259,7 +258,7 @@
259 ("<S-iso-lefttab>" . outshine-cycle-buffer) 258 ("<S-iso-lefttab>" . outshine-cycle-buffer)
260 ("<backtab>" . outshine-cycle-buffer)) 259 ("<backtab>" . outshine-cycle-buffer))
261 :hook 260 :hook
262 (emacs-lisp-mode-hook: . outshine-mode)) 261 (emacs-lisp-mode-hook . outshine-mode))
263 262
264;;;;; Item selection & narrowing 263;;;;; Item selection & narrowing
265(use-package selectrum 264(use-package selectrum
@@ -290,18 +289,54 @@
290 ("s-o" . switch-window)) 289 ("s-o" . switch-window))
291 290
292;;;; Theming, looks, fonts 291;;;; Theming, looks, fonts
292;;;;; Fonts
293;; I'm doing these outside of any 'package' b/c ... idk. I want to?
294(let* ((fixed-pitch-sans-serif-family
295 (cond ((x-list-fonts "Fira Code") '(:family "Fira Code"))
296 ((x-list-fonts "Consolas") '(:family "Consolas"))
297 ((x-list-fonts "DejaVu Sans Mono") '(:family "DejaVu Sans Mono"))
298 ((x-list-fonts "Fixed") '(:family "Fixed"))
299 (nil (warn "Can't find a good fixed pitch sans-serif font."))))
300 (fixed-pitch-serif-family
301 (cond ((x-list-fonts "Go Mono") '(:family "Go Mono"))
302 ((x-list-fonts "Courier Prime") '(:family "Courier Prime"))
303 ((x-list-fonts "Courier New") '(:family "Courier New"))
304 ((x-list-fonts "Courier") '(:family "Courier"))
305 (nil (warn "Can't find a good fixed pitch serif font."))))
306 (variable-pitch-sans-serif-family
307 (cond ((x-list-fonts "DejaVu Sans") '(:family "DejaVu Sans"))
308 ((x-list-fonts "Go") '(:family "Go"))
309 ((x-list-fonts "Arial") '(:family "Arial"))
310 (nil (warn "Cant't find a good variable pitch sans-serif font."))))
311 (variable-pitch-serif-family
312 (cond ((x-list-fonts "DejaVu Serif") '(:family "DejaVu Serif"))
313 ((x-list-fonts "Georgia") '(:family "Georgia"))
314 ((x-list-fonts "Times New Roman") '(:family "Times New Roman"))
315 ((x-list-fonts "Times") '(:family "Times"))
316 (nil (warn "Can't find a good variable pitch serif font."))))
317
318 (fixed-pitch-family fixed-pitch-sans-serif-family)
319 (variable-pitch-family variable-pitch-serif-family)
320 (default-family fixed-pitch-family))
321 (custom-theme-set-faces
322 'user
323 `(fixed-pitch ((t (,@fixed-pitch-family))))
324 `(fixed-pitch-serif ((t (,@fixed-pitch-serif-family))))
325 `(variable-pitch ((t (,@variable-pitch-family))))
326 `(default ((t (,@default-family))))))
293;;;;; Modeline 327;;;;; Modeline
294(use-package doom-modeline 328(use-package doom-modeline
295 :init 329 :init
296 (setq doom-modeline-icon nil 330 (setq doom-modeline-icon nil
297 doom-modeline-enable-word-count t) 331 doom-modeline-enable-word-count t)
298 332
299 (when *acdw/at-larry* 333 ;; (when *acdw/at-larry*
300 (setq display-time-format "%R") 334 ;; (setq display-time-format "%R")
301 (display-time-mode)) 335 ;; (display-time-mode))
302 336
303 :hook 337 :hook
304 (window-setup-hook . doom-modeline-mode)) 338 (window-setup-hook . doom-modeline-mode))
339
305;;;;; Ligatures 340;;;;; Ligatures
306(use-package ligature 341(use-package ligature
307 :straight (ligature 342 :straight (ligature
@@ -324,10 +359,12 @@
324 "::=" ;; add others here 359 "::=" ;; add others here
325 )) 360 ))
326 (global-ligature-mode)) 361 (global-ligature-mode))
362
327;;;;; Unicode 363;;;;; Unicode
328(use-package unicode-fonts 364(use-package unicode-fonts
329 :config 365 :config
330 (unicode-fonts-setup)) 366 (unicode-fonts-setup))
367
331;;;;; Modus themes 368;;;;; Modus themes
332(use-package modus-operandi-theme 369(use-package modus-operandi-theme
333 :if window-system 370 :if window-system
@@ -356,25 +393,31 @@
356 (run-at-time (nth 4 (split-string (sunrise-sunset))) 393 (run-at-time (nth 4 (split-string (sunrise-sunset)))
357 (* 60 60 24) #'acdw/sunset) 394 (* 60 60 24) #'acdw/sunset)
358 (run-at-time "12am" (* 60 60 24) #'acdw/sunset))) 395 (run-at-time "12am" (* 60 60 24) #'acdw/sunset)))
396
359;;;; General text editing 397;;;; General text editing
398
360;;;;; Jump to characters fast 399;;;;; Jump to characters fast
361(use-package avy 400(use-package avy
362 :bind 401 :bind
363 ("M-s" . avy-goto-char-timer)) 402 ("M-s" . avy-goto-char-timer))
403
364;;;;; Show text commands acted on 404;;;;; Show text commands acted on
365(use-package volatile-highlights 405(use-package volatile-highlights
366 :config 406 :config
367 (volatile-highlights-mode)) 407 (volatile-highlights-mode))
408
368;;;;; Visual replacement for `zap-to-char' 409;;;;; Visual replacement for `zap-to-char'
369(use-package zop-to-char 410(use-package zop-to-char
370 :bind 411 :bind
371 ([remap zap-to-char] . zop-to-char) 412 ([remap zap-to-char] . zop-to-char)
372 ([remap zap-up-to-char] . zop-up-to-char)) 413 ([remap zap-up-to-char] . zop-up-to-char))
414
373;;;;; Kill & mark things more visually 415;;;;; Kill & mark things more visually
374(use-package easy-kill 416(use-package easy-kill
375 :bind 417 :bind
376 ([remap kill-ring-save] . easy-kill) 418 ([remap kill-ring-save] . easy-kill)
377 ([remap mark-sexp] . easy-mark)) 419 ([remap mark-sexp] . easy-mark))
420
378;;;;; Operate on the current line if no region is active 421;;;;; Operate on the current line if no region is active
379(use-package whole-line-or-region 422(use-package whole-line-or-region
380 :config 423 :config
@@ -384,7 +427,9 @@
384(use-package expand-region 427(use-package expand-region
385 :bind 428 :bind
386 ("C-=" . er/expand-region)) 429 ("C-=" . er/expand-region))
430
387;;;; Programming 431;;;; Programming
432
388;;;;; Code completion 433;;;;; Code completion
389(use-package company 434(use-package company
390 :init 435 :init
@@ -433,26 +478,33 @@
433 :after magit 478 :after magit
434 :config 479 :config
435 (setq forge-owned-accounts '(("duckwork")))) 480 (setq forge-owned-accounts '(("duckwork"))))
481
436;;;;; Code formatting & display 482;;;;; Code formatting & display
483
437;;;;;; Keep code properly indented 484;;;;;; Keep code properly indented
438(use-package aggressive-indent 485(use-package aggressive-indent
439 :diminish aggressive-indent-mode 486 :diminish aggressive-indent-mode
440 :hook 487 :hook
441 (prog-mode-hook . aggressive-indent-mode)) 488 (prog-mode-hook . aggressive-indent-mode))
489
442;;;;;; Smartly deal with pairs 490;;;;;; Smartly deal with pairs
443(use-package smartparens 491(use-package smartparens
444 :config 492 :config
445 (require 'smartparens-config) 493 (require 'smartparens-config)
446 (smartparens-global-mode)) 494 (smartparens-global-mode))
495
447;;;;;; Show delimiters as different colors 496;;;;;; Show delimiters as different colors
448(use-package rainbow-delimiters 497(use-package rainbow-delimiters
449 :hook 498 :hook
450 (prog-mode-hook . rainbow-delimiters-mode)) 499 (prog-mode-hook . rainbow-delimiters-mode))
500
451;;;;;; Show colors as they appear in the buffer 501;;;;;; Show colors as they appear in the buffer
452(use-package rainbow-mode 502(use-package rainbow-mode
453 :hook 503 :hook
454 (prog-mode-hook . rainbow-mode)) 504 (prog-mode-hook . rainbow-mode))
505
455;;;; Writing 506;;;; Writing
507
456;;;;; `fill-column', but in `visual-line-mode' 508;;;;; `fill-column', but in `visual-line-mode'
457(use-package visual-fill-column 509(use-package visual-fill-column
458 :init 510 :init
@@ -463,23 +515,29 @@
463 :after #'visual-fill-column-adjust)) 515 :after #'visual-fill-column-adjust))
464 516
465;;;; Machine-specific 517;;;; Machine-specific
518
466;;;;; Linux at home 519;;;;; Linux at home
467(when *acdw/at-home* 520(when *acdw/at-home*
521
468;;;;;; Edit files with `sudo' (I think?) 522;;;;;; Edit files with `sudo' (I think?)
469 (use-package su 523 (use-package su
470 :config 524 :config
471 (su-mode)) 525 (su-mode))
526
472;;;;;; Implement XDG Trash specification 527;;;;;; Implement XDG Trash specification
473 (use-package trashed 528 (use-package trashed
474 :init 529 :init
475 (setq delete-by-moving-to-trash t)) 530 (setq delete-by-moving-to-trash t))
531
476;;;;;; Build exec-path from $PATH 532;;;;;; Build exec-path from $PATH
477 (use-package exec-path-from-shell 533 (use-package exec-path-from-shell
478 :demand 534 :demand
479 :config 535 :config
480 (exec-path-from-shell-initialize)) 536 (exec-path-from-shell-initialize))
481 ) 537 )
538
482;;; Specialized packages 539;;; Specialized packages
540
483;;;; Gemini & Gopher 541;;;; Gemini & Gopher
484(use-package elpher 542(use-package elpher
485 :straight (elpher 543 :straight (elpher
@@ -539,101 +597,103 @@
539 (elpher-go (match-string 1))))) 597 (elpher-go (match-string 1)))))
540 598
541;;;; exwm ~ Emacs X Window Manager 599;;;; exwm ~ Emacs X Window Manager
542(when *acdw/at-larry* 600;; (when *acdw/at-larry*
543 (use-package exwm 601;; (use-package exwm
544 :if window-system 602;; :if window-system
545 :demand 603;; :demand
546 :custom 604;; :init
547 (exwm-layout-show-all-buffers t) 605;; (add-to-list 'default-frame-alist '(fullscreen . maximized)))
548 (exwm-workspace-warp-cursor t) 606;; :custom
549 ;;(mouse-autoselect-window t) 607;; (exwm-layout-show-all-buffers t)
550 (exwm-workspace-number 4) 608;; (exwm-workspace-warp-cursor t)
551 (exwm-input-global-keys 609;; ;;(mouse-autoselect-window t)
552 `( 610;; (exwm-workspace-number 4)
553 ([remap split-window-below] . split-and-follow-below) 611;; (exwm-input-global-keys
554 ([remap split-window-right] . split-and-follow-right) 612;; `(
555 ([?\s-r] . exwm-reset) 613;; ([remap split-window-below] . split-and-follow-below)
556 ([?\s-w] . exwm-workspace-switch) 614;; ([remap split-window-right] . split-and-follow-right)
557 ([?\s-&] . (lambda (command) 615;; ([?\s-r] . exwm-reset)
558 (interactive (list (read-shell-command "$ "))) 616;; ([?\s-w] . exwm-workspace-switch)
559 (start-process-shell-command command nil command))) 617;; ([?\s-&] . (lambda (command)
560 ,@(mapcar (lambda (i) 618;; (interactive (list (read-shell-command "$ ")))
561 `(,(kbd (format "s-%d" i)) . 619;; (start-process-shell-command command nil command)))
562 (lambda () 620;; ,@(mapcar (lambda (i)
563 (interactive) 621;; `(,(kbd (format "s-%d" i)) .
564 (exwm-workspace-switch-create ,i)))) 622;; (lambda ()
565 (number-sequence 0 9)))) 623;; (interactive)
566 (exwm-input-simulation-keys 624;; (exwm-workspace-switch-create ,i))))
567 '(([?\C-b] . [left]) 625;; (number-sequence 0 9))))
568 ([?\M-b] . [C-left]) 626;; (exwm-input-simulation-keys
569 ([?\C-f] . [right]) 627;; '(([?\C-b] . [left])
570 ([?\M-f] . [C-right]) 628;; ([?\M-b] . [C-left])
571 ([?\C-p] . [up]) 629;; ([?\C-f] . [right])
572 ([?\C-n] . [down]) 630;; ([?\M-f] . [C-right])
573 ([?\C-a] . [home]) 631;; ([?\C-p] . [up])
574 ([?\C-e] . [end]) 632;; ([?\C-n] . [down])
575 ([?\M-v] . [prior]) 633;; ([?\C-a] . [home])
576 ([?\C-v] . [next]) 634;; ([?\C-e] . [end])
577 ([?\C-d] . [delete]) 635;; ([?\M-v] . [prior])
578 ([?\C-k] . [S-end delete]) 636;; ([?\C-v] . [next])
579 ([?\C-s] . [?\C-f]) 637;; ([?\C-d] . [delete])
580 ([?\C-w] . [?\C-x]) 638;; ([?\C-k] . [S-end delete])
581 ([?\M-w] . [?\C-c]) 639;; ([?\C-s] . [?\C-f])
582 ([?\C-y] . [?\C-v]))) 640;; ([?\C-w] . [?\C-x])
583 :hook 641;; ([?\M-w] . [?\C-c])
584 ((exwm-update-class-hook . 642;; ([?\C-y] . [?\C-v])))
585 (lambda () "Rename buffer to window's class name" 643;; :hook
586 (exwm-workspace-rename-buffer exwm-class-name))) 644;; ((exwm-update-class-hook .
587 (exwm-update-title-hook . 645;; (lambda () "Rename buffer to window's class name"
588 (lambda () "Update workspace name to window title" 646;; (exwm-workspace-rename-buffer exwm-class-name)))
589 (when (not exwm-instance-name) 647;; (exwm-update-title-hook .
590 (exwm-workspace-rename-buffer exwm-title)))) 648;; (lambda () "Update workspace name to window title"
591 (exwm-init-hook . window-divider-mode) 649;; (when (not exwm-instance-name)
592 (exwm-init-hook . 650;; (exwm-workspace-rename-buffer exwm-title))))
593 (lambda () "Autostart" 651;; (exwm-init-hook . window-divider-mode)
594 (start-process-shell-command "cmst" nil "cmst -m -w 5") 652;; (exwm-init-hook .
595 (start-process-shell-command "keepassxc" nil "keepassxc") 653;; (lambda () "Autostart"
596 (start-process-shell-command 654;; (start-process-shell-command "cmst" nil "cmst -m -w 5")
597 "pa-applet" nil 655;; (start-process-shell-command "keepassxc" nil "keepassxc")
598 "pa-applet --disable-key-grabbing --disable-notifications") 656;; (start-process-shell-command
599 (start-process-shell-command 657;; "pa-applet" nil
600 "cbatticon" nil "cbatticon")))) 658;; "pa-applet --disable-key-grabbing --disable-notifications")
601 :config 659;; (start-process-shell-command
602 (require 'exwm) 660;; "cbatticon" nil "cbatticon"))))
603 (exwm-enable) 661;; :config
604 (require 'exwm-systemtray) 662;; (require 'exwm)
605 (exwm-systemtray-enable)) 663;; (exwm-enable)
606 664;; (require 'exwm-systemtray)
607 (use-package exwm-firefox-core 665;; (exwm-systemtray-enable))
608 :after exwm 666
609 :straight (exwm-firefox-core 667;; (use-package exwm-firefox-core
610 :type git 668;; :after exwm
611 :host github 669;; :straight (exwm-firefox-core
612 :repo "walseb/exwm-firefox-core")) 670;; :type git
613 671;; :host github
614 (use-package exwm-firefox 672;; :repo "walseb/exwm-firefox-core"))
615 :after exwm-firefox-core 673
616 :straight (exwm-firefox 674;; (use-package exwm-firefox
617 :type git 675;; :after exwm-firefox-core
618 :host github 676;; :straight (exwm-firefox
619 :repo "ieure/exwm-firefox") 677;; :type git
620 :config 678;; :host github
621 (exwm-firefox-mode)) 679;; :repo "ieure/exwm-firefox")
622 680;; :config
623 (use-package exwm-mff 681;; (exwm-firefox-mode))
624 :straight (exwm-mff 682
625 :host github 683;; (use-package exwm-mff
626 :repo "ieure/exwm-mff" 684;; :straight (exwm-mff
627 :fork ( 685;; :host github
628 :host github 686;; :repo "ieure/exwm-mff"
629 :repo "duckwork/exwm-mff")) 687;; :fork (
630 :after exwm 688;; :host github
631 :hook 689;; :repo "duckwork/exwm-mff"))
632 (exwm-init-hook . exwm-mff-mode)) 690;; :after exwm
633 691;; :hook
634 (use-package exwm-edit) 692;; (exwm-init-hook . exwm-mff-mode))
635 693
636 ) ;; end of *acdw/at-larry* block for exwm 694;; (use-package exwm-edit)
695
696;; ) ;; end of *acdw/at-larry* block for exwm
637 697
638;;;; IRC 698;;;; IRC
639(use-package circe 699(use-package circe
@@ -756,9 +816,5 @@
756 (setq inferior-lisp-program (cond ((executable-find "sbcl") 816 (setq inferior-lisp-program (cond ((executable-find "sbcl")
757 (executable-find "sbcl"))))) 817 (executable-find "sbcl")))))
758 818
759;;;; GNUS (TODO)
760(use-package gnus
761 :straight nil)
762
763(provide 'init) 819(provide 'init)
764;;; init.el ends here 820;;; init.el ends here