Emacs tweaks

- Setup mu4e bookmarks how I like them
- Configure Alert
- Cleanup TODOs
- Setup anki-editor
This commit is contained in:
nathan mccarty 2022-07-05 01:07:47 -04:00
parent 2088ad7072
commit c4acff4721
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
9 changed files with 77 additions and 16 deletions

View File

@ -108,6 +108,11 @@
(after! treemacs (after! treemacs
(setq treemacs-width 25)) (setq treemacs-width 25))
(use-package! alert
:config
;; TODO: Make this conditional so we can make the correct choice on macos
(setq alert-default-style 'libnotify))
(setq-default fill-column 100) (setq-default fill-column 100)
(after! avy (after! avy
@ -261,6 +266,8 @@ work if it thinks it needs to."
"* %a :website:\n\n%U %?\n\n%:initial") "* %a :website:\n\n%U %?\n\n%:initial")
org-capture-templates)) org-capture-templates))
(use-package! anki-editor)
(use-package! magit-todos (use-package! magit-todos
:hook (magit-mode . magit-todos-mode)) :hook (magit-mode . magit-todos-mode))
@ -347,15 +354,27 @@ work if it thinks it needs to."
(mu4e-trash-folder . "/nathan@mccarty.io/Trash") (mu4e-trash-folder . "/nathan@mccarty.io/Trash")
(mu4e-refile-folder . "/nathan@mccarty.io/Archive") (mu4e-refile-folder . "/nathan@mccarty.io/Archive")
(smtpmail-smtp-user . "nathan@mccarty.io")) (smtpmail-smtp-user . "nathan@mccarty.io"))
t) t))
(after! mu4e
(setq mu4e-bookmarks '())
(add-to-list 'mu4e-bookmarks
'(:name "All Mail"
:key ?a
:query "NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks (add-to-list 'mu4e-bookmarks
'(:name "Inbox - nathan@mccarty.io" '(:name "Inbox - nathan@mccarty.io"
:key ?m :key ?m
:query "maildir:\"/nathan@mccarty.io/Inbox\" AND NOT flag:trashed"))) :query "maildir:\"/nathan@mccarty.io/Inbox\" AND NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks
'(:name "Unread"
:key ?u
:query "flag:unread AND NOT flag:trashed")))
(after! mu4e (after! mu4e
(mu4e-alert-enable-mode-line-display)) (mu4e-alert-enable-mode-line-display))
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
mu4e-get-mail-command "true") (setq mu4e-get-mail-command "true"
mu4e-update-interval 300))

View File

@ -142,6 +142,14 @@ Configure treemacs, doing the following:
(after! treemacs (after! treemacs
(setq treemacs-width 25)) (setq treemacs-width 25))
#+end_src #+end_src
** Alert
Configure notifications that originate from within emacs
#+begin_src emacs-lisp
(use-package! alert
:config
;; TODO: Make this conditional so we can make the correct choice on macos
(setq alert-default-style 'libnotify))
#+end_src
* Basic Editing * Basic Editing
** Fill Column ** Fill Column
Set the default fill column to 100 Set the default fill column to 100
@ -370,6 +378,11 @@ The default template for org-protocol-capture-html
"* %a :website:\n\n%U %?\n\n%:initial") "* %a :website:\n\n%U %?\n\n%:initial")
org-capture-templates)) org-capture-templates))
#+end_src #+end_src
** anki-editor
Flash cards from within emacs.
#+begin_src emacs-lisp
(use-package! anki-editor)
#+end_src
* General Modes * General Modes
** Magit ** Magit
Further configuration for magit Further configuration for magit
@ -552,11 +565,24 @@ Tell it where our account's stuff is
(mu4e-trash-folder . "/nathan@mccarty.io/Trash") (mu4e-trash-folder . "/nathan@mccarty.io/Trash")
(mu4e-refile-folder . "/nathan@mccarty.io/Archive") (mu4e-refile-folder . "/nathan@mccarty.io/Archive")
(smtpmail-smtp-user . "nathan@mccarty.io")) (smtpmail-smtp-user . "nathan@mccarty.io"))
t) t))
#+end_src
Setup our bookmarks, resetting the list of bookmarks first so we can go completely custom
#+begin_src emacs-lisp
(after! mu4e
(setq mu4e-bookmarks '())
(add-to-list 'mu4e-bookmarks
'(:name "All Mail"
:key ?a
:query "NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks (add-to-list 'mu4e-bookmarks
'(:name "Inbox - nathan@mccarty.io" '(:name "Inbox - nathan@mccarty.io"
:key ?m :key ?m
:query "maildir:\"/nathan@mccarty.io/Inbox\" AND NOT flag:trashed"))) :query "maildir:\"/nathan@mccarty.io/Inbox\" AND NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks
'(:name "Unread"
:key ?u
:query "flag:unread AND NOT flag:trashed")))
#+end_src #+end_src
Tell it to enable the modeline display Tell it to enable the modeline display
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -567,5 +593,6 @@ Tell it not to update the mail itself, we have a systemd unit for that
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
mu4e-get-mail-command "true") (setq mu4e-get-mail-command "true"
mu4e-update-interval 300))
#+end_src #+end_src

View File

@ -22,7 +22,7 @@
doom ; what makes DOOM look the way it does doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs doom-dashboard ; a nifty splash screen for Emacs
(emoji +unicode +github) ; 🙂 (emoji +unicode +github) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight todo-words
indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
;;(ligatures +fira) ; ligatures and symbols to make your code pretty again ;;(ligatures +fira) ; ligatures and symbols to make your code pretty again
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
@ -60,7 +60,7 @@
(spell +flyspell +hunspell +everywhere) ; tasing you for misspelling mispelling (spell +flyspell +hunspell +everywhere) ; tasing you for misspelling mispelling
:tools :tools
(debugger +lsp) ; FIXME stepping through code, to help you add bugs (debugger +lsp) ; stepping through code, to help you add bugs
direnv direnv
docker docker
editorconfig ; let someone else argue about tabs vs spaces editorconfig ; let someone else argue about tabs vs spaces

View File

@ -62,3 +62,5 @@
(package! grip-mode) (package! grip-mode)
(package! org-protocol-capture-html) (package! org-protocol-capture-html)
(package! org-superstar) (package! org-superstar)
(package! alert)
(package! anki-editor)

View File

@ -103,6 +103,3 @@ with lib; with nLib; {
}) })
]; ];
} }
# TODO: Add pyright and python3Full under python module

View File

@ -13,6 +13,10 @@
sqlite sqlite
# For latex editing # For latex editing
texlive.combined.scheme-medium texlive.combined.scheme-medium
# For notifications
libnotify
# For flash cards
anki
]; ];
# Setup doom emacs # Setup doom emacs
programs.doom-emacs = { programs.doom-emacs = {
@ -24,7 +28,7 @@
pname = "org-protocol-capture-html"; pname = "org-protocol-capture-html";
ename = "org-protocol-capture-html"; ename = "org-protocol-capture-html";
version = "0.0.0"; version = "0.0.0";
buildInputs = [ self.s ]; packageRequires = [ self.s ];
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "alphapapa"; owner = "alphapapa";
repo = "org-protocol-capture-html"; repo = "org-protocol-capture-html";
@ -32,6 +36,21 @@
hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI="; hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI=";
}; };
}; };
anki-editor = self.trivialBuild {
pname = "anki-editor";
ename = "anki-editor";
version = "0.3.1";
packageRequires = with self; [
dash
request
];
src = pkgs.fetchFromGitHub {
owner = "billop";
repo = "anki-editor";
rev = "c11187a79a980a738af608c98f8de2cdc1d988be";
hash = "sha256-3R9bEu982a9Tq+hXy+ALFF/N2NwK9MsqDELFVGHV09I=";
};
};
}; };
extraPackages = [ pkgs.mu ]; extraPackages = [ pkgs.mu ];
}; };

View File

@ -35,7 +35,6 @@ with lib; {
primary = true; primary = true;
realName = "Nathan McCarty"; realName = "Nathan McCarty";
userName = "nathan@mccarty.io"; userName = "nathan@mccarty.io";
# TODO: Move into `pass`
passwordCommand = "${pkgs.pass}/bin/pass protonmail-bridge-password"; passwordCommand = "${pkgs.pass}/bin/pass protonmail-bridge-password";
aliases = [ aliases = [
"thatonelutenist@protonmail.com" "thatonelutenist@protonmail.com"

View File

@ -55,13 +55,11 @@
interfaces.enp6s0.useDHCP = true; interfaces.enp6s0.useDHCP = true;
nat.externalInterface = "enp6s0"; nat.externalInterface = "enp6s0";
# Open ports for soulseek # Open ports for soulseek
# TODO add in soulseek
firewall = { firewall = {
allowedTCPPorts = [ 61377 ]; allowedTCPPorts = [ 61377 ];
allowedUDPPorts = [ 61377 ]; allowedUDPPorts = [ 61377 ];
}; };
}; };
# FIXME borg backup module
# Setup home manager # Setup home manager
home-manager.users.nathan = import ./home.nix; home-manager.users.nathan = import ./home.nix;

View File

@ -64,7 +64,7 @@ with lib; {
]; ];
# Add noisetorch for microphone noise canceling # Add noisetorch for microphone noise canceling
programs.noisetorch = { programs.noisetorch = {
enable = true; # TODO: https://github.com/noisetorch/NoiseTorch/releases/tag/0.11.6 enable = true;
}; };
# Configure fonts # Configure fonts
}) })