2023-09-16 19:34:53 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
:header-args:emacs-lisp: :comments link :results none
|
|
|
|
:ID: 940c2ee1-96ef-4c91-abef-c53787ea1c05
|
|
|
|
:END:
|
|
|
|
#+title: Windows and Frames
|
|
|
|
#+filetags: emacs-load
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(add-to-list 'default-frame-alist '(alpha-background . 80))
|
|
|
|
#+end_src
|
|
|
|
|
2023-10-04 15:14:56 +02:00
|
|
|
Disable window changing using the mouse, it saves me from accidental switches.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(defun cv/mouse-set-point (fun event &optional promote)
|
|
|
|
(let ((window (car (car (cdr event)))))
|
|
|
|
(when (equal window (selected-window))
|
|
|
|
(funcall fun event promote))))
|
|
|
|
(advice-add 'mouse-set-point :around 'cv/mouse-set-point)
|
|
|
|
|
|
|
|
(defun cv/mouse-drag-region (fun event)
|
|
|
|
(let ((window (car (car (cdr event)))))
|
|
|
|
(when (equal window (selected-window))
|
|
|
|
(funcall fun event))))
|
|
|
|
(advice-add 'mouse-drag-region :around 'cv/mouse-drag-region)
|
|
|
|
|
|
|
|
(defun cv/mouse-set-region (fun event)
|
|
|
|
(let ((window (car (car (cdr event)))))
|
|
|
|
(when (equal window (selected-window))
|
|
|
|
(funcall fun event))))
|
|
|
|
(advice-add 'mouse-set-region :around 'cv/mouse-set-region)
|
|
|
|
#+end_src
|