Browse Source

add smart-mode-line package

pull/1/head
Brett Langdon 11 years ago
parent
commit
85a20a6013
10 changed files with 2182 additions and 0 deletions
  1. +2
    -0
      emacs
  2. +40
    -0
      emacs.d/elpa/rich-minority-20140821.2020/rich-minority-autoloads.el
  3. +1
    -0
      emacs.d/elpa/rich-minority-20140821.2020/rich-minority-pkg.el
  4. +281
    -0
      emacs.d/elpa/rich-minority-20140821.2020/rich-minority.el
  5. +57
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-autoloads.el
  6. +50
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-dark-theme.el
  7. +48
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-light-theme.el
  8. +9
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-pkg.el
  9. +48
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-respectful-theme.el
  10. +1646
    -0
      emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line.el

+ 2
- 0
emacs View File

@ -40,6 +40,8 @@
(setq fci-rule-width 1)
(setq fci-rule-color "yellow")
(setq sml/no-confirm-load-theme t)
(sml/setup)
(display-time-mode 1)
(display-battery-mode 1)


+ 40
- 0
emacs.d/elpa/rich-minority-20140821.2020/rich-minority-autoloads.el View File

@ -0,0 +1,40 @@
;;; rich-minority-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
;;;### (autoloads nil "rich-minority" "rich-minority.el" (21573 14342
;;;;;; 0 0))
;;; Generated autoloads from rich-minority.el
(autoload 'rm--mode-list-as-string-list "rich-minority" "\
Return `minor-mode-list' as a simple list of strings.
\(fn)" nil nil)
(defvar rich-minority-mode nil "\
Non-nil if Rich minority mode is enabled.
See the command `rich-minority-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `rich-minority-mode'.")
(custom-autoload 'rich-minority-mode "rich-minority" nil)
(autoload 'rich-minority-mode "rich-minority" "\
Toggle Rich minority mode on or off.
With a prefix argument ARG, enable Rich minority mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
\\{rich-minority-mode-map}
\(fn &optional ARG)" t nil)
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; rich-minority-autoloads.el ends here

+ 1
- 0
emacs.d/elpa/rich-minority-20140821.2020/rich-minority-pkg.el View File

@ -0,0 +1 @@
(define-package "rich-minority" "20140821.2020" "Clean-up and Beautify the list of minor-modes." '((cl-lib "0.5")) :url "http://github.com/Bruce-Connor/rich-minority" :keywords '("mode-line" "faces"))

+ 281
- 0
emacs.d/elpa/rich-minority-20140821.2020/rich-minority.el View File

@ -0,0 +1,281 @@
;;; rich-minority.el --- Clean-up and Beautify the list of minor-modes.
;; Copyright (C) 2014 <bruce.connor.am@gmail.com>
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; URL: http://github.com/Bruce-Connor/rich-minority
;; Package-Requires: ((cl-lib "0.5"))
;; Version: 20140821.2020
;; X-Original-Version: 0.1.1
;; Keywords: mode-line faces
;; Prefix: rm
;; Separator: -
;;; Commentary:
;;
;; rich-minority-mode
;; ══════════════════
;;
;; Emacs package for hiding and/or highlighting the list of minor-modes
;; in the mode-line.
;;
;; Usage
;; ─────
;;
;; To activate the enrichment of your minor-modes list, call `M-x
;; rich-minority-mode', or add this to your init file:
;;
;; ╭────
;; │ (rich-minority-mode 1)
;; ╰────
;;
;; By default, this has a couple of small effects (provided as examples)
;; it is up to you to customize it to your liking with the following
;; three variables:
;;
;; rm-excluded-modes: List of minor mode names that will be hidden from the
;; minor-modes list. Use this to hide *only* a few modes
;; that are always active and don't really contribute
;; information.
;; rm-included-modes: List of minor mode names that are allowed on the
;; minor-modes list. Use this to hide *all but* a few
;; modes.
;; rm-text-properties: List text properties to apply to each minor-mode
;; lighter. For instance, by default we highlight
;; `Ovwrt' with a red face, so you always know if
;; you're in `overwrite-mode'.
;;
;;
;; Installation
;; ────────────
;;
;; This package is available fom Melpa, you may install it by calling
;; `M-x package-install'.
;;
;; Alternatively, you can download it manually, place it in your
;; `load-path' and require it with
;;
;; ╭────
;; │ (require 'rich-minority)
;; ╰────
(require 'cl-lib)
(defun rm-bug-report ()
"Opens github issues page in a web browser. Please send any bugs you find.
Please include your Emacs and rich-minority versions."
(interactive)
(message "Your rm-version is: %s, and your emacs version is: %s.\nPlease include this in your report!"
rich-minority-version emacs-version)
(browse-url "https://github.com/Bruce-Connor/rich-minority/issues/new"))
(defun rm-customize ()
"Open the customization menu in the `rich-minority' group."
(interactive)
(customize-group 'rich-minority t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Customization variables.
(defcustom rm-blacklist '(" hl-p")
"List of minor modes you want to hide from the mode-line.
Has three possible values:
- nil: All minor modes are shown in the mode-line (but see also
`rm-included-modes').
- List of strings: Represents a list of minor mode names that
will be hidden from the minor-modes list.
- A string: If this variable is set to a single string, this
string must be a regexp. This regexp will be compared to each
minor-mode lighter, and those which match are hidden from the
minor-mode list.
If you'd like to use a list of regexps, simply use something like the following:
(setq rm-excluded-modes (mapconcat 'identity list-of-regexps \"\\\\|\"))
Don't forget to start each string with a blank space, as most
minor-mode lighters start with a space."
:type '(choice (repeat string)
(regexp :tag "Regular expression."))
:group 'rich-minority
:package-version '(rich-minority . "0.1.1"))
(define-obsolete-variable-alias 'rm-excluded-modes 'rm-blacklist "0.1.1")
(define-obsolete-variable-alias 'rm-hidden-modes 'rm-excluded-modes "0.1.1")
(defcustom rm-whitelist nil
"List of minor modes you want to include in the mode-line.
- nil: All minor modes are shown in the mode-line (but see also
`rm-excluded-modes').
- List of strings: Represents a list of minor mode names that are
allowed on the minor-modes list. Any minor-mode whose lighter
is not in this list will NOT be displayed.
- A string: If this variable is set to a single string, this
string must be a regexp. This regexp will be compared to each
minor-mode lighter, and only those which match are displayed on
the minor-mode list.
If you'd like to use a list of regexps, simply use something like the following:
(setq rm-included-modes (mapconcat 'identity list-of-regexps \"\\\\|\"))
Don't forget to start each string with a blank space, as most
minor-mode lighters start with a space."
:type '(choice (repeat string)
(regexp :tag "Regular expression."))
:group 'rich-minority
:package-version '(rich-minority . "0.1.1"))
(define-obsolete-variable-alias 'rm-included-modes 'rm-whitelist "0.1.1")
(defcustom rm-text-properties
'(("\\` Ovwrt\\'" 'face 'font-lock-warning-face))
"Alist of text properties to be applied to minor-mode lighters.
The car of each element must be a regexp, and the cdr must be a
list of text properties.
(REGEXP PROPERTY-NAME PROPERTY-VALUE ...)
If the regexp matches a minor mode lighter, the text properties
are applied to it. They are tested in order, and search stops at
the first match.
These properties take priority over those defined in
`rm-base-text-properties'."
:type '(repeat (cons regexp (repeat sexp)))
:group 'rich-minority
:package-version '(rich-minority . "0.1"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions and Defvars
(defconst rm--help-echo-bottom
"Mouse-1: Mode Menu.\nMouse-2: Mode Help.\nMouse-3: Toggle Minor Modes.")
;;;###autoload
(defun rm--mode-list-as-string-list ()
"Return `minor-mode-list' as a simple list of strings."
(let ((full-list (remove "" (mapcar #'format-mode-line minor-mode-alist))))
(setq rm--help-echo
(format "Full list:\n %s\n\n%s"
(mapconcat 'identity full-list "\n ")
rm--help-echo-bottom))
(mapcar #'rm--propertize
(rm--remove-hidden-modes
full-list))))
(defvar-local rm--help-echo nil
"Used to set the help-echo string dynamically.")
(defcustom rm-base-text-properties
'('help-echo 'rm--help-echo
'mouse-face 'mode-line-highlight
'local-map 'mode-line-minor-mode-keymap)
"List of text propeties to apply to every minor mode."
:type '(repeat sexp)
:group 'rich-minority
:package-version '(rich-minority . "0.1"))
(defun rm--propertize (mode)
"Propertize the string MODE according to `rm-text-properties'."
(if (null (stringp mode))
`(:propertize ,mode ,@rm-base-text-properties)
(let ((al rm-text-properties)
done prop)
(while (and (null done) al)
(setq done (pop al))
(if (string-match (car done) mode)
(setq prop (cdr done))
(setq done nil)))
(eval `(propertize ,mode ,@prop ,@rm-base-text-properties)))))
(defun rm--remove-hidden-modes (li)
"Remove from LI elements that match `rm-excluded-modes' or don't match `rm-included-modes'."
(let ((pred (if (listp rm-excluded-modes) #'member #'rm--string-match))
(out li))
(when rm-excluded-modes
(setq out
(remove nil
(mapcar
(lambda (x) (unless (and (stringp x)
(funcall pred x rm-excluded-modes))
x))
out))))
(when rm-included-modes
(setq pred (if (listp rm-included-modes) #'member #'rm--string-match))
(setq out
(remove nil
(mapcar
(lambda (x) (unless (and (stringp x)
(null (funcall pred x rm-included-modes)))
x))
out))))
out))
(defun rm--string-match (string regexp)
"Like `string-match', but arg STRING comes before REGEXP."
(string-match regexp string))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; minor-mode
(defvar rm--mode-line-construct
'(:eval (rm--mode-list-as-string-list))
"Construct used to replace `minor-mode-alist'.")
(defvar rm--warning-absent-element
"Couldn't find %S inside `mode-line-modes'. If you didn't change it yourself, please file a bug report with M-x rm-bug-report"
"Warning message used when something wasn't found.")
(defvar rm--backup-construct nil
"Construct containing `minor-mode-alist' which we removed from the mode-line.")
;;;###autoload
(define-minor-mode rich-minority-mode nil nil " $"
:global t
(if rich-minority-mode
(let ((place (or (member 'minor-mode-alist mode-line-modes)
(cl-member-if
(lambda (x) (and (listp x)
(equal (car x) :propertize)
(equal (cadr x) '("" minor-mode-alist))))
mode-line-modes))))
(if place
(progn
(setq rm--backup-construct (car place))
(setcar place rm--mode-line-construct))
(setq rich-minority-mode nil)
(if (member 'sml/pos-id-separator mode-line-format)
(message "You don't need to activate rich-minority-mode if you're using smart-mode-line")
(warn rm--warning-absent-element 'minor-mode-alist))))
(let ((place (member rm--mode-line-construct mode-line-modes)))
(if place
(setcar place rm--backup-construct)
(warn rm--warning-absent-element rm--mode-line-construct)))))
(provide 'rich-minority)
;;; rich-minority.el ends here

+ 57
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-autoloads.el View File

@ -0,0 +1,57 @@
;;; smart-mode-line-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
;;;### (autoloads nil "smart-mode-line" "smart-mode-line.el" (21573
;;;;;; 14342 0 0))
;;; Generated autoloads from smart-mode-line.el
(when load-file-name (let ((dir (file-name-as-directory (file-name-directory load-file-name)))) (add-to-list 'custom-theme-load-path dir) (when (file-directory-p (file-name-as-directory (concat dir "themes"))) (add-to-list 'custom-theme-load-path (file-name-as-directory (concat dir "themes"))))))
(autoload 'sml/setup "smart-mode-line" "\
Setup the mode-line to be smart and sexy.
ARG is ignored. Just call this function in your init file, and it
will be evaluated after Emacs finished initializing (we do this
to make sure that we are loaded after any themes).
\(fn &optional ARG)" t nil)
;;;***
;;;### (autoloads nil "smart-mode-line-dark-theme" "smart-mode-line-dark-theme.el"
;;;;;; (21573 14342 0 0))
;;; Generated autoloads from smart-mode-line-dark-theme.el
(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
;;;***
;;;### (autoloads nil "smart-mode-line-light-theme" "smart-mode-line-light-theme.el"
;;;;;; (21573 14342 0 0))
;;; Generated autoloads from smart-mode-line-light-theme.el
(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
;;;***
;;;### (autoloads nil "smart-mode-line-respectful-theme" "smart-mode-line-respectful-theme.el"
;;;;;; (21573 14342 0 0))
;;; Generated autoloads from smart-mode-line-respectful-theme.el
(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
;;;***
;;;### (autoloads nil nil ("smart-mode-line-pkg.el") (21573 14342
;;;;;; 942567 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; smart-mode-line-autoloads.el ends here

+ 50
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-dark-theme.el View File

@ -0,0 +1,50 @@
;;; smart-mode-line-dark-theme.el --- Dark theme for smart-mode-line
;; Copyright (C) 2014 Artur Malabarba <bruce.connor.am@gmail.com>
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; URL: http://github.com/Bruce-Connor/smart-mode-line
;; Version: 0.1a
;; Separator: -
;;; License:
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;; Change Log:
;; 0.1a - 2014/05/14 - Created File.
;;; Code:
(deftheme smart-mode-line-dark "Dark theme for smart-mode-line.")
(custom-theme-set-faces
'smart-mode-line-dark
'(mode-line-buffer-id ((t :inherit sml/filename :foreground nil :background nil)))
'(mode-line-inactive ((t :foreground "gray60" :background "#404045" :inverse-video nil)))
'(mode-line ((t :foreground "gray60" :background "black" :inverse-video nil)))
'(sml/global ((t :foreground "gray50" :inverse-video nil)))
'(sml/modes ((t :inherit sml/global :foreground "White")))
'(sml/filename ((t :inherit sml/global :foreground "#eab700" :weight bold)))
'(sml/prefix ((t :inherit sml/global :foreground "#bf6000")))
'(sml/read-only ((t :inherit sml/not-modified :foreground "DeepSkyBlue")))
'(persp-selected-face ((t :foreground "ForestGreen" :inherit sml/filename)))
'(helm-candidate-number ((t :foreground nil :background nil :inherit sml/filename))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'smart-mode-line-dark)
;;; smart-mode-line-dark-theme.el ends here.

+ 48
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-light-theme.el View File

@ -0,0 +1,48 @@
;;; smart-mode-line-light-theme.el --- Light theme for smart-mode-line
;; Copyright (C) 2014 Artur Malabarba <bruce.connor.am@gmail.com>
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; URL: http://github.com/Bruce-Connor/smart-mode-line
;; Version: 0.1a
;; Separator: -
;;; License:
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;; Change Log:
;; 0.1a - 2014/05/14 - Created File.
;;; Code:
(deftheme smart-mode-line-light "Light theme for smart-mode-line.")
(custom-theme-set-faces
'smart-mode-line-light
'(mode-line-buffer-id ((t :inherit sml/filename :foreground nil :background nil)))
'(mode-line-inactive ((t :foreground "grey20" :background "#fdf6e3" :inverse-video nil)))
'(mode-line ((t :foreground "black" :background "grey85" :inverse-video nil)))
'(sml/global ((t :foreground "gray20" :inverse-video nil)))
'(sml/modes ((t :inherit sml/global :foreground "Black")))
'(sml/filename ((t :inherit sml/global :foreground "Blue" :weight bold)))
'(sml/prefix ((t :inherit sml/global :foreground "#5b2507" :weight bold)))
'(sml/read-only ((t :inherit sml/not-modified :foreground "DarkGreen" :weight bold))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'smart-mode-line-light)
;;; smart-mode-line-light-theme.el ends here.

+ 9
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-pkg.el View File

@ -0,0 +1,9 @@
(define-package "smart-mode-line" "20140904.1144" "A color coded smart mode-line."
'((emacs "24.3")
(dash "2.2.0")
(rich-minority "0.1"))
:url "http://github.com/Bruce-Connor/smart-mode-line" :keywords
'("mode-line" "faces" "theme" "themes"))
;; Local Variables:
;; no-byte-compile: t
;; End:

+ 48
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line-respectful-theme.el View File

@ -0,0 +1,48 @@
;;; smart-mode-line-respectful-theme.el --- Respectful theme for smart-mode-line
;; Copyright (C) 2014 Artur Malabarba <bruce.connor.am@gmail.com>
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; URL: http://github.com/Bruce-Connor/smart-mode-line
;; Version: 0.1a
;; Separator: -
;;; License:
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;; Change Log:
;; 0.1a - 2014/05/14 - Created File.
;;; Code:
(deftheme smart-mode-line-respectful
"Respectful theme for smart-mode-line.
Tries to respect the colors chosen by your global theme.
Results may vary.")
(custom-theme-set-faces
'smart-mode-line-respectful
'(sml/global ((t :inherit font-lock-preprocessor-face)))
'(sml/filename ((t :inherit mode-line-buffer-id)))
'(sml/prefix ((t :inherit (font-lock-variable-name-face sml/global))))
'(sml/read-only ((t :inherit (font-lock-type-face sml/not-modified))))
'(sml/modes ((t :foreground nil :inherit sml/filename :weight normal))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'smart-mode-line-respectful)
;;; smart-mode-line-respectful-theme.el ends here.

+ 1646
- 0
emacs.d/elpa/smart-mode-line-20140904.1144/smart-mode-line.el
File diff suppressed because it is too large
View File


Loading…
Cancel
Save