From 71882b6b802590f6fd2e498351d35e196531dd9c Mon Sep 17 00:00:00 2001 From: James Blair Date: Wed, 2 Aug 2023 22:09:15 +1200 Subject: [PATCH] Add mouse scroll for doom. --- doom/config.el | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/doom/config.el b/doom/config.el index 899950f..495dec5 100644 --- a/doom/config.el +++ b/doom/config.el @@ -6,8 +6,8 @@ ;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; clients, file templates and snippets. It is optional. -(setq user-full-name "John Doe" - user-mail-address "john@doe.com") +(setq user-full-name "James Blair" + user-mail-address "mail@jamesblair.net") ;; Doom exposes five (optional) variables for controlling fonts in Doom: ;; @@ -86,3 +86,23 @@ (set-face-background 'default "unspecified-bg" frame))) (add-hook 'after-make-frame-functions 'set-background-for-terminal) (add-hook 'window-setup-hook 'set-background-for-terminal) + + +;; Add nice mouse scrolling support +(define-globalized-minor-mode my-global-xterm-mode xterm-mouse-mode + (lambda () (xterm-mouse-mode 1))) + +(my-global-xterm-mode 1) + +(defun scroll-up-5-lines () + "Scroll up 5 lines" + (interactive) + (scroll-up 5)) + + (defun scroll-down-5-lines () + "Scroll down 5 lines" + (interactive) + (scroll-down 5)) + + (global-set-key (kbd "") 'scroll-down-5-lines) + (global-set-key (kbd "") 'scroll-up-5-lines)