Compare commits

...

5 commits

8 changed files with 528 additions and 65 deletions

13
bin/nmail Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
set -o pipefail
thread_id=$(notmuch search date:1970..2021 |
fzf --reverse --preview 'bash -c '\''
id=$(echo "$1" | cut -d" " -f1 | cut -d":" -f2)
notmuch show --format=raw "thread:$id" | mshow -A text/plain /dev/stdin | w3m -T text/html -dump
'\'' _ {}' | cut -d' ' -f1 | cut -d':' -f2)
[[ -z $thread_id ]] && exit 0
notmuch show --format=raw "thread:$thread_id" |
nvim -c 'set ft=mail' -c 'nmap q :q!<CR>' -

View file

@ -583,10 +583,10 @@ frame if FRAME is nil, and to 1 if AMT is nil."
;; ========================= ;; =========================
;; Agenda variables ;; Agenda variables
(setq org-directory "~/Documents/org/") ; Non-absolute paths for agenda and (setq org-directory "~/NPersonal/") ; Non-absolute paths for agenda and
; capture templates will look here. ; capture templates will look here.
(setq org-agenda-files '("inbox.org" "work.org")) (setq org-agenda-files '("agenda.org"))
;; Default tags ;; Default tags
(setq org-tag-alist '( (setq org-tag-alist '(
@ -609,13 +609,44 @@ frame if FRAME is nil, and to 1 if AMT is nil."
("reading"))) ("reading")))
;; Org-refile: where should org-refile look? ;; Org-refile: where should org-refile look?
(setq org-refile-targets 'FIXME) (setq org-refile-targets '(("agenda.org" :maxlevel . 2)
("archive.org" :level . 1)))
;; Archive location
(setq org-archive-location "archive.org::* Archived")
;;; Phase 3 variables ;;; Phase 3 variables
;; Org-roam variables ;; Denote (zettelkasten with markdown)
(setq org-roam-directory "~/Documents/org-roam/") (use-package denote
(setq org-roam-index-file "~/Documents/org-roam/index.org") :ensure t
:custom
(denote-directory "~/NPersonal/")
(denote-file-type 'markdown-yaml) ;; Use markdown with YAML front matter
(denote-known-keywords '("project" "idea" "ref" "meeting" "paper"))
(denote-prompts '(title keywords))
:bind
(("C-c n n" . denote) ;; Create new note
("C-c n f" . denote-open-or-create)
("C-c n i" . denote-link) ;; Insert link to note
("C-c n l" . denote-backlinks) ;; Show backlinks
("C-c n r" . denote-rename-file)
("C-c n k" . denote-keywords-add)
("C-c n K" . denote-keywords-remove))
:config
;; Enable denote links in org
(denote-rename-buffer-mode 1))
;; Denote org extras (better org integration)
(use-package denote-org-extras
:ensure nil
:after denote
:config
;; Create org links to denote files
(denote-org-extras-dblock-backlinks-mode 1)
:bind
(("C-c n b" . denote-org-extras-backlinks-for-heading)
("C-c n h" . denote-org-extras-link-to-heading)))
;;; Optional variables ;;; Optional variables
@ -629,12 +660,38 @@ frame if FRAME is nil, and to 1 if AMT is nil."
:elpaca nil :elpaca nil
:hook ((org-mode . visual-line-mode) ; wrap lines at word breaks :hook ((org-mode . visual-line-mode) ; wrap lines at word breaks
(org-mode . flyspell-mode)) ; spell checking! (org-mode . flyspell-mode)) ; spell checking!
:init
;; Load mu4e-org for email links (before org loads)
(with-eval-after-load 'org
(require 'mu4e-org nil t))
;; Open agenda on startup (deferred)
(add-hook 'elpaca-after-init-hook
(lambda ()
(run-with-idle-timer 1 nil #'org-agenda nil "n")))
:bind (:map global-map :bind (:map global-map
("C-c a" . org-agenda) ; Agenda
("C-c c" . org-capture) ; Capture
("C-c l s" . org-store-link) ; Mnemonic: link → store ("C-c l s" . org-store-link) ; Mnemonic: link → store
("C-c l i" . org-insert-link-global)) ; Mnemonic: link → insert ("C-c l i" . org-insert-link-global)) ; Mnemonic: link → insert
:custom
(org-time-stamp-rounding-minutes '(0 5)) ;; Round to 5 min
(org-read-date-prefer-future t)
(org-return-follows-link t) ;; RET follows links
;; Agenda settings
(org-agenda-window-setup 'current-window)
(org-agenda-start-with-log-mode t)
(org-agenda-include-diary nil)
(org-agenda-tags-column -80)
(org-agenda-block-separator ?─)
(org-agenda-time-grid '((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄"))
(org-agenda-current-time-string "◀── now ──────────────────────────────────────")
:config :config
(require 'oc-csl) ; citation support (require 'oc-csl) ; citation support
(add-to-list 'org-export-backends 'md) (add-to-list 'org-export-backends 'md)
(setf (cdr (assoc 'file org-link-frame-setup)) 'find-file) (setf (cdr (assoc 'file org-link-frame-setup)) 'find-file)
(setq org-export-with-smart-quotes t) (setq org-export-with-smart-quotes t)
@ -643,23 +700,214 @@ frame if FRAME is nil, and to 1 if AMT is nil."
(setq org-outline-path-complete-in-steps nil) (setq org-outline-path-complete-in-steps nil)
(setq org-refile-use-outline-path 'file) (setq org-refile-use-outline-path 'file)
(setq org-capture-templates (setq org-capture-templates
'(("c" "Default Capture" entry (file "inbox.org") '(("c" "Quick Capture" entry (file+headline "agenda.org" "Inbox")
"* TODO %?\n%U\n%i") "** TODO %?\n%U\n%i")
;; Capture and keep an org-link to the thing we're currently working with ;; Capture and keep an org-link to the thing we're currently working with
("r" "Capture with Reference" entry (file "inbox.org") ("r" "Capture with Reference" entry (file+headline "agenda.org" "Inbox")
"* TODO %?\n%U\n%i\n%a")
;; Define a section
("w" "Work")
("wm" "Work meeting" entry (file+headline "work.org" "Meetings")
"** TODO %?\n%U\n%i\n%a") "** TODO %?\n%U\n%i\n%a")
("wr" "Work report" entry (file+headline "work.org" "Reports") ("t" "Task" entry (file+headline "agenda.org" "Tasks")
"** TODO %?\n%U\n%i\n%a"))) "** TODO %?\n%U\n%i")
("m" "Meeting" entry (file+headline "agenda.org" "Meetings")
"** TODO %?\n%U\n%i\n%a")
;; Email capture
("e" "Email")
("ei" "Email to Inbox" entry (file+headline "agenda.org" "Inbox")
"** TODO %:subject\nFrom: %:fromname <%:fromaddress>\nEmail: %a\n%?")
("et" "Email to Tasks" entry (file+headline "agenda.org" "Tasks")
"** TODO %:subject\nFrom: %:fromname <%:fromaddress>\nEmail: %a\n%?")
("ef" "Email Follow-up" entry (file+headline "agenda.org" "Tasks")
"** TODO Follow up: %:subject\nDEADLINE: %(org-insert-time-stamp (org-read-date nil t \"+2d\"))\nFrom: %:fromname\nEmail: %a\n%?")))
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
'(("n" "Agenda and All Todos" '(("n" "Dashboard"
((agenda) ((tags-todo "+DEADLINE<\"<today>\""
(todo))) ((org-agenda-overriding-header "⚠ Overdue!")))
("w" "Work" agenda "" (agenda "" ((org-agenda-span 'day)
((org-agenda-files '("work.org"))))))) (org-deadline-warning-days 7)
(org-agenda-time-grid nil)
(org-agenda-overriding-header "📅 Today")))
(todo "STARTED"
((org-agenda-overriding-header "🔨 In Progress")))
(todo "WAITING"
((org-agenda-overriding-header "⏳ Waiting")))
(tags-todo "+DEADLINE>=\"<today>\"+DEADLINE<=\"<+7d>\""
((org-agenda-overriding-header "📆 Due This Week")))
(tags-todo "inbox"
((org-agenda-overriding-header "📥 Inbox")))
(agenda "" ((org-agenda-span 7)
(org-agenda-start-day "+1d")
(org-agenda-start-on-weekday nil)
(org-agenda-show-all-dates t)
(org-agenda-time-grid nil)
(org-agenda-overriding-header "📅 Next 7 Days")))
(alltodo ""
((org-agenda-skip-function
'(org-agenda-skip-entry-if 'scheduled 'deadline 'todo '("STARTED" "WAITING")))
(org-agenda-overriding-header "📋 Backlog")))))
("w" "Week View"
((agenda "" ((org-agenda-span 'week)
(org-deadline-warning-days 14)))))
("i" "Inbox" tags-todo "inbox")
("p" "Projects" tags-todo "project"))))
;; =========================
;; Email (mu4e)
;; =========================
(use-package mu4e
:ensure (:host github :repo "djcb/mu"
:files ("mu4e/*.el")
:pre-build (with-temp-file "mu4e/mu4e-config.el"
(insert (format "(defconst mu4e-mu-version %S)\n"
(string-trim (shell-command-to-string "mu --version | head -1 | awk '{print $2}'")))
"(provide 'mu4e-config)\n")))
:defer t
:commands (mu4e mu4e-compose-new)
:bind ("C-c e" . mu4e)
:config
;; Set mu binary path (for Nix)
(setq mu4e-mu-binary (or (executable-find "mu")
"/etc/profiles/per-user/rayandrew/bin/mu"))
;; Enable org-mode link support
(require 'mu4e-org)
;; General settings
(setq mu4e-maildir "~/mail")
(setq mu4e-get-mail-command "~/dotfiles/bin/path-shim mbsync -a")
(setq mu4e-update-interval 180) ;; Update every 3 minutes
(setq mu4e-change-filenames-when-moving t) ;; Required for mbsync
;; Sending mail via msmtp
(setq sendmail-program "msmtp")
(setq send-mail-function 'sendmail-send-it)
(setq message-sendmail-f-is-evil t)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
(setq message-send-mail-function 'message-send-mail-with-sendmail)
;; Don't keep message buffers around
(setq message-kill-buffer-on-exit t)
;; Display settings
(setq mu4e-headers-date-format "%Y-%m-%d")
(setq mu4e-headers-time-format "%H:%M")
(setq mu4e-view-show-addresses t)
(setq mu4e-view-show-images t)
(setq mu4e-compose-dont-reply-to-self t)
;; Prefer plain text over HTML
(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
;; GPG signing (not by default)
(setq mml-secure-openpgp-sign-with-sender t)
(setq mm-sign-option nil) ;; don't sign by default
;; Keybinding to sign message (in compose buffer)
(defun mu4e-compose-sign-message ()
"Sign the current message with GPG."
(interactive)
(mml-secure-message-sign-pgpmime))
(add-hook 'mu4e-compose-mode-hook
(lambda ()
(local-set-key (kbd "C-c C-s") 'mu4e-compose-sign-message)))
;; Keybindings: r for reply, R for reply-all (use hooks to override defaults)
(add-hook 'mu4e-headers-mode-hook
(lambda ()
(local-set-key (kbd "r") 'mu4e-compose-reply)
(local-set-key (kbd "R") 'mu4e-compose-wide-reply)))
(add-hook 'mu4e-view-mode-hook
(lambda ()
(local-set-key (kbd "r") 'mu4e-compose-reply)
(local-set-key (kbd "R") 'mu4e-compose-wide-reply)))
;; Keybinding: e for refile (archive)
(define-key mu4e-headers-mode-map (kbd "e") 'mu4e-headers-mark-for-refile)
(define-key mu4e-view-mode-map (kbd "e") 'mu4e-view-mark-for-refile)
;; t to mark (u to unmark is default)
(define-key mu4e-headers-mode-map (kbd "t") 'mu4e-headers-mark-for-something)
;; T to mark all messages (like neomutt T.)
(defun mu4e-headers-mark-all-for-something ()
"Mark all messages in current view for an action (prompts once)."
(interactive)
(let* ((mark (mu4e-read-option "Mark all as: "
'(("Read" . read)
("Unread" . unread)
("Trash" . trash)
("Delete" . delete)
("Archive" . refile)
("Move" . move)
("Flag" . flag)
("uNflag" . unflag))))
;; For move, prompt for target folder once
(target (when (eq mark 'move)
(mu4e-ask-maildir "Move all to: ")))
(count 0))
(save-excursion
(goto-char (point-min))
;; Find first message
(while (and (not (eobp))
(not (get-text-property (point) 'msg)))
(forward-line 1))
;; Iterate through all messages
(while (not (eobp))
(when (get-text-property (point) 'msg)
(cond
((eq mark 'move)
(mu4e-mark-at-point 'move target))
((eq mark 'refile)
(mu4e-mark-at-point 'refile (mu4e--mark-get-refile-target
(mu4e-message-at-point))))
(t
(mu4e-mark-at-point mark nil)))
(setq count (1+ count)))
(forward-line 1)))
(message "Marked %d messages for %s" count mark)))
(define-key mu4e-headers-mode-map (kbd "T") 'mu4e-headers-mark-all-for-something)
;; Use completing-read (works with vertico)
(setq mu4e-completing-read-function 'completing-read)
;; Contexts for multiple accounts
(setq mu4e-contexts
`(,(make-mu4e-context
:name "uchicago"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/uchicago" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "rayandrew@uchicago.edu")
(user-full-name . "Ray Andrew")
(mu4e-drafts-folder . "/uchicago/Drafts")
(mu4e-sent-folder . "/uchicago/Sent")
(mu4e-trash-folder . "/uchicago/Trash")
(mu4e-refile-folder . "/uchicago/Archive")
(message-sendmail-extra-arguments . ("--read-envelope-from" "-a" "uchicago"))))
,(make-mu4e-context
:name "personal"
:match-func (lambda (msg)
(when msg
(string-prefix-p "/personal" (mu4e-message-field msg :maildir))))
:vars '((user-mail-address . "raydreww@gmail.com")
(user-full-name . "Ray Andrew")
(mu4e-drafts-folder . "/personal/[Gmail]/Drafts")
(mu4e-sent-folder . "/personal/[Gmail]/Sent Mail")
(mu4e-trash-folder . "/personal/[Gmail]/Trash")
(mu4e-refile-folder . "/personal/Archive")
(message-sendmail-extra-arguments . ("--read-envelope-from" "-a" "personal"))))))
;; Set default context
(setq mu4e-context-policy 'pick-first)
(setq mu4e-compose-context-policy 'ask-if-none)
;; Bookmarks
(setq mu4e-bookmarks
'((:name "Unread messages" :query "flag:unread AND NOT flag:trashed" :key ?u)
(:name "Today's messages" :query "date:today..now" :key ?t)
(:name "Last 7 days" :query "date:7d..now" :key ?w)
(:name "UChicago Inbox" :query "maildir:/uchicago/Inbox" :key ?i)
(:name "Personal Inbox" :query "maildir:/personal/Inbox" :key ?p))))
(use-package wakatime-mode (use-package wakatime-mode
:config :config

View file

@ -1,3 +1,4 @@
*.db *.db
auto.config auto.config
*.txt *.txt
prefs_user.config

177
docs/emacs.md Normal file
View file

@ -0,0 +1,177 @@
# Emacs Configuration
## Notes & Org
### Directory Structure
- `~/NPersonal/agenda.org` - All tasks (Inbox, Tasks, Meetings)
- `~/NPersonal/archive.org` - Completed/archived items
- `~/NPersonal/*.md` - Denote markdown notes
### agenda.org Structure
```org
* Inbox <- quick captures
* Tasks <- organized tasks
* Meetings <- meetings
```
### Org Agenda
| Key | Action |
|-----|--------|
| `C-c a` | Open agenda dispatcher |
| `C-c c` | Capture (quick note/todo) |
#### In Agenda View
| Key | Action |
|-----|--------|
| `n` / `p` | Next / previous item |
| `t` | Cycle TODO state |
| `RET` | Go to item |
| `q` | Quit agenda |
### Org Mode
| Key | Action |
|-----|--------|
| `C-c C-t` | Cycle TODO state |
| `C-c C-s` | Schedule |
| `C-c C-d` | Set deadline |
| `C-c C-w` | Refile to another file/heading |
| `C-c C-x C-a` | Archive subtree |
| `C-c l s` | Store link |
| `C-c l i` | Insert link |
### Capture Templates (`C-c c`)
| Key | Action |
|-----|--------|
| `c` | Quick capture to Inbox |
| `r` | Capture with reference |
| `t` | Task |
| `m` | Meeting |
| `e i` | Email to Inbox |
| `e t` | Email to Tasks |
| `e f` | Email follow-up with deadline |
### Denote (Markdown Notes)
Notes are saved as: `20241226T123456--title__keyword1_keyword2.md`
| Key | Action |
|-----|--------|
| `C-c n n` | Create new note |
| `C-c n f` | Find or create note |
| `C-c n i` | Insert link to note |
| `C-c n l` | Show backlinks |
| `C-c n r` | Rename file |
| `C-c n k` | Add keyword |
| `C-c n K` | Remove keyword |
| `C-c n b` | Backlinks for org heading |
| `C-c n h` | Link to org heading |
### Archive
Completed tasks go to `archive.org` under `* Archived` heading.
- `C-c C-x C-a` - Archive current subtree
- `C-c C-w` then select `archive.org` - Refile to archive
---
## Email (mu4e)
### Launch
| Key | Action |
|-----|--------|
| `C-c e` | Open mu4e |
### Main View
| Key | Action |
|-----|--------|
| `U` | Update mail (run mbsync) |
| `j` | Jump to maildir |
| `s` | Search |
| `b` | Bookmarks |
| `C` | Compose new message |
| `;` | Switch context (account) |
| `q` | Quit mu4e |
### Headers View (Message List)
| Key | Action |
|-----|--------|
| `n` / `p` | Next / previous message |
| `RET` | View message |
| `d` | Mark for trash |
| `D` | Mark for delete |
| `t` | Mark for action (prompts) |
| `u` | Unmark |
| `m` | Move to folder |
| `e` | Refile (archive) |
| `+` / `-` | Mark / unmark flag |
| `!` | Mark as read |
| `?` | Mark as unread |
| `r` | Reply |
| `R` | Reply all |
| `F` | Forward |
| `x` | Execute marked actions |
| `U` | Unmark all |
| `%` | Mark by pattern |
| `T` | Mark thread |
| `g` | Rerun search |
| `q` | Quit to main view |
### Message View
| Key | Action |
|-----|--------|
| `n` / `p` | Next / previous message |
| `SPC` / `DEL` | Scroll down / up |
| `r` | Reply |
| `R` | Reply all |
| `F` | Forward |
| `o` | Open attachment |
| `e` | Save attachment |
| `a` | View action (open in browser, etc.) |
| `#` | Toggle citation folding |
| `.` | Raw view |
| `h` | Toggle headers |
| `q` | Return to headers |
### Compose
| Key | Action |
|-----|--------|
| `C-c C-c` | Send message |
| `C-c C-k` | Kill (discard) message |
| `C-c C-d` | Save as draft |
| `C-c C-a` | Attach file |
| `C-c C-s` | GPG sign message |
| `C-c C-e` | GPG encrypt message |
### Bookmarks (from main view, press `b`)
| Key | Action |
|-----|--------|
| `u` | Unread messages |
| `t` | Today's messages |
| `w` | Last 7 days |
| `i` | UChicago Inbox |
| `p` | Personal Inbox |
### Search Tips
- `from:john` - messages from john
- `to:jane` - messages to jane
- `subject:meeting` - subject contains meeting
- `flag:unread` - unread messages
- `flag:attach` - messages with attachments
- `date:today..now` - today's messages
- `date:7d..now` - last 7 days
- `maildir:/uchicago/Inbox` - specific maildir
- `AND`, `OR`, `NOT` - boolean operators

View file

@ -3,6 +3,7 @@
lib, lib,
config, config,
dots, dots,
home-dir,
xdg-config-dir, xdg-config-dir,
... ...
}: }:
@ -14,6 +15,7 @@
mbsync = mkEnableOption "Enable Mbsync"; mbsync = mkEnableOption "Enable Mbsync";
neomutt = mkEnableOption "Enable NeoMutt"; neomutt = mkEnableOption "Enable NeoMutt";
notmuch = mkEnableOption "Enable notmuch"; notmuch = mkEnableOption "Enable notmuch";
mu = mkEnableOption "Enable mu (maildir-utils)";
mailcap = mkEnableOption "Enable mailcap"; mailcap = mkEnableOption "Enable mailcap";
}; };
@ -33,8 +35,26 @@
enable = config.custom.email.mbsync; enable = config.custom.email.mbsync;
configFile = "${dots}/config/mbsync/mbsyncrc"; configFile = "${dots}/config/mbsync/mbsyncrc";
frequency = "*:0/3"; frequency = "*:0/3";
extraPackages = with pkgs; [ sops ] ++ lib.optionals config.custom.email.notmuch [ notmuch ]; extraPackages =
postExec = lib.mkIf config.custom.email.notmuch "${pkgs.notmuch}/bin/notmuch new"; with pkgs;
[ sops ]
++ lib.optionals config.custom.email.notmuch [ notmuch ]
++ lib.optionals config.custom.email.mu [ mu ];
postExec =
let
notmuchCmd = lib.optionalString config.custom.email.notmuch "${pkgs.notmuch}/bin/notmuch new";
muCmd = lib.optionalString config.custom.email.mu ''
# Initialize mu if not already done
if [ ! -d "${home-dir}/.cache/mu" ] && [ ! -d "${home-dir}/.mu" ]; then
${pkgs.mu}/bin/mu init --maildir=${home-dir}/mail --my-address=rayandrew@uchicago.edu --my-address=raydreww@gmail.com
fi
${pkgs.mu}/bin/mu index
'';
in
lib.mkIf (config.custom.email.notmuch || config.custom.email.mu) ''
${notmuchCmd}
${muCmd}
'';
environment = { environment = {
SOPS_AGE_KEY_FILE = "${xdg-config-dir}/sops/age/keys.txt"; SOPS_AGE_KEY_FILE = "${xdg-config-dir}/sops/age/keys.txt";
} }
@ -61,6 +81,9 @@
++ lib.optionals config.custom.email.notmuch [ ++ lib.optionals config.custom.email.notmuch [
notmuch notmuch
] ]
++ lib.optionals config.custom.email.mu [
mu
]
++ lib.optionals config.custom.email.mailcap [ ++ lib.optionals config.custom.email.mailcap [
mailcap mailcap
w3m # HTML rendering w3m # HTML rendering
@ -88,11 +111,11 @@
# Create mail directories # Create mail directories
home.activation.createMailDirs = lib.hm.dag.entryAfter [ "writeBoundary" ] '' home.activation.createMailDirs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p ~/mail/personal/Inbox mkdir -p ${home-dir}/mail/personal/Inbox
mkdir -p ~/mail/uchicago/Inbox mkdir -p ${home-dir}/mail/uchicago/Inbox
mkdir -p ~/.cache/neomutt/headers mkdir -p ${home-dir}/.cache/neomutt/headers
mkdir -p ~/.cache/neomutt/messages mkdir -p ${home-dir}/.cache/neomutt/messages
mkdir -p ~/.local/state mkdir -p ${home-dir}/.local/state
''; '';
# Set NOTMUCH_CONFIG environment variable # Set NOTMUCH_CONFIG environment variable

View file

@ -64,41 +64,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
qutebrowser qutebrowser
]; ];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
show-battery-percentage = true;
clock-format = "12h";
};
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
};
qt = {
enable = true;
style = {
name = "adwaita-dark";
};
};
}) })
(lib.mkIf config.custom.gui.vscode.enable { (lib.mkIf config.custom.gui.vscode.enable {
@ -138,11 +103,45 @@
}) })
(lib.mkIf config.custom.gui.darwin.enable { (lib.mkIf config.custom.gui.darwin.enable {
home.packages = with pkgs; [ home.packages = [ ];
];
}) })
(lib.mkIf config.custom.gui.linux.enable { (lib.mkIf config.custom.gui.linux.enable {
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
show-battery-percentage = true;
clock-format = "12h";
};
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
};
qt = {
enable = true;
style = {
name = "adwaita-dark";
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
zotero zotero
zoom-us zoom-us

View file

@ -44,6 +44,7 @@
nixfmt-rfc-style nixfmt-rfc-style
fd fd
fx fx
ijq
jq jq
sd sd
ugrep ugrep

View file

@ -111,6 +111,7 @@
mbsync = true; mbsync = true;
mailcap = true; mailcap = true;
notmuch = true; notmuch = true;
mu = true;
}; };
}; };
} }