;; (set-default-font "Bitstream vera sans mono-12")
;; (set-default-font "Liberation Mono-13")
(set-default-font "Inconsolata 15")
-;;(set-default-font "DejaVu sans mono 11")
-;;(set-default-font "Droid sans mono 13")
-;;(set-default-font "Opensans 10")
+;; (set-default-font "DejaVu sans mono 11")
+;; (set-default-font "Droid sans mono 13")
+;; (set-default-font "Opensans 10")
(when (fboundp 'horizontal-scroll-bar-mode)
(horizontal-scroll-bar-mode -1))
;; What modes for what file extentions
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
+(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
+
(require 'org-table)
(add-to-list 'auto-mode-alist '("\\.txt\\'" . (lambda()
(defun ff/sum-values-from-files (list-files prefix)
(apply '+
(mapcar
- (lambda (f) (string-to-number (ff/file-first-line (format "%s/%s" f prefix))))
+ (lambda (f)
+ (condition-case nil
+ (string-to-number (ff/file-first-line (format "%s/%s" f prefix)))
+ (error 0))
+ )
list-files)))
(defun ff/battery-percent ()
(pcase (ff/battery-state ff/battery-dirs)
(`charging (format "c%d%%" (ff/battery-percent)))
(`discharging (format "d%d%%" (ff/battery-percent)))
- (code "f"))
+ (_ "f"))
)
)
'(
- ("hostname" nil t nil "-v")
+ ("hostname" nil t nil "-f")
("acpi" nil t)
("df" nil t nil "-h")
;; ("mount" nil t)
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title></title>
-<style>
+<style type=\"text/css\">
p {
color:#009900;
}
;; (define-key global-map [(control shift next)] 'previous-multiframe-window)
;; I have two screens sometime!
+;; (define-key global-map [(meta next)] 'other-frame)
+;; (define-key global-map [(meta prior)] (lambda () (interactive) (other-frame -1)))
-(define-key global-map [(meta next)] 'other-frame)
-(define-key global-map [(meta prior)] (lambda () (interactive) (other-frame -1)))
-
-(define-key global-map [(shift home)] 'delete-other-windows-vertically)
+;; (load "winner")
+(winner-mode 1)
+(define-key global-map [(shift backspace)] 'winner-undo)
+;; (define-key global-map [(shift home)] 'delete-other-windows-vertically)
;; (define-key global-map [(control +)] 'enlarge-window)
;; (define-key global-map [(control -)] 'shrink-window)
-
;; Goes to next/previous buffer
-
-(define-key global-map [(control prior)] 'ff/next-buffer)
-(define-key global-map [(control next)] 'ff/prev-buffer)
+;; (define-key global-map [(control prior)] 'ff/next-buffer)
+;; (define-key global-map [(control next)] 'ff/prev-buffer)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; If M-. on a symbol, show where it is defined in another window
(if (string-match ff/kill-this-buffer-and-delete-window-exceptions (buffer-name))
(ff/next-buffer)
(kill-this-buffer)))
- ;; (unless (one-window-p t) (delete-window))
+ (unless (one-window-p t) (delete-window))
)
(define-key global-map [(control backspace)] 'ff/kill-this-buffer-and-delete-window)
(add-to-list 'recentf-exclude "/tmp/mymail-vm-.*\.mbox")
)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Store and restore the window configuration
+
+(defadvice vm (before ff/store-window-configuration nil activate)
+ (unless (boundp 'ff/window-configuration-before-vm)
+ (setq ff/window-configuration-before-vm (current-window-configuration)))
+ )
+
+(defadvice vm-quit (after ff/restore-window-configuration nil activate)
+ (when (boundp 'ff/window-configuration-before-vm)
+ (set-window-configuration ff/window-configuration-before-vm)
+ (makunbound 'ff/window-configuration-before-vm)
+ )
+)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(setq-default vm-summary-show-threads t)
;; (setq vm-preview-lines nil)
(when (>= emacs-major-version 22)
(bbdb-insinuate-vm)
- (ff/mail-aliases-from-bbdb))
+ (ff/mail-aliases-from-bbdb)
+ )
)
(defun ff/pipe-to-tmp () (interactive)