From 0d1f2570d18282c489233af6e010783b1ca31eff Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 09:59:37 +1200 Subject: [PATCH 01/10] emacs: bind `C-x w d' to trim-extra-space --- .emacs.d/init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 09d2f93..1dddce6 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -16,7 +16,6 @@ ;; basic key binds (global-set-key (kbd "C-`") 'other-window) (global-set-key (kbd "C-x w c") 'whitespace-cleanup) -(global-set-key (kbd "C-x w d") 'delete-all-space) (global-set-key (kbd "C-x w f") 'forward-whitespace) (global-set-key (kbd "C-c c") 'compile) (global-set-key (kbd "C-c r") 'recompile) @@ -63,6 +62,10 @@ value `italic'." (find-file custom-file) (save-buffer) (kill-current-buffer)) +(defun trim-extra-space () + (interactive) + (delete-all-space) + (insert " ")) (add-hook 'after-change-major-mode-hook #'hide-minor-modes) @@ -72,6 +75,7 @@ value `italic'." (defalias 'wc 'count-words) ;; other key binds +(global-set-key (kbd "C-x w d") 'trim-extra-space) (global-set-key (kbd "C-c e b k") 'kill-all-buffers) (global-set-key (kbd "C-c e i") 'edit-init-file) (global-set-key (kbd "C-c e r") 'reindent-buffer) From 70cf47825ca60b00bbdfa3a01aeee4f4845e8afe Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:00:35 +1200 Subject: [PATCH 02/10] emacs: set debug-on-error --- .emacs.d/init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1dddce6..cfe5f5b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -83,6 +83,7 @@ value `italic'." ;; variables (setq compilation-scroll-output t + debug-on-error t dictionary-server "dict.org" dired-listing-switches "-alh --group-directories-first" fill-column 74 From a26e681c3e473f169d7c1c730000686331640b94 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:00:55 +1200 Subject: [PATCH 03/10] emacs: disable eglot for c-ts-mode --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index cfe5f5b..9b5c4bc 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -218,7 +218,7 @@ value `italic'." ;; eglot (require 'eglot) -(add-hook 'c-ts-mode-hook 'eglot-ensure) +;(add-hook 'c-ts-mode-hook 'eglot-ensure) (add-hook 'c++-ts-mode-hook 'eglot-ensure) (add-to-list 'eglot-server-programs `(d-mode . ("serve-d"))) From 3afd9f9c449b5a2c8387a75cbac1ef4e1f91f837 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:01:35 +1200 Subject: [PATCH 04/10] emacs: change accent and font size --- .emacs.d/init.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 9b5c4bc..aabea0a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -311,14 +311,15 @@ value `italic'." (let ((fixedpt "Roboto Mono") ( varpt "Roboto") - ( accent (catppuccin-get-color 'yellow)) + ( accent (catppuccin-get-color 'blue)) (bground (catppuccin-get-color 'base)) ( darker (catppuccin-get-color 'mantle)) (darkest (catppuccin-get-color 'crust)) ( text (catppuccin-get-color 'text))) - (add-to-list 'default-frame-alist (cons 'font fixedpt)) + (add-to-list 'default-frame-alist `(font . ,fixedpt)) + (add-to-list 'default-frame-alist '(height . 36)) (set-face-attributes - `((default :height 140) + `((default :height 112) (fixed-pitch :family ,fixedpt) (variable-pitch :family ,varpt) (font-lock-comment-face :slant italic) From dd2f14f506a0c88102ffe9f119d81aeec35ee85e Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:02:18 +1200 Subject: [PATCH 05/10] emacs: remove extra faces Remove faces that are now part of catppuccin upstream --- .emacs.d/init.el | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index aabea0a..4ab4657 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -326,9 +326,6 @@ value `italic'." (font-lock-keyword-face :slant italic) (link :foreground ,accent :underline t) (mode-line-inactive :weight light) - (help-key-binding - :family ,fixedpt :background ,darker :foreground ,accent - :box (:line-width (-1 . -1) :color ,darkest :style nil)) (widget-field :extend t :background ,darker :box (:line-width (1 . 1) :color ,darkest)) @@ -338,10 +335,6 @@ value `italic'." (custom-button-mouse :background ,darkest :foreground ,text) (custom-button-pressed :inherit custom-button-mouse :box (:line-width (1 . 1) :color ,darkest)) - (match :background ,accent) - (lazy-highlight :background ,bground :foreground ,accent) - (info-xref :inherit link :background ,darker :foreground ,accent) - (anzu-mode-line :foreground ,accent) (breadcrumb-imenu-leaf-face :foreground ,accent) (dashboard-heading :foreground ,accent :height 1.2 :weight bold) (corfu-default :background ,darker) From 02449f43fe89f343ef2b216af5122de0e14f6cfa Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:03:21 +1200 Subject: [PATCH 06/10] emacs: style dictionary-word-definition-face --- .emacs.d/init.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4ab4657..be5c2e6 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -308,6 +308,7 @@ value `italic'." ;; faces (require 'cus-edit) ; custom faces +(require 'dictionary) (let ((fixedpt "Roboto Mono") ( varpt "Roboto") @@ -337,6 +338,7 @@ value `italic'." :box (:line-width (1 . 1) :color ,darkest)) (breadcrumb-imenu-leaf-face :foreground ,accent) (dashboard-heading :foreground ,accent :height 1.2 :weight bold) + (dictionary-word-definition-face :family ,varpt) (corfu-default :background ,darker) (corfu-current :background ,darkest :box ,accent) (corfu-border :background ,accent) From 5ba2ed73cdade3f1e759595c5934d0ca6cf1b46d Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:04:00 +1200 Subject: [PATCH 07/10] emacs: remove catchup --- .emacs.d/init.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index be5c2e6..8666663 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -358,12 +358,6 @@ value `italic'." (load mu4e-file))) ;; other packages -(require 'catchup) -(setq catchup-separator "\t" - catchup-spec '((format-time-string "date %Y/%m/%d %T") - (catchup-battery "batt %s%%"))) -(global-set-key (kbd "C-c u") 'catchup) - (require 'esv) (add-to-list 'esv-arguments "-f") (setq esv-close-existing-buffers t) From e8f85675c57255010b2b3e6f930fae3f108475b6 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:05:16 +1200 Subject: [PATCH 08/10] mako: change border colour --- .config/mako/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/mako/config b/.config/mako/config index 45128f3..6633529 100644 --- a/.config/mako/config +++ b/.config/mako/config @@ -2,7 +2,7 @@ font=Roboto 12 background-color=#1e1e2eff text-color=#cdd6f4ff -border-color=#f9e2af +border-color=#89b4fa padding=16 outer-margin=54 From 4fa1324bb54b898d280bd4dddadcd654dd447a1e Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:05:24 +1200 Subject: [PATCH 09/10] ksh: remove upload() --- .kshrc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.kshrc b/.kshrc index eb06986..95580e5 100644 --- a/.kshrc +++ b/.kshrc @@ -12,9 +12,4 @@ alias npl="nix profile list" alias sway="dbus-launch --exit-with-session sway" alias pmx="pulseaudio --start && pulsemixer" -upload () { - rsync "$1" root@baxters.nz:/srv/www/sshots/ - printf 'http://%s/sshots/%s' "$(curl ifconfig.co | xargs)" "$(basename "$1")" | wl-copy -} - set -o emacs From 14d688ac52622c40fcc312879e85b3109c992066 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 30 Apr 2025 10:06:07 +1200 Subject: [PATCH 10/10] zsh: init config --- .zshrc | 12 ++++++++++++ sync.sh | 1 + 2 files changed, 13 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..c2dcd22 --- /dev/null +++ b/.zshrc @@ -0,0 +1,12 @@ +unsetopt PROMPT_SP + +PATH="$HOME/.local/bin:$PATH" +PS1="%B%F{blue}%n%b %f%~ %# " +PS2='+ ' +HISTFILE="$HOME"/.zsh-history +HISTSIZE=1000000 +SAVEHIST=1000000 + +export EDITOR="emacsclient -c" + +alias np="nix profile" diff --git a/sync.sh b/sync.sh index 7af4aae..faff1a7 100755 --- a/sync.sh +++ b/sync.sh @@ -9,6 +9,7 @@ cp "$HOME"/.gitignore . cp "$HOME"/.kshrc . cp "$HOME"/.mbsyncrc . cp "$HOME"/.profile . +cp "$HOME"/.zshrc . mkdir -p .emacs.d/ cp "$HOME"/.emacs.d/init.el .emacs.d/init.el