[emacs] remove magithub
[~bandali/configs] / init.org
index 7c12ad5..5a163e3 100644 (file)
--- a/init.org
+++ b/init.org
@@ -419,6 +419,24 @@ Font stack with better unicode support, around =Ubuntu Mono= and
 (setq text-scale-mode-step 1.05)
 #+end_src
 
+** Focus follows mouse
+
+I’d like focus to follow the mouse when I move the cursor from one
+window to the next.
+
+#+begin_src emacs-lisp
+(setq mouse-autoselect-window t)
+#+end_src
+
+Let’s define a function to conveniently disable this for certain
+buffers and/or modes.
+
+#+begin_src emacs-lisp
+(defun amin--no-mouse-autoselect-window ()
+  (make-local-variable 'mouse-autoselect-window)
+  (setq mouse-autoselect-window nil))
+#+end_src
+
 ** Libraries
 
 #+begin_src emacs-lisp
@@ -998,7 +1016,10 @@ Not just how I do git, but /the/ way to do git.
 #+begin_src emacs-lisp
 (use-package magit
   :defer 1
-  :general (amin--leader-keys "g s" 'magit-status)
+  :general
+  (amin--leader-keys
+    "g s" 'magit-status
+    "g l" 'magit-log-buffer-file)
   :bind ("s-g" . magit-status)
   :config
   (magit-add-section-hook 'magit-status-sections-hook
@@ -2096,7 +2117,7 @@ Hopefully temporary.
         ""))))
 #+end_src
 
-** magithub
+** COMMENT magithub
 
 For when I /have to/ use GH.
 
@@ -2243,7 +2264,8 @@ For when I /have to/ use GH.
    :map gnus-summary-mode-map
    ("r"   . gnus-summary-reply-with-original)
    ("R"   . gnus-summary-wide-reply-with-original)
-   ("M-L" . org-store-link)))
+   ("M-L" . org-store-link))
+  :hook (gnus-summary-mode . amin--no-mouse-autoselect-window))
 
 (use-package gnus-msg
   :config