diff --git a/global.org b/global.org index f537341..be5c01c 100644 --- a/global.org +++ b/global.org @@ -45,91 +45,138 @@ * Global settings ** Cosmetics - - Minimal appearance: no menu, toolbar or scrollbars; - remove splash screens and messages - #+BEGIN_SRC emacs-lisp - (menu-bar-mode -1) - (tool-bar-mode 0) - (scroll-bar-mode -1) - (setq inhibit-startup-screen t - inhibit-startup-message t) - #+END_SRC - -** TODO find out what this actually does + Prefer a minimal appearance: no menu, toolbar or scroll-bars; no + splash screens or messages + #+BEGIN_SRC emacs-lisp + (menu-bar-mode -1) + (tool-bar-mode 0) + (scroll-bar-mode -1) + (setq inhibit-startup-screen t + inhibit-startup-message t) + #+END_SRC + a blinking cursor keeps the gpu awake; add global hl-line mode to more + easily spot the cursor + #+BEGIN_SRC emacs-lisp + (blink-cursor-mode 0) + (global-hl-line-mode t) + #+END_SRC + Set frame title + #+BEGIN_SRC emacs-lisp + (setq frame-title-format + '((buffer-file-name "%f" + (dired-directory dired-directory "%b")) " · emacs"));; · " (:eval (kde-current-activity-name)))) ;; "%S")) + #+END_SRC + +** Mouseless + Disable mouse interaction with emacs + #+BEGIN_SRC emacs-lisp + (setq mouse-autoselect-window nil) + (mouse-wheel-mode -1) + (setq mouse-yank-at-point nil) + (setq focus-follows-mouse nil) + #+END_SRC +*** TODO Find out what of the above is necessary given the disable-mouse mode below +*** TODO The following minor mode implementation should be replaced by [https://github.com/purcell/disable-mouse/] #+BEGIN_SRC emacs-lisp -(setq-default display-buffer-reuse-frames t) -#+END_SRC -* Leftovers -#+BEGIN_SRC emacs-lisp - -(setq-default show-trailing-whitespace t) -(add-hook 'before-save-hook 'delete-trailing-whitespace) - -(setq c-basic-offset 4) -(setq indent-tabs-mode nil) -(setq show-paren-mode t) - - -(setq-default abbrev-mode t) -(read-abbrev-file "~/.abbrev_defs") -(setq save-abbrevs t) - -;; fix compilation window eating up my work window -(setq compilation-scroll-output t - compilation-window-height 12) - -(setq search-whitespace-regexp "[ \t\r\n]+") -(setq flyspell-use-meta-tab nil) - -(setq redisplay-dont-pause t - scroll-margin 3 - scroll-step 1 - scroll-conservatively 10000 - scroll-preserve-screen-position 1) - -;; add .emacs.d and subdirs to load path -;; (add-to-list 'load-path "~/.emacs.d") -(let ((default-directory "~/.emacs.d/")) - (normal-top-level-add-subdirs-to-load-path) - (normal-top-level-add-to-load-path '("fringe-helper.el" "multiple-cursors.el" "dash.el"))) - -(require 'mic-paren) ; loading -(paren-activate) ; activating - -(setq mouse-autoselect-window nil) -(mouse-wheel-mode t) - -(defvar outline-minor-mode-prefix "\M-#") - -;; * include other files -(load "init-latex.el") -(load "init-org.el") -(load "init-c++.el") -(load "init-elisp.el") -(load "init-kde-integration.el") +(define-minor-mode disable-mouse-mode + "A minor-mode that disables all mouse keybinds." + :global t + :lighter "" + :keymap (make-sparse-keymap)) -;; KDE stuff -(add-to-list 'load-path "~/kde-emacs") -(load "qml-mode.el" nil t t) -(add-to-list 'auto-mode-alist '("\\.qml\\'" . qml-mode)) +(dolist (type '(mouse down-mouse drag-mouse + double-mouse triple-mouse)) + (dolist (prefix '("" C- M- S- M-S- C-M- C-S- C-M-S-)) + ;; Yes, I actually HAD to go up to 7 here. + (dotimes (n 7) + (let ((k (format "%s%s-%s" prefix type n))) + (define-key disable-mouse-mode-map + (vector (intern k)) #'ignore))))) +(disable-mouse-mode 1) #+END_SRC -Please notice that kde-emacs forces the menu to show -#+BEGIN_SRC emacs-lisp - (require 'kde-emacs) - (menu-bar-mode -1) -#+END_SRC +** TODO find out what this was actually meant to do + #+BEGIN_SRC emacs-lisp + (setq-default display-buffer-reuse-frames t) + #+END_SRC + +** Whitespace + Trailing whitespace is evil; get rid of it +*** TODO Have a look at ws-trim.el + It is conf'ble to avoid removing whitespace from lines that were not + modified; sounds like a good idea for git + [ftp://ftp.lysator.liu.se/pub/emacs/ws-trim.el] + #+BEGIN_SRC emacs-lisp + (setq-default show-trailing-whitespace t) + (add-hook 'before-save-hook 'delete-trailing-whitespace) + #+END_SRC + + Tabs are evil; get rid of them + #+BEGIN_SRC emacs-lisp + (setq c-basic-offset 4) + (setq tab-width 4) + (setq indent-tabs-mode nil) + #+END_SRC + +** Show matching parens + #+BEGIN_SRC emacs-lisp + (setq show-paren-mode t) + #+END_SRC +* Leftovers + #+BEGIN_SRC emacs-lisp + (setq-default abbrev-mode t) + (read-abbrev-file "~/.abbrev_defs") + (setq save-abbrevs t) + + ;; fix compilation window eating up my work window + (setq compilation-scroll-output t + compilation-window-height 12) + + (setq search-whitespace-regexp "[ \t\r\n]+") + (setq flyspell-use-meta-tab nil) + + (setq redisplay-dont-pause t + scroll-margin 3 + scroll-step 1 + scroll-conservatively 10000 + scroll-preserve-screen-position 1) + + ;; add .emacs.d and subdirs to load path + ;; (add-to-list 'load-path "~/.emacs.d") + (let ((default-directory "~/.emacs.d/")) + (normal-top-level-add-subdirs-to-load-path) + (normal-top-level-add-to-load-path '("fringe-helper.el" "multiple-cursors.el" "dash.el"))) + + (require 'mic-paren) ; loading + (paren-activate) ; activating + + (defvar outline-minor-mode-prefix "\M-#") + + ;; * include other files + (load "init-latex.el") + (load "init-org.el") + (load "init-c++.el") + (load "init-elisp.el") + (load "init-kde-integration.el") + + ;; KDE stuff + (add-to-list 'load-path "~/kde-emacs") + (load "qml-mode.el" nil t t) + (add-to-list 'auto-mode-alist '("\\.qml\\'" . qml-mode)) + #+END_SRC + ** TODO find out how kde-emacs makes “make” actually work I need to keep this up until I realize what I need to make “make” work + Please notice that kde-emacs forces the menu to show + #+BEGIN_SRC emacs-lisp + (require 'kde-emacs) + (menu-bar-mode -1) + #+END_SRC +** Leftovers #+BEGIN_SRC emacs-lisp ;;(setq kde-full-name "Jacopo De Simoi") ;;(setq kde-email "wilderkde@gmail.com") - -(setq frame-title-format - '((buffer-file-name "%f" - (dired-directory dired-directory "%b")) " · emacs"));; · " (:eval (kde-current-activity-name)))) ;; "%S")) - ;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/. ;; create the autosave dir if necessary, since emacs won't. (make-directory "~/.emacs.d/autosaves/" t) @@ -154,12 +201,8 @@ Please notice that kde-emacs forces the menu to show (setq default-fill-column 110) (add-to-list 'load-path "~/tmp") -(setq mouse-yank-at-point t) -(blink-cursor-mode 0) -(global-hl-line-mode t) -(setq focus-follows-mouse nil) -(require 'pomodoro) +;; (require 'pomodoro) (defun select-frame-on-current-activity () (select-frame-on-activity (kde-current-activity)) @@ -439,22 +482,6 @@ This is the same as using \\[set-mark-command] with the prefix argument." ;; Use system proxy (setq url-proxy-services '(("http" . "127.0.0.1:8118"))) -(define-minor-mode disable-mouse-mode - "A minor-mode that disables all mouse keybinds." - :global t - :lighter "" - :keymap (make-sparse-keymap)) - -(dolist (type '(mouse down-mouse drag-mouse - double-mouse triple-mouse)) - (dolist (prefix '("" C- M- S- M-S- C-M- C-S- C-M-S-)) - ;; Yes, I actually HAD to go up to 7 here. - (dotimes (n 7) - (let ((k (format "%s%s-%s" prefix type n))) - (define-key disable-mouse-mode-map - (vector (intern k)) #'ignore))))) - -(disable-mouse-mode 1) (defun flash-hline () (let ((fg (face-foreground 'default))