Initial dotfiles commit

Laptop config: zsh, emacs (with WSL detection for work), ghostty, tmux, ranger,
newsboat, neomutt + mbsync + msmtp (Outlook OAuth2), neomutt signature.
Work config: emacs with C#/TS/JS/CSS/HTML dev settings for WSL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 14:39:23 -04:00
commit a0abf9705f
18 changed files with 945 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
;;; common-dev-settings.el --- Dev tooling shared across all hosts
;;; Completion
(use-package company
:defer 1
:config
(global-company-mode)
(setq company-idle-delay 0.2
company-minimum-prefix-length 2
company-show-numbers t
company-tooltip-align-annotations t))
;;; LSP
(use-package eglot
:ensure nil
:defer t
:commands (eglot eglot-ensure)
:config
(setq eglot-autoshutdown t
eglot-send-changes-idle-time 0.5)
(setq eldoc-echo-area-use-multiline-p nil)
(add-to-list 'eglot-stay-out-of 'eldoc))
;;; Tree-sitter mode management
;; Grammar sources and installation are host-specific; see dev-settings.el.
(use-package treesit-auto
:custom
(treesit-auto-install 'prompt)
:config
(treesit-auto-add-to-auto-mode-alist 'all)
(global-treesit-auto-mode))
;;; Utilities
(use-package helpful
:defer t
:commands (helpful-callable helpful-variable helpful-key))
(use-package smartparens
:defer 1
:hook (prog-mode . smartparens-mode)
:config
(require 'smartparens-config))
(use-package yasnippet
:defer 2
:config
(yas-global-mode 1))
(use-package yasnippet-snippets
:defer t
:after yasnippet)
;;; Emacs Lisp
(add-hook 'emacs-lisp-mode-hook #'eldoc-mode)
(add-hook 'emacs-lisp-mode-hook #'company-mode)
;;; LSP Keybindings
(with-eval-after-load 'eglot
(keymap-set eglot-mode-map "C-c l d" #'xref-find-definitions)
(keymap-set eglot-mode-map "C-c l r" #'xref-find-references)
(keymap-set eglot-mode-map "C-c l i" #'eglot-find-implementation)
(keymap-set eglot-mode-map "C-c l t" #'eglot-find-typeDefinition)
(keymap-set eglot-mode-map "C-c l h" #'eldoc-doc-buffer)
(keymap-set eglot-mode-map "C-c l s" #'eldoc)
(keymap-set eglot-mode-map "C-c l a" #'eglot-code-actions)
(keymap-set eglot-mode-map "C-c l n" #'eglot-rename)
(keymap-set eglot-mode-map "C-c l e" #'flymake-show-buffer-diagnostics)
(keymap-set eglot-mode-map "C-c l f" #'eglot-format-buffer))
(provide 'common-dev-settings)
;;; common-dev-settings.el ends here

View File

@@ -0,0 +1,87 @@
;;; dev-settings.el --- Laptop development environment
;;; DAP Mode
(use-package dap-mode
:defer t
:commands (dap-mode dap-debug)
:config
(require 'dap-gdb-lldb)
(require 'dap-cpptools))
;;; C / C++
(use-package c-ts-mode
:ensure nil
:mode (("\\.c\\'" . c-ts-mode)
("\\.h\\'" . c-ts-mode)
("\\.cpp\\'" . c++-ts-mode)
("\\.hpp\\'" . c++-ts-mode)
("\\.cc\\'" . c++-ts-mode)
("\\.cxx\\'" . c++-ts-mode))
:hook ((c-ts-mode . eglot-ensure)
(c++-ts-mode . eglot-ensure))
:config
(setq c-ts-mode-indent-offset 4))
;;; Go
(use-package go-ts-mode
:ensure nil
:mode "\\.go\\'"
:hook (go-ts-mode . eglot-ensure)
:config
(setq go-ts-mode-indent-offset 4))
(with-eval-after-load 'dap-mode
(require 'dap-dlv-go))
;;; Rust
(use-package rust-ts-mode
:ensure nil
:mode "\\.rs\\'"
:hook (rust-ts-mode . eglot-ensure)
:config
(setq rust-ts-mode-indent-offset 4))
;; rust-analyzer is installed via: rustup component add rust-analyzer
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(rust-ts-mode . ("rust-analyzer"))))
;;; Common Lisp
(use-package slime
:defer t
:commands slime
:config
(setq inferior-lisp-program "sbcl")
(setq slime-contribs '(slime-fancy slime-company))
(setq slime-lisp-implementations
'((sbcl ("sbcl") :coding-system utf-8-unix)
(ccl ("ccl") :coding-system utf-8-unix))))
(use-package slime-company
:defer t
:after (slime company)
:config
(setq slime-company-completion 'fuzzy))
;;; DAP Keybindings
(with-eval-after-load 'dap-mode
(keymap-set dap-mode-map "C-c d d" #'dap-debug)
(keymap-set dap-mode-map "C-c d b" #'dap-breakpoint-toggle)
(keymap-set dap-mode-map "C-c d c" #'dap-continue)
(keymap-set dap-mode-map "C-c d n" #'dap-next)
(keymap-set dap-mode-map "C-c d i" #'dap-step-in)
(keymap-set dap-mode-map "C-c d o" #'dap-step-out)
(keymap-set dap-mode-map "C-c d r" #'dap-restart-frame)
(keymap-set dap-mode-map "C-c d q" #'dap-disconnect)
(keymap-set dap-mode-map "C-c d e" #'dap-eval)
(keymap-set dap-mode-map "C-c d l" #'dap-ui-locals)
(keymap-set dap-mode-map "C-c d s" #'dap-ui-sessions))
(provide 'dev-settings)
;;; dev-settings.el ends here

View File

@@ -0,0 +1,168 @@
;; init.el
(defun rh/load-user-file (file)
"Load FILE from `user-emacs-directory' when it exists."
(let ((path (expand-file-name file user-emacs-directory)))
(when (file-exists-p path)
(load path nil 'nomessage))))
;;; Startup/UI ---------------------------------------------------------------
(setq inhibit-startup-message t
visible-bell t)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(tooltip-mode -1)
(menu-bar-mode -1)
;;; Editing Defaults ---------------------------------------------------------
(global-display-line-numbers-mode 1)
(setq display-line-numbers-type 'relative)
(setq make-backup-files nil
auto-save-default nil
create-lockfiles nil)
(setq vc-follow-symlinks t
find-file-visit-truename t)
;;; Package Manager ----------------------------------------------------------
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
;;; Style/Theme --------------------------------------------------------------
(use-package catppuccin-theme
:init
(setq catppuccin-flavor 'mocha)
:config
(load-theme 'catppuccin t))
;; Icons are only useful in GUI Emacs.
(use-package all-the-icons
:if (display-graphic-p))
;; Color nested delimiters in programming buffers.
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package doom-modeline
:init
(doom-modeline-mode 1)
:config
(setq doom-modeline-height 15))
;;; Completion/Search/Navigation ---------------------------------------------
(use-package vertico
:init
(vertico-mode))
(use-package consult
:bind (("C-x b" . consult-buffer)
("C-s" . consult-line)
("M-y" . consult-yank-pop)))
(use-package orderless
:config
(setq completion-styles '(orderless basic)
completion-category-defaults nil))
(use-package marginalia
:init
(marginalia-mode))
(use-package embark
:bind (("C-." . embark-act)
("M-." . embark-dwim)))
(use-package embark-consult
:after (embark consult))
(use-package which-key
:init
(which-key-mode)
:config
(setq which-key-idle-delay 1))
;;; Key Bindings -------------------------------------------------------------
;; Make ESC quit prompts.
(global-set-key (kbd "<escape>") #'keyboard-escape-quit)
;; windmove: S-Arrow to move between windows (built-in since Emacs 27).
(windmove-default-keybindings)
;;; Projects -----------------------------------------------------------------
(use-package projectile
:init
(when (file-directory-p "~/src")
(setq projectile-project-search-path '("~/src")))
(setq projectile-switch-project-action #'projectile-dired)
:config
(projectile-mode 1)
:bind-keymap
("C-c p" . projectile-command-map))
(use-package consult-projectile
:bind (("C-c h" . consult-projectile)))
;;; Git ----------------------------------------------------------------------
(use-package magit
:commands (magit-status magit-get-current-branch)
:bind (("C-x g" . magit-status)
("C-x M-g" . magit-dispatch)
("C-c M-g" . magit-file-dispatch))
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
(magit-diff-refine-hunk t)
(magit-auto-revert-mode nil)
(magit-process-find-password-functions '(magit-process-password-auth-source)))
;;; Org ----------------------------------------------------------------------
(defun rh/org-mode-setup ()
(org-indent-mode)
(visual-line-mode 1))
(use-package org
:hook (org-mode . rh/org-mode-setup)
:config
(setq org-agenda-files
(if (file-directory-p "~/org")
(directory-files-recursively "~/org" "\\.org$")
nil)))
(defun rh/wsl-p ()
(and (eq system-type 'gnu/linux)
(file-exists-p "/proc/version")
(with-temp-buffer
(insert-file-contents "/proc/version")
(string-match-p "microsoft" (buffer-string)))))
(rh/load-user-file "org-bindings.el")
(rh/load-user-file "common-dev-settings.el")
(if (rh/wsl-p)
(rh/load-user-file "work-dev-settings.el")
(rh/load-user-file "dev-settings.el"))
(rh/load-user-file "latex-settings.el")
(rh/load-user-file "custom.el")

View File

@@ -0,0 +1,34 @@
;;; latex-settings.el --- AUCTeX / LaTeX configuration
(use-package auctex
:defer t
:init
(setq TeX-auto-save t ; cache style info in auto/ for faster opens
TeX-parse-self t ; parse document on open for completions
TeX-PDF-mode t ; compile to PDF by default
TeX-source-correlate-mode t ; SyncTeX: link editor positions to PDF
TeX-source-correlate-start-server t)
:hook
((LaTeX-mode . LaTeX-math-mode)
(LaTeX-mode . flyspell-mode)
(LaTeX-mode . reftex-mode))
:config
(setq reftex-plug-into-AUCTeX t)
;; Use zathura as the PDF viewer (SyncTeX: click in PDF jumps to source line)
(add-to-list 'TeX-view-program-selection '(output-pdf "Zathura"))
;; LatexMk handles multiple pdflatex passes, bibliography, index automatically
(add-to-list 'TeX-command-list
'("LatexMk" "latexmk -pdf -interaction=nonstopmode %s"
TeX-run-TeX nil t :help "Run latexmk"))
(setq TeX-command-default "LatexMk")
(defun rh/latex-build-pdf ()
"Compile the current LaTeX buffer to PDF using latexmk."
(interactive)
(TeX-command "LatexMk" #'TeX-master-file))
(with-eval-after-load 'latex
(define-key LaTeX-mode-map (kbd "C-c C-b") #'rh/latex-build-pdf)))
(provide 'latex-settings)
;;; latex-settings.el ends here

View File

@@ -0,0 +1,35 @@
;;; org-bindings.el --- Standard Emacs keybindings for Org mode
(with-eval-after-load 'org
;; Org agenda and capture
(global-set-key (kbd "C-c o a") 'org-agenda)
(global-set-key (kbd "C-c o c") 'org-capture)
;; Link commands
(define-key org-mode-map (kbd "C-c o l") 'org-store-link)
(define-key org-mode-map (kbd "C-c o i") 'org-insert-link)
;; TODO and scheduling
(define-key org-mode-map (kbd "C-c o t") 'org-todo)
(define-key org-mode-map (kbd "C-c o s") 'org-schedule)
(define-key org-mode-map (kbd "C-c o d") 'org-deadline)
(define-key org-mode-map (kbd "C-c o T") 'org-time-stamp)
(define-key org-mode-map (kbd "C-c o p") 'org-priority)
;; Checkboxes and lists
(define-key org-mode-map (kbd "C-c o x") 'org-toggle-checkbox)
(define-key org-mode-map (kbd "C-c o -") 'org-ctrl-c-minus)
;; Refile
(define-key org-mode-map (kbd "C-c o r") 'org-refile))
;; Theme selection
(global-set-key (kbd "C-c t t") 'consult-theme)
;; Text scaling with standard Emacs bindings
(global-set-key (kbd "C-x C-=") 'text-scale-increase)
(global-set-key (kbd "C-x C--") 'text-scale-decrease)
(global-set-key (kbd "C-x C-0") 'text-scale-adjust)
(provide 'org-bindings)
;;; org-bindings.el ends here

View File

@@ -0,0 +1,15 @@
font-family = Hack Nerd Font Mono
font-size = 11
theme = "Catppuccin Mocha"
cursor-style = block
# Unbind alt+number tab switching so weechat can use them
keybind = alt+one=unbind
keybind = alt+two=unbind
keybind = alt+three=unbind
keybind = alt+four=unbind
keybind = alt+five=unbind
keybind = alt+six=unbind
keybind = alt+seven=unbind
keybind = alt+eight=unbind
keybind = alt+nine=unbind

25
laptop/.config/isyncrc Normal file
View File

@@ -0,0 +1,25 @@
IMAPAccount outlook
Host outlook.office365.com
Port 993
User robharbaugh@outlook.com
AuthMechs XOAUTH2
PassCmd "python3 /usr/share/neomutt/oauth2/mutt_oauth2.py ~/.config/neomutt/outlook.tokens --decryption-pipe 'gpg --decrypt'"
TLSType IMAPS
CertificateFile /etc/ssl/certs/ca-bundle.crt
IMAPStore outlook-remote
Account outlook
MaildirStore outlook-local
SubFolders Verbatim
Path ~/mail/outlook/
Inbox ~/mail/outlook/Inbox/
Channel outlook
Far :outlook-remote:
Near :outlook-local:
Patterns * !Junk !Deleted
Create Near
Sync All
Expunge Near
SyncState *

View File

@@ -0,0 +1,14 @@
defaults
auth xoauth2
tls on
tls_trust_file /etc/ssl/certs/ca-bundle.crt
logfile ~/.local/share/msmtp/msmtp.log
account outlook
host smtp.office365.com
port 587
tls_starttls on
user robharbaugh@outlook.com
passwordeval python3 /usr/share/neomutt/oauth2/mutt_oauth2.py ~/.config/neomutt/outlook.tokens --decryption-pipe 'gpg --decrypt'
account default : outlook

View File

@@ -0,0 +1,15 @@
set realname = "Rob Harbaugh"
set from = "robharbaugh@outlook.com"
set mbox_type = Maildir
set folder = ~/mail/outlook
set spoolfile = +Inbox
set postponed = +Drafts
set trash = +Trash
set signature = ~/.config/neomutt/signature
set sendmail = "/usr/bin/msmtp"
set envelope_from = yes
set sendmail_wait = 0
mailboxes =Inbox =Drafts =Sent =Archive =Trash =Church =Family =House =Work =Notes

View File

@@ -0,0 +1,90 @@
# neomuttrc — Catppuccin Mocha
# Account-specific config (mailboxes, IMAP, SMTP) goes in a separate sourced file.
source ~/.config/neomutt/accounts/personal
# Editor
set editor = "emacsclient -c"
# Reading
set pager_stop # don't advance to next message at end of pager
set markers = no # no + marker on wrapped lines
set mark_old = no # unread is unread until explicitly read
set mime_forward = yes
set forward_format = "Fwd: %s"
set forward_quote
set fast_reply # skip to compose when replying
# Sorting
set sort = threads
set sort_aux = reverse-last-date-received
set uncollapse_jump
# Sidebar
set sidebar_visible = yes
set sidebar_width = 28
set sidebar_format = "%B%* %?N?%N/?%S"
set mail_check_stats
# Pager
set pager_index_lines = 10 # show index at top of pager
alternative_order text/plain text/enriched text/html
auto_view text/html
# notmuch integration
set nm_default_url = "notmuch:////$HOME/mail"
# Colors — Catppuccin Mocha
# Palette reference (256-color):
# base=235 mantle=234 surface0=237 surface1=238 surface2=240
# overlay0=242 text=189 subtext1=182 blue=111 green=150
# yellow=223 red=211 mauve=183 teal=116 peach=216 lavender=147
# Normal text
color normal color189 color235
color error bold color211 color235
color tilde color242 color235
color message color223 color235
color markers bold color216 color235
color attachment color183 color235
color search bold color235 color183
color status bold color189 color237
color indicator bold color235 color111
color tree color111 color235
# Header
color hdrdefault color182 color235
color header bold color111 color235 "^(From|To|Cc|Bcc):"
color header bold color183 color235 "^Subject:"
color header color116 color235 "^Date:"
# Index
color index color189 color235 "~A" # all
color index bold color111 color235 "~N" # new
color index color150 color235 "~P" # from me
color index color211 color235 "~D" # deleted
color index color242 color235 "~R" # read
color index color223 color235 "~F" # flagged
color index bold color183 color235 "~T" # tagged
# Sidebar
color sidebar_ordinary color182 color235
color sidebar_new bold color111 color235
color sidebar_unread color111 color235
color sidebar_flagged bold color223 color235
color sidebar_highlight bold color235 color111
color sidebar_indicator bold color235 color183
color sidebar_divider color238 color235
# Quote levels
color quoted color111 color235
color quoted1 color183 color235
color quoted2 color150 color235
color quoted3 color116 color235
color quoted4 color223 color235
# URLs
color body underline color111 color235 "(https?|ftp)://[^ >]*"
color body underline color111 color235 "<[^ ]+@[^ ]+>"
# Sidebar toggle
bind index,pager B sidebar-toggle-visible

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,37 @@
# newsboat config — Catppuccin Mocha
# Behaviour
auto-reload yes
reload-time 60
reload-threads 4
show-read-feeds yes
confirm-exit yes
scrolloff 5
# Article view
browser xdg-open
text-width 80
bind-key R reload-all feedlist
# Colors — Catppuccin Mocha (256-color)
# base=235 mantle=234 surface0=237 surface1=238 overlay0=242
# text=189 subtext1=182 blue=111 green=150 yellow=223 red=211 mauve=183 teal=116
color background color189 color235
color listnormal color189 color235
color listnormal_unread color111 color235 bold
color listfocus color235 color111 bold
color listfocus_unread color235 color183 bold
color info color223 color237 bold
color article color189 color235
# Highlight article headers
highlight article "^Feed:.*" color111 color235 bold
highlight article "^Title:.*" color183 color235 bold
highlight article "^Author:.*" color150 color235
highlight article "^Date:.*" color116 color235
highlight article "^Link:.*" color111 color235 underline
highlight article "^Flags:.*" color223 color235
highlight article "\\[image.*\\]" color183 color235 bold
highlight article "\\[video.*\\]" color216 color235 bold

View File

@@ -0,0 +1,166 @@
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *
# Catppuccin Mocha — 256-color approximations
rosewater = 224
flamingo = 217
pink = 218
mauve = 183
red = 211
maroon = 217
peach = 216
yellow = 223
green = 150
teal = 116
sky = 117
sapphire = 110
blue = 111
lavender = 147
text = 189
subtext1 = 182
subtext0 = 146
overlay2 = 103
overlay1 = 244
overlay0 = 242
surface2 = 240
surface1 = 238
surface0 = 237
base = 235
mantle = 234
crust = 233
class Default(ColorScheme):
progress_bar_color = blue
def use(self, context):
fg, bg, attr = default_colors
if context.reset:
return default_colors
elif context.in_browser:
fg = text
if context.selected:
attr = reverse
else:
attr = normal
if context.empty or context.error:
fg = red
attr = bold
if context.border:
fg = overlay0
bg = default
if context.media:
fg = mauve if context.image else flamingo
if context.container:
fg = red
attr = bold
if context.directory:
attr = bold
fg = blue
elif context.executable and not any((
context.media, context.container,
context.fifo, context.socket)):
attr = bold
fg = green
if context.socket:
fg = yellow
attr = bold
if context.fifo or context.device:
fg = peach
if context.device:
attr = bold
if context.link:
fg = teal if context.good else red
if context.tag_marker and not context.selected:
attr = bold
fg = red if context.tag in 'Rr' else yellow
if not context.selected and context.cut:
attr = bold
fg = red
if not context.selected and context.copied:
attr = bold
fg = yellow
if context.main_column:
if context.selected:
attr = bold
if context.marked:
attr = bold | reverse
fg = yellow
if context.badinfo:
fg = red if not (attr & reverse) else default
if attr & reverse:
bg = red
elif context.text:
if context.highlight:
attr = reverse
elif context.in_titlebar:
fg = subtext1
if context.hostname:
attr = bold
fg = red if context.bad else green
elif context.directory:
fg = blue
elif context.tab:
if context.good:
bg = green
fg = base
elif context.link:
fg = teal
elif context.in_statusbar:
fg = text
if context.permissions:
fg = teal if context.good else red
if context.marked:
attr = bold | reverse
fg = yellow
if context.message:
if context.bad:
attr = bold
fg = red
if context.loaded:
bg = self.progress_bar_color
fg = base
if context.vcsinfo:
attr = bold
fg = blue
if context.vcscommit:
attr = bold
fg = yellow
if context.vcsdate:
attr = bold
fg = teal
if context.vcsfile and not context.selected:
attr = normal
if context.vcschanged:
fg = red
elif context.vcsunknown:
fg = red
elif context.vcsstaged:
fg = green
elif context.vcsnewfile:
fg = yellow
elif context.vcsrenamed:
fg = blue
elif context.vcsignored:
fg = overlay0
elif context.vcsremote and not context.selected:
attr = normal
if context.vcssync:
fg = green
elif context.vcsbehind:
fg = red
elif context.vcsahead:
fg = blue
elif context.vcsdiverged:
fg = red
elif context.vcsunknown:
fg = red
return fg, bg, attr

View File

@@ -0,0 +1,11 @@
set colorscheme catppuccin
set preview_images true
set preview_images_method kitty
set unicode_ellipsis true
set show_hidden false
set confirm_on_delete multiple
set use_preview_script true
set automatically_count_files true
set open_all_images true
set vcs_aware true
set vcs_backend_git enabled

View File

@@ -0,0 +1,55 @@
# tmux.conf — keybindings mirror emacs window/windmove conventions
# Emacs-style splits (mirrors C-x 2 / C-x 3)
unbind '"'
unbind %
bind 2 split-window -v -c "#{pane_current_path}" # horizontal split (below)
bind 3 split-window -h -c "#{pane_current_path}" # vertical split (right)
# Emacs-style close (mirrors C-x 0 / C-x 1)
bind 0 kill-pane
bind 1 kill-pane -a
# Emacs-style cycle (mirrors C-x o)
bind o select-pane -t :.+
# Pane navigation: prefix+Arrow everywhere, M-S-Arrow without prefix
bind Left select-pane -L
bind Right select-pane -R
bind Up select-pane -U
bind Down select-pane -D
bind -n M-S-Left select-pane -L
bind -n M-S-Right select-pane -R
bind -n M-S-Up select-pane -U
bind -n M-S-Down select-pane -D
# Copy mode with emacs keys
set-window-option -g mode-keys emacs
# General
set -g mouse on
set -g history-limit 10000
set -sg escape-time 0 # no delay for escape — important for emacs
set -g focus-events on
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',*:Tc' # true color passthrough
set -g xterm-keys on # pass modified keys (S-Arrow etc.) to inner apps
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
# Status bar — catppuccin mocha
set -g status-style "bg=#1e1e2e fg=#cdd6f4"
set -g status-left "#[fg=#89b4fa,bold] #S "
set -g status-right "#[fg=#a6e3a1]#H #[fg=#cdd6f4]%H:%M "
set -g status-left-length 30
set -g window-status-format "#[fg=#6c7086] #I #W "
set -g window-status-current-format "#[fg=#cdd6f4,bold] #I #W "
set -g pane-border-style "fg=#313244"
set -g pane-active-border-style "fg=#89b4fa"
set -g message-style "bg=#313244 fg=#cdd6f4"

5
laptop/.zshenv Normal file
View File

@@ -0,0 +1,5 @@
export BROWSER=firefox
export EDITOR="emacsclient -t -a \"\""
export VISUAL="emacsclient -c -a \"\""
export TERMINAL=ghostty
export MAILER=neomutt

48
laptop/.zshrc Normal file
View File

@@ -0,0 +1,48 @@
# Completion
autoload -Uz compinit
compinit
# History
HISTSIZE=1000
SAVEHIST=1000
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh_history"
mkdir -p "$(dirname "$HISTFILE")"
setopt HIST_FCNTL_LOCK HIST_IGNORE_DUPS HIST_IGNORE_SPACE SHARE_HISTORY
unsetopt HIST_IGNORE_ALL_DUPS HIST_EXPIRE_DUPS_FIRST EXTENDED_HISTORY
# Prompt: blue host+path, then green λ (success) or red ? (failure)
PROMPT="%F{blue}%m %~%b"$'\n'"%(?.%F{green}%Bλ%b |.%F{red}?) %f"
# PATH
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$PATH"
# Aliases
alias e="emacsclient -t -a \"\""
alias mbsync="mbsync -a"
alias c="clear"
alias cat="bat --paging=never --style=plain"
alias cp="cp -riv"
alias ls="eza -al --icons"
alias mkdir="mkdir -vp"
alias mv="mv -iv"
alias rm="rm -rifv"
alias tree="eza --tree --icons"
# Compilation aliases (debug build / optimized build)
alias g++="g++ -ggdb -pedantic-errors -Wall -Weffc++ -Wextra -Wconversion -Wsign-conversion -std=c++23"
alias 'g+++'="g++ -O2 -DNDEBUG -pedantic-errors -Wall -Weffc++ -Wextra -Wconversion -Wsign-conversion -std=c++23"
alias gcc="gcc -ggdb -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion -std=c23"
alias gccc="g++ -O2 -DNDEBUG -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion -std=c23"
# Named directory shortcuts
hash -d dots="$HOME/.dotfiles"
hash -d src="$HOME/src"
# Load SSH keys
eval "$(keychain --eval --quiet --gpg A40B4F53 github git)"
# direnv hook
eval "$(direnv hook zsh)"
echo -ne '\e[1 q'

View File

@@ -0,0 +1,62 @@
;;; work-dev-settings.el --- Work/WSL development environment
;;; C#
;; LSP server: dotnet tool install -g csharp-ls
(use-package csharp-ts-mode
:ensure nil
:mode "\\.cs\\'"
:hook (csharp-ts-mode . eglot-ensure))
;;; TypeScript / TSX
(use-package typescript-ts-mode
:ensure nil
:mode (("\\.ts\\'" . typescript-ts-mode)
("\\.tsx\\'" . tsx-ts-mode))
:hook ((typescript-ts-mode . eglot-ensure)
(tsx-ts-mode . eglot-ensure)))
;;; JavaScript / JSX
;; typescript-language-server handles JS too; install via: npm i -g typescript-language-server typescript
(use-package js-ts-mode
:ensure nil
:mode (("\\.js\\'" . js-ts-mode)
("\\.mjs\\'" . js-ts-mode)
("\\.cjs\\'" . js-ts-mode)
("\\.jsx\\'" . js-ts-mode))
:hook (js-ts-mode . eglot-ensure)
:config
(setq js-indent-level 2))
;;; CSS
;; LSP server: npm i -g vscode-langservers-extracted
(use-package css-ts-mode
:ensure nil
:mode "\\.css\\'"
:hook (css-ts-mode . eglot-ensure)
:config
(setq css-indent-offset 2))
;;; HTML
;; LSP server: npm i -g vscode-langservers-extracted
(use-package html-ts-mode
:ensure nil
:mode (("\\.html\\'" . html-ts-mode)
("\\.htm\\'" . html-ts-mode))
:hook (html-ts-mode . eglot-ensure))
;;; Prettier (formatting for JS/TS/CSS/HTML)
(use-package prettier
:hook ((typescript-ts-mode . prettier-mode)
(tsx-ts-mode . prettier-mode)
(js-ts-mode . prettier-mode)
(css-ts-mode . prettier-mode)
(html-ts-mode . prettier-mode)))
(provide 'work-dev-settings)
;;; work-dev-settings.el ends here