Fix mouse scorlling, add ovverid to spolskys format for linum.
This commit is contained in:
parent
05b3bc8255
commit
2ca32d970c
20
init.el
20
init.el
@ -154,6 +154,9 @@
|
|||||||
;; Don't popup frames in OSX.
|
;; Don't popup frames in OSX.
|
||||||
(setq ns-pop-up-frames nil)
|
(setq ns-pop-up-frames nil)
|
||||||
|
|
||||||
|
;; Make mouse scrolling less jumpy.
|
||||||
|
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
|
||||||
|
|
||||||
(require 'tramp)
|
(require 'tramp)
|
||||||
(setq tramp-default-method "ssh")
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
@ -647,15 +650,20 @@ buffer is not visiting a file."
|
|||||||
(defvar dark-themes '(solarized-dark)))
|
(defvar dark-themes '(solarized-dark)))
|
||||||
(unless (boundp 'light-themes)
|
(unless (boundp 'light-themes)
|
||||||
(defvar light-themes '(solarized-light)))
|
(defvar light-themes '(solarized-light)))
|
||||||
|
(unless (boundp 'terminal-themes)
|
||||||
|
(defvar terminal-themes '(solarized-light monokai)))
|
||||||
|
|
||||||
(defun random-choice (choices)
|
(defun random-choice (choices)
|
||||||
(nth (random (length choices)) choices))
|
(nth (random (length choices)) choices))
|
||||||
|
|
||||||
(defun get-appropriate-theme ()
|
(defun get-appropriate-theme ()
|
||||||
|
(if t ;; (display-graphic-p) why doesn't this work at frame startup?
|
||||||
(let ((hour
|
(let ((hour
|
||||||
(string-to-number (format-time-string "%H"))))
|
(string-to-number (format-time-string "%H"))))
|
||||||
(if (or (< hour 8) (> hour 17))
|
(if (or (< hour 8) (> hour 17))
|
||||||
(random-choice dark-themes) (random-choice light-themes))))
|
(random-choice dark-themes) (random-choice light-themes)))
|
||||||
|
(random-choice terminal-themes)))
|
||||||
|
|
||||||
|
|
||||||
(setq current-theme nil)
|
(setq current-theme nil)
|
||||||
|
|
||||||
@ -671,7 +679,12 @@ buffer is not visiting a file."
|
|||||||
|
|
||||||
(defun deactivate-all-themes ()
|
(defun deactivate-all-themes ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(mapcar (lambda (theme) (disable-theme theme)) custom-enabled-themes))
|
(mapcar 'disable-theme custom-enabled-themes))
|
||||||
|
|
||||||
|
(defun disable-and-load-theme ()
|
||||||
|
(interactive)
|
||||||
|
(deactivate-all-themes)
|
||||||
|
(call-interactively 'load-theme))
|
||||||
|
|
||||||
(defun set-my-font-for-frame (frame)
|
(defun set-my-font-for-frame (frame)
|
||||||
(condition-case exp
|
(condition-case exp
|
||||||
@ -686,6 +699,8 @@ buffer is not visiting a file."
|
|||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(set-fringe-mode 0)
|
(set-fringe-mode 0)
|
||||||
|
(setq linum-format 'dynamic)
|
||||||
|
(setq left-margin-width 0)
|
||||||
(set-my-font-for-frame nil)
|
(set-my-font-for-frame nil)
|
||||||
(setq hl-line-mode nil))
|
(setq hl-line-mode nil))
|
||||||
|
|
||||||
@ -700,3 +715,4 @@ buffer is not visiting a file."
|
|||||||
|
|
||||||
;; This is needed because you can't set the font at daemon start-up.
|
;; This is needed because you can't set the font at daemon start-up.
|
||||||
(add-hook 'after-make-frame-functions 'set-my-font-for-frame)
|
(add-hook 'after-make-frame-functions 'set-my-font-for-frame)
|
||||||
|
(add-hook 'after-make-frame-functions (lambda (frame) (set-theme)))
|
||||||
|
Loading…
Reference in New Issue
Block a user