From 8d417a414336c0a55d85399845ca62acd4f05981 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 14 Oct 2024 20:59:38 +0200 Subject: . --- emacs | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'emacs') diff --git a/emacs b/emacs index 369c876..4a37357 100644 --- a/emacs +++ b/emacs @@ -29,7 +29,10 @@ x-select-enable-clipboard t x-select-enable-primary t ring-bell-function 'ignore - + default-directory (concat (getenv "HOME") "/") + focus-follows-mouse t + mouse-autoselect-window t + ;; Backups backup-by-copying t delete-old-versions t @@ -53,6 +56,7 @@ yasnippet yasnippet-snippets pinentry + eat avy tldr elfeed @@ -66,7 +70,7 @@ package-archives '(("elpa" . "https://elpa.gnu.org") ("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/") - ("non-gnu" . "https://elpa.nongnu.org/nongnu") + ("non-gnu" . "https://elpa.nongnu.org/nongnu/") ("melpa-stable" . "https://stable.melpa.org/packages/"))) (setq-default fill-column 80 @@ -122,12 +126,15 @@ (interactive) (exwm-workspace-switch-create ,i)))) (number-sequence 0 9)))) + (exwm-input-set-key (kbd "s-f") + (lambda () (interactive) + (shell-command "firefox"))) (exwm-input-set-key (kbd "") (lambda () (interactive) (shell-command "scrot -F '/home/mccd/screenshots/%Y-%m-%d_$wx$h.png'"))) (exwm-input-set-key (kbd "C-") (lambda () (interactive) - (shell-command "scrot -s -F '/home/mccd/screenshots/%Y-%m-%d_$wx$h.png'"))) + (shell-command "scrot -s -F '/home/mccd/screenshots/%Y-%m-%d_$wx$h.png'"))) (exwm-enable) (exwm-xim-mode) (push ?\C-\\ exwm-input-prefix-keys) @@ -162,6 +169,10 @@ (setq epa-pinentry-mode 'loopback)) +(use-package exwm-mff + :load-path "elisp" + :init + (exwm-mff-mode)) (use-package avy :ensure t @@ -306,8 +317,6 @@ (defvar marcc/timestamp-format "%H:%M " "Format for H:M timestamp") - - (defun marcc/timestamp-hour () "Insert a timestamp at the current point. Uses `marcc/timestamp-format' for formatting the date/time." @@ -321,8 +330,10 @@ Uses `marcc/timestamp-format' for formatting the date/time." :hook ((diary-mode . variable-pitch-mode) (diary-fancy-display-mode . variable-pitch-mode) - (diary-mode . org-link-minor-mode) - (diary-fancy-display-mode . org-link-minor-mode) + (diary-mode . 'org-link-minor-mode) + (diary-fancy-display-mode . 'org-link-minor-mode) + (diary-mode . (lambda () + (add-hook 'after-save-hook 'sync-org))) (diary-mode . flyspell-mode)) :config (global-set-key (kbd "C-c d") 'calendar) @@ -385,7 +396,8 @@ Uses `marcc/timestamp-format' for formatting the date/time." (defun sync-org () (interactive) - (shell-command "org-sync")) + (async-shell-command "org-sync")) +(add-to-list 'display-buffer-alist '("*Async Shell Command*" display-buffer-no-window (nil))) ;; Org (use-package org @@ -442,6 +454,8 @@ Uses `marcc/timestamp-format' for formatting the date/time." (org-mode . org-indent-mode) (org-mode . flyspell-mode) (org-mode . visual-line-mode) + (org-mode . (lambda () + (add-hook 'after-save-hook 'sync-org))) (org-mode . variable-pitch-mode))) (use-package rec-mode @@ -681,10 +695,10 @@ Uses `marcc/timestamp-format' for formatting the date/time." '((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119) (:name "Messages with images" :query "mime:image/*" :key 112))) '(org-agenda-files - '("~/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org")) + '("/home/mccd/personal-db/notes/ethics-and-software.org" "/home/mccd/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org")) '(org-fold-core-style 'overlays) '(package-selected-packages - '(pinentry exwm emms company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) + '(exwm-mff eat pinentry exwm emms company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) '(tab-bar-format '(tab-bar-format-align-right tab-bar-format-global)) '(yank-from-kill-ring-rotate t)) (put 'secrets-mode 'disabled nil) -- cgit v1.2.3