Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.7 KiB

10 years ago
  1. ;;; prelude-ui.el --- Emacs Prelude: UI optimizations and tweaks.
  2. ;;
  3. ;; Copyright © 2011-2016 Bozhidar Batsov
  4. ;;
  5. ;; Author: Bozhidar Batsov <bozhidar@batsov.com>
  6. ;; URL: https://github.com/bbatsov/prelude
  7. ;; Version: 1.0.0
  8. ;; Keywords: convenience
  9. ;; This file is not part of GNU Emacs.
  10. ;;; Commentary:
  11. ;; We dispense with most of the point and click UI, reduce the startup noise,
  12. ;; configure smooth scolling and a nice theme that's easy on the eyes (zenburn).
  13. ;;; License:
  14. ;; This program is free software; you can redistribute it and/or
  15. ;; modify it under the terms of the GNU General Public License
  16. ;; as published by the Free Software Foundation; either version 3
  17. ;; of the License, or (at your option) any later version.
  18. ;;
  19. ;; This program is distributed in the hope that it will be useful,
  20. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. ;; GNU General Public License for more details.
  23. ;;
  24. ;; You should have received a copy of the GNU General Public License
  25. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  26. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  27. ;; Boston, MA 02110-1301, USA.
  28. ;;; Code:
  29. ;; the toolbar is just a waste of valuable screen estate
  30. ;; in a tty tool-bar-mode does not properly auto-load, and is
  31. ;; already disabled anyway
  32. (when (fboundp 'tool-bar-mode)
  33. (tool-bar-mode -1))
  34. (menu-bar-mode -1)
  35. ;; the blinking cursor is nothing, but an annoyance
  36. (blink-cursor-mode -1)
  37. ;; disable the annoying bell ring
  38. (setq ring-bell-function 'ignore)
  39. ;; disable startup screen
  40. (setq inhibit-startup-screen t)
  41. ;; nice scrolling
  42. (setq scroll-margin 0
  43. scroll-conservatively 100000
  44. scroll-preserve-screen-position 1)
  45. ;; mode line settings
  46. (line-number-mode t)
  47. (column-number-mode t)
  48. (size-indication-mode t)
  49. ;; enable y/n answers
  50. (fset 'yes-or-no-p 'y-or-n-p)
  51. ;; more useful frame title, that show either a file or a
  52. ;; buffer name (if the buffer isn't visiting a file)
  53. (setq frame-title-format
  54. '("" invocation-name " Prelude - " (:eval (if (buffer-file-name)
  55. (abbreviate-file-name (buffer-file-name))
  56. "%b"))))
  57. ;; use zenburn as the default theme
  58. (when prelude-theme
  59. (load-theme prelude-theme t))
  60. (require 'smart-mode-line)
  61. (setq sml/no-confirm-load-theme t)
  62. ;; delegate theming to the currently active theme
  63. (setq sml/theme nil)
  64. (add-hook 'after-init-hook #'sml/setup)
  65. ;; show the cursor when moving after big movements in the window
  66. (require 'beacon)
  67. (beacon-mode +1)
  68. ;; show available keybindings after you start typing
  69. (require 'which-key)
  70. (which-key-mode +1)
  71. (provide 'prelude-ui)
  72. ;;; prelude-ui.el ends here