diff --git a/README.org b/README.org index 818d2af7..d78cb707 100644 --- a/README.org +++ b/README.org @@ -8,6 +8,7 @@ - [[#lets-bootstrap-straightel][Let's bootstrap straight.el]] - [[#fix-nixos][Fix NixOS]] - [[#spell-check][Spell Check]] + - [[#proced][Proced]] - [[#keep-folders-clean][Keep Folders Clean]] - [[#ligatures][Ligatures]] - [[#keybindings][Keybindings]] @@ -108,6 +109,7 @@ In order to have this config work on both my desktop with regular joe-schmoe mon (defun chris/set-font-faces () "Set the faces for our fonts" + (interactive) (message "Setting faces!") (set-face-attribute 'default nil :font "VictorMono Nerd Font Propo" :height chris/default-font-size) @@ -123,14 +125,13 @@ In order to have this config work on both my desktop with regular joe-schmoe mon (add-to-list 'default-frame-alist '(alpha-background . 100)) (add-to-list 'initial-frame-alist '(alpha-background . 100))) -(if (daemonp) - (add-hook 'after-make-frame-functions - (lambda (frame) - (with-selected-frame frame - (chris/set-font-faces) - (chris/set-transparency) - (tool-bar-mode -1))) - (chris/set-font-faces))) +(if (daemonp) (add-hook 'after-make-frame-functions + (lambda (frame) + (with-selected-frame frame + (chris/set-font-faces) + (chris/set-transparency) + (tool-bar-mode -1))) + (chris/set-font-faces))) #+end_src Then let's make sure line-numbers are relative and on. And let's turn on visual-line-mode globally. @@ -236,6 +237,13 @@ To use straight we need to bootstrap it. This code is pulled right from Straight (straight-use-package 'use-package) #+end_src +In order to make sure I can use melpa packages without straight... +#+begin_src emacs-lisp +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) +#+end_src + Now, let's turn on =use-package=. #+begin_src emacs-lisp (eval-when-compile (require 'use-package)) @@ -327,8 +335,10 @@ I am currently using NixOS. In order for emacs to have access to certain program (add-to-list 'exec-path "/home/chris/.nix-profile/bin") (add-to-list 'exec-path "/etc/profiles/per-user/chris/bin") (add-to-list 'exec-path "/run/current-system/sw/bin") +(add-to-list 'exec-path "/run/current-system/profile/bin") (add-to-list 'exec-path "/usr/bin") (add-to-list 'exec-path "/opt/android-sdk/cmdline-tools/latest/bin") +(add-to-list 'exec-path "/home/chris/bin") ;; (setq exec-directory "/usr/bin") (setenv "NIX_CONF_DIR" "/etc/nix") @@ -364,6 +374,7 @@ Also due to using greetd, emacs isn't started with the environment from the syst :config (exec-path-from-shell-initialize)) #+end_src + ** Spell Check #+begin_src emacs-lisp (executable-find "ssh") @@ -375,6 +386,12 @@ Also due to using greetd, emacs isn't started with the environment from the syst '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8))) (add-hook 'org-mode-hook 'chris/org-mode-setup) #+end_src +** Proced +Let's turn auto update on for proced +#+begin_src emacs-lisp +(setq proced-auto-update-flag t) +#+end_src + ** Keep Folders Clean @@ -488,6 +505,8 @@ This evil-collection package includes a lot of other evil based things. "n" '(:ignore t :which-key "notes") "m" '(:ignore t :which-key "music") "l" '(:ignore t :which-key "lsp") + "x" '(:ignore t :which-key "guix") + "xx" '(guix :which-key "guix") "sp" '(:ignore t :which-key "passwords") "bs" '(consult-buffer :which-key "buffer search") "bd" '(kill-this-buffer :which-key "kill buffer") @@ -1677,7 +1696,7 @@ Spectacle.js is another beautiful slideshow builder that org can export to using *** ox-zola I'm going to start a website for my own ramblings, tutorials and links. To do this I'll likely use Zola since it's built in Rust. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package ox-zola :load-path "ox-zola/" :config @@ -1687,7 +1706,7 @@ I'm going to start a website for my own ramblings, tutorials and links. To do th *** AI GPTEL is a package that uses chatGPT to get some text generation in org-mode -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package gptel :ensure t :commands (gptel-send @@ -1704,7 +1723,7 @@ is emacs the best? Jinx is an enchanted spell checker for emacs. I think I'll just turn it on globally for a while and see how I feel. #+begin_src emacs-lisp (use-package jinx - :hook (emacs-startup . global-jinx-mode) + ;; :hook (emacs-startup . global-jinx-mode) :init (flyspell-mode -1) :config (flyspell-mode -1) :bind (("M-c" . jinx-correct) @@ -1713,7 +1732,7 @@ Jinx is an enchanted spell checker for emacs. I think I'll just turn it on globa ** Emoji In order to render color emojis I'll use =unicode-fonts=. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package unicode-fonts :ensure t :config @@ -2686,6 +2705,11 @@ Also here are some lisp specific stuff "gh" 'sp-backward-slurp-sexp "C-l" 'sp-forward-sexp "C-h" 'sp-backward-sexp) + ('normal scheme-mode-map + "gl" 'sp-forward-slurp-sexp + "gh" 'sp-backward-slurp-sexp + "C-l" 'sp-forward-sexp + "C-h" 'sp-backward-sexp) ('normal cider-repl-mode-map "gl" 'sp-forward-slurp-sexp "gh" 'sp-backward-slurp-sexp @@ -2698,6 +2722,37 @@ Also here are some lisp specific stuff "C-h" 'sp-backward-sexp)) #+end_src +#+begin_src emacs-lisp +(use-package paredit + :config + :general + ('normal lisp-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal lisp-shared-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal sly-mrepl-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal scheme-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal cider-repl-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward)) +#+end_src + Finally, here are some auto modes I'd like to setup #+begin_src emacs-lisp @@ -2906,7 +2961,7 @@ Friar is a fennel repl in the awesome repl. It allows you to interact with Aweso #+end_src *** Clojure I'm gonnna dabble in using clojure for the website -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no ;; First install the package: (use-package flycheck-clj-kondo :ensure t) @@ -3107,6 +3162,8 @@ I'm making a small function in here to open files in the appropriate program usi "q" 'kill-this-buffer "C-" 'chris/dired-open-xdg "M-" 'ffap-other-window + "h" 'dired-up-directory + "l" 'dired-find-file "C-'" 'embark-act)) #+end_src @@ -3133,7 +3190,7 @@ We need a function to copy the full filename to kill-ring :hook (dired-mode . all-the-icons-dired-mode)) #+end_src -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package dired-single :after dired :general @@ -3142,11 +3199,11 @@ We need a function to copy the full filename to kill-ring "l" 'dired-single-buffer)) #+end_src -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package fd-dired) #+end_src -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package dired-rainbow :after dired :config @@ -3244,9 +3301,12 @@ Ledger mode #+end_src ** MU4E +:PROPERTIES: +:ID: 20230619T060455.174705 +:END: #+begin_src emacs-lisp (use-package mu4e - :load-path "/usr/share/emacs/site-lisp/mu4e/" + ;; :load-path "/usr/share/emacs/site-lisp/mu4e/" :init (setq mu4e-maildir "~/mail" user-full-name "Chris Cochrun" @@ -3255,7 +3315,8 @@ Ledger mode mu4e-update-interval (* 15 60) mu4e-attachment-dir "/home/chris/nextcloud/home/Documents/attachments" mu4e-completing-read-function #'completing-read - mu4e-mu-binary "/etc/profiles/per-user/chris/bin/mu" + mu4e-mu-binary "/home/chris/.guix-home/profile/bin/mu" + ;; mu4e-mu-binary "/etc/profiles/per-user/chris/bin/mu" mu4e-compose-signature-auto-include nil mu4e-headers-fields '((:human-date . 12) @@ -3515,7 +3576,7 @@ Here we setup an easy way to use ical as a source for calendar views. ** Org-Caldav-sync I'd like to sync my org-files to caldav and hopefully use more native android apps to manage tasks and reminders. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package org-caldav :after org :config @@ -3539,7 +3600,7 @@ I'd really like to have notifications for when things are scheduled so that I ge (org-notifications-start)) #+END_SRC -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package org-wild-notifier :after org :config @@ -3676,7 +3737,9 @@ Let's add our own eshell prompt. and set the password cache to a significantly h ("nupd" "update-nix") ("ksb" "/home/chris/dev/kde/src/kdesrc-build/kdesrc-build") ("ws" "rsync -avzP public/ chris@staff.tfcconnection.org:tfcconnection") - ("wttr" "curl wttr.in/@home.cochrun.xyz"))) + ("wttr" "curl wttr.in/@home.cochrun.xyz") + ("gh" "guix home -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/home.scm") + ("gs" "guix system -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/system.scm"))) (defun chris/eshell-new() "Open a new eshell buffer" @@ -4237,7 +4300,7 @@ I am going to try and use LanguageTool to fix grammatical issues. #+end_src ** qrencode -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package qrencode) #+end_src diff --git a/init.el b/init.el index 6632f3e3..0dcba573 100644 --- a/init.el +++ b/init.el @@ -28,6 +28,7 @@ (defun chris/set-font-faces () "Set the faces for our fonts" + (interactive) (message "Setting faces!") (set-face-attribute 'default nil :font "VictorMono Nerd Font Propo" :height chris/default-font-size) @@ -43,14 +44,13 @@ (add-to-list 'default-frame-alist '(alpha-background . 100)) (add-to-list 'initial-frame-alist '(alpha-background . 100))) -(if (daemonp) - (add-hook 'after-make-frame-functions - (lambda (frame) - (with-selected-frame frame - (chris/set-font-faces) - (chris/set-transparency) - (tool-bar-mode -1))) - (chris/set-font-faces))) +(if (daemonp) (add-hook 'after-make-frame-functions + (lambda (frame) + (with-selected-frame frame + (chris/set-font-faces) + (chris/set-transparency) + (tool-bar-mode -1))) + (chris/set-font-faces))) (setq display-line-numbers-type t) (global-display-line-numbers-mode +1) @@ -94,6 +94,10 @@ (with-demoted-errors "init.el error: %s" (load autoload-file nil t))))) +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) + (eval-when-compile (require 'use-package)) (setq use-package-verbose t) @@ -159,6 +163,8 @@ '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8))) (add-hook 'org-mode-hook 'chris/org-mode-setup) +(setq proced-auto-update-flag t) + (use-package no-littering) ;; no-littering doesn't set this by default so we must place @@ -254,6 +260,8 @@ "n" '(:ignore t :which-key "notes") "m" '(:ignore t :which-key "music") "l" '(:ignore t :which-key "lsp") + "x" '(:ignore t :which-key "guix") + "xx" '(guix :which-key "guix") "sp" '(:ignore t :which-key "passwords") "bs" '(consult-buffer :which-key "buffer search") "bd" '(kill-this-buffer :which-key "kill buffer") @@ -1347,32 +1355,13 @@ All my (performant) foldings needs are met between this and `org-show-subtree' org-re-reveal-mobile-app t) ) -(use-package ox-zola - :load-path "ox-zola/" - :config - (setq org-hugo-base-dir "/home/chris/dev/cochrun.xyz" - org-hugo-section "blog")) - -(use-package gptel - :ensure t - :commands (gptel-send - gptel) - :config - (setq gptel-default-mode 'org-mode - gptel-api-key "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")) - (use-package jinx - :hook (emacs-startup . global-jinx-mode) + ;; :hook (emacs-startup . global-jinx-mode) :init (flyspell-mode -1) :config (flyspell-mode -1) :bind (("M-c" . jinx-correct) ("C-M-$" . Jinx-Languages))) -(use-package unicode-fonts - :ensure t - :config - (unicode-fonts-setup)) - (use-package emojify :ensure t :hook (after-init . global-emojify-mode) @@ -2032,6 +2021,11 @@ targets." "gh" 'sp-backward-slurp-sexp "C-l" 'sp-forward-sexp "C-h" 'sp-backward-sexp) + ('normal scheme-mode-map + "gl" 'sp-forward-slurp-sexp + "gh" 'sp-backward-slurp-sexp + "C-l" 'sp-forward-sexp + "C-h" 'sp-backward-sexp) ('normal cider-repl-mode-map "gl" 'sp-forward-slurp-sexp "gh" 'sp-backward-slurp-sexp @@ -2043,6 +2037,35 @@ targets." "C-l" 'sp-forward-sexp "C-h" 'sp-backward-sexp)) +(use-package paredit + :config + :general + ('normal lisp-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal lisp-shared-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal sly-mrepl-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal scheme-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) + ('normal cider-repl-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward)) + (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) @@ -2149,19 +2172,6 @@ targets." (use-package fennel-mode :mode ("\\.fnl\\'" . fennel-mode)) -;; First install the package: -(use-package flycheck-clj-kondo - :ensure t) - -;; then install the checker as soon as `clojure-mode' is loaded -(use-package clojure-mode - :ensure t - :config - (require 'flycheck-clj-kondo)) - -(use-package cider - :after clojure-mode) - (use-package yaml-mode :mode ("\\.yml\\'" . yaml-mode)) @@ -2295,6 +2305,8 @@ targets." "q" 'kill-this-buffer "C-" 'chris/dired-open-xdg "M-" 'ffap-other-window + "h" 'dired-up-directory + "l" 'dired-find-file "C-'" 'embark-act)) (defun chris/dired-yank-filename () @@ -2313,32 +2325,6 @@ targets." (use-package all-the-icons-dired :hook (dired-mode . all-the-icons-dired-mode)) -(use-package dired-single - :after dired - :general - (general-def 'normal dired-mode-map - "h" 'dired-single-up-directory - "l" 'dired-single-buffer)) - -(use-package fd-dired) - -(use-package dired-rainbow - :after dired - :config - (defconst chris/dired-media-files-extensions - '("mp3" "mp4" "MP3" "MP4" "avi" "mpg" "flv" "ogg" "opus") - "Media files.") - - (defconst chris/dired-image-files-extensions - '("png" "jpg" "PNG" "JPG" "jpeg" "JPEG" "gif" "GIF") - "image files") - - (dired-rainbow-define html "#4e9a06" ("htm" "html" "xhtml")) - (dired-rainbow-define media "#f3f99d" chris/dired-media-files-extensions) - (dired-rainbow-define image "#5af78e" chris/dired-image-files-extensions) - - (dired-rainbow-define log (:inherit default :italic t) ".*\\.log")) - (use-package diredfl :after dired :config (diredfl-global-mode +1)) @@ -2357,7 +2343,7 @@ targets." (use-package ledger-mode) (use-package mu4e - :load-path "/usr/share/emacs/site-lisp/mu4e/" + ;; :load-path "/usr/share/emacs/site-lisp/mu4e/" :init (setq mu4e-maildir "~/mail" user-full-name "Chris Cochrun" @@ -2366,7 +2352,8 @@ targets." mu4e-update-interval (* 15 60) mu4e-attachment-dir "/home/chris/nextcloud/home/Documents/attachments" mu4e-completing-read-function #'completing-read - mu4e-mu-binary "/etc/profiles/per-user/chris/bin/mu" + mu4e-mu-binary "/home/chris/.guix-home/profile/bin/mu" + ;; mu4e-mu-binary "/etc/profiles/per-user/chris/bin/mu" mu4e-compose-signature-auto-include nil mu4e-headers-fields '((:human-date . 12) @@ -2606,24 +2593,6 @@ targets." (use-package calfw-ical :after calfw) -(use-package org-caldav - :after org - :config - (setq org-caldav-url "https://staff.tfcconnection.org/remote.php/dav/calendars/chris" - org-caldav-calendar-id "org" - org-caldav-inbox "/home/chris/org/todo/inbox.org" - org-caldav-files '("/home/chris/org/todo/todo.org" - "/home/chris/org/todo/notes.org" - "/home/chris/org/todo/prayer.org") - org-icalendar-alarm-time 15 - org-icalendar-use-scheduled '(todo-start event-if-todo))) - -(use-package org-wild-notifier - :after org - :config - (setq alert-default-style 'libnotify) - (org-wild-notifier-mode +1)) - (use-package magit :ensure nil :commands (magit-status magit-get-current-branch) @@ -2747,7 +2716,9 @@ targets." ("nupd" "update-nix") ("ksb" "/home/chris/dev/kde/src/kdesrc-build/kdesrc-build") ("ws" "rsync -avzP public/ chris@staff.tfcconnection.org:tfcconnection") - ("wttr" "curl wttr.in/@home.cochrun.xyz"))) + ("wttr" "curl wttr.in/@home.cochrun.xyz") + ("gh" "guix home -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/home.scm") + ("gs" "guix system -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/system.scm"))) (defun chris/eshell-new() "Open a new eshell buffer" @@ -3178,8 +3149,6 @@ interfere with the default `bongo-playlist-buffer'." "v" 'chris/elfeed-bongo-insert-item "N" 'mastodon-notifications--timeline)) -(use-package qrencode) - ;; Reduce rendering/line scan work for Emacs by not rendering cursors or regions ;; in non-focused windows. (setq-default cursor-in-non-selected-windows nil) diff --git a/recentf b/recentf index 5e9eb277..ebe53737 100644 --- a/recentf +++ b/recentf @@ -1,6 +1,13 @@ -;;; Automatically generated by ‘recentf’ on Sat May 20 05:45:25 2023. +;;; Automatically generated by ‘recentf’ on Wed Jun 7 20:58:32 2023. -(setq recentf-list 'nil) +(setq recentf-list + '( + "~/.emacs.d/init.el" + "~/.files/guix/home-configuration.scm" + "~/.emacs.d/README.org" + "~/.files/guix/system.scm" + "~/.files/guix/channels.scm" + )) (setq recentf-filter-changer-current 'nil)