(flyspell-mode))))
(add-hook 'c++-mode-hook 'flyspell-prog-mode)
+(add-hook 'lua-mode-hook 'flyspell-prog-mode)
(add-hook 'log-edit-mode-hook 'flyspell-mode)
;; I am a power-user
;; "tool" bar? Are you kidding?
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
-;; ;; If my own letter icon is here, use it and change its color
-;; (when (file-exists-p "~/local/share/emacs/letter.xbm")
-;; (setq-default display-time-mail-icon
-;; (find-image
-;; '((:type xbm
-;; :file "~/local/share/emacs/letter.xbm"
-;; :ascent center)))))
-
;; My funky setting of face colors. Basically, we switch to a sober
;; look and darken a bit the colors which need to (because of the
;; darker background)
;; X-window
(when window-system
- ;; (setq
- ;; display-time-use-mail-icon t)
(ff/configure-faces
'(
;; (fringe :background "black" :foreground "gray90")
(fringe :background "gray80")
(ff/date-info-face :foreground "white")
- (ff/battery-info-face :foreground "white")
- (ff/mail-alarm-face :foreground "white" :background "red2")
+ (ff/battery-info-face :foreground "black")
+ (ff/battery-info-alarm-face :foreground "red")
+ ;; (ff/mail-alarm-face :foreground "white" :background "red2")
;; (alarm-vc-face :foreground "black" :background "yellow" :weight 'normal)
(gui-button-face :background "green" :foreground "black")
))
:inverse-video nil)
(region :background "white" :foreground "black")
(ff/date-info-face :foreground "white" :weight 'bold)
- (ff/battery-info-face :foreground "white")
- (ff/mail-alarm-face :foreground "red" :weight 'bold)
+ (ff/battery-info-face :foreground "black")
+ (ff/battery-info-alarm-face :foreground "red")
+ ;; (ff/mail-alarm-face :foreground "red" :weight 'bold)
(selector/selection :background "yellow")
(gui-button-face :background "green" :foreground "white")
(enotes/information-face :foreground "cyan")
;; Playing sounds
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; (defun ff/esd-sound (file)
-;; "Plays a sound with the Enlighted sound daemon."
-;; (interactive)
-;; (process-kill-without-query (start-process-shell-command "esdplay"
-;; nil
-;; "esdplay" file)))
-
(defun ff/alsa-sound (file)
"Plays a sound with ALSA."
(interactive)
;; (`charging (format "c%d%%" (ff/battery-percent)))
;; (`discharging (format "d%d%%" (ff/battery-percent)))
;; (`unknown "f")
- (`charging (format "↑%d%%" (ff/battery-percent)))
- (`discharging (format "↓%d%%" (ff/battery-percent)))
- (`unknown "✱")
+
+ (`charging
+ (let ((p (ff/battery-percent)))
+ (if (> p 10)
+ (propertize (format "↑%d%%" p) 'face 'ff/battery-info-face)
+ (propertize (format "↑%d%%" p) 'face 'ff/battery-info-alarm-face))
+ )
+ )
+
+ (`discharging
+ (let ((p (ff/battery-percent)))
+ (if (> p 10)
+ (propertize (format "↓%d%%" p) 'face 'ff/battery-info-face)
+ (propertize (format "↓%d%%" p) 'face 'ff/battery-info-alarm-face))
+ )
+ )
+
+ ;; (`unknown "✱")
+ (`unknown "F")
(_ "?"))
(error nil))
)
(set-buffer-modified-p nil)
))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Make a sound when there is new mail
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; I do not like sounds anymore
-
-;; (setq ff/already-boinged-for-mail nil)
-
-;; (defun ff/boing-if-new-mail ()
-;; (if mail (when (not ff/already-boinged-for-mail)
-;; ;; (ff/play-sound-async "~/local/sounds/boing1.wav")
-;; ;; (ff/show-unspooled-mails)
-;; (setq ff/already-boinged-for-mail t))
-;; (setq ff/already-boinged-for-mail nil))
-;; )
-
-;; (add-hook 'display-time-hook 'ff/boing-if-new-mail)
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display time
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
display-time-string-forms `(
- load " "
+ load
+
+ " "
- (ff/temp-info-string)
+ ,@(when (ff/battery-info-string)
+ '((ff/temp-info-string)))
- ,@(when (ff/battery-info-string)
- '((propertize
- (ff/battery-info-string)
- 'face 'ff/battery-info-face)))
+ ,@(when (ff/battery-info-string)
+ '((ff/battery-info-string)))
- " "
+ ;; '((propertize
+ ;; (ff/battery-info-string)
+ ;; 'face 'ff/battery-info-face)))
- (propertize
- (concat ;;" ˌ"
- 24-hours ":" minutes
- " "
- ;; dayname " "
- monthname " " day
- ;;"ˌ"
- )
- 'face 'ff/date-info-face)
+ " "
- )
+ (propertize
+ (concat ;;" ˌ"
+ 24-hours ":" minutes
+ " "
+ ;; dayname " "
+ monthname " " day
+ ;;"ˌ"
+ )
+ 'face 'ff/date-info-face)
+
+ )
;; display-time-format "%b %a %e %H:%M"
;; display-time-mail-face nil
(define-key global-map [f8] 'ff-find-other-file)
(define-key global-map [(shift f8)] (lambda () (interactive) (ff-find-other-file t)))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Antiword, htmlize and boxquote
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(autoload 'no-word "no-word")
-(add-to-list 'auto-mode-alist '("\\.doc\\'" . no-word))
-;; (add-to-list 'auto-mode-alist '("\\.DOC\\'" . no-word))
-
-(autoload 'htmlize-buffer "htmlize" nil t)
-
-(setq boxquote-top-and-tail "------------------")
-(autoload 'boxquote-region "boxquote" nil t)
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The compilation hacks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(while (re-search-forward "[0-9\.]+" nil t)
(let ((value (string-to-number (buffer-substring (match-beginning 0) (match-end 0)))))
(delete-region (match-beginning 0) (match-end 0))
- (insert (format "%0.2f" value)))))))
+ (insert (format "%0.3f" value)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Keymaping