:inverse-video nil)
(mode-line-inactive :background "gray60" :foreground "black" :box nil
:inverse-video nil)
- ;; (tex-verbatim :family nil)
(region :background "springgreen2")
(ff/date-info-face :foreground "white" :weight 'bold)
(ff/mail-alarm-face :foreground "red" :weight 'bold)
;; (ff/configure-faces '((default :background "gray80" :foreground "black")))
(when window-system
- (setq
- display-time-use-mail-icon t)
+ ;; (setq
+ ;; display-time-use-mail-icon t)
(ff/configure-faces
'(
:inverse-video nil)
;; (fringe :background "black" :foreground "gray90")
(fringe :background "gray65")
+ (tex-verbatim :family "courrier")
(ff/date-info-face :foreground "white" :weight 'bold)
(ff/mail-alarm-face :foreground "white" :background "red2")
;; (alarm-vc-face :foreground "black" :background "yellow" :weight 'normal)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; http://blog.tuxicity.se/elisp/emacs/2010/03/26/rename-file-and-buffer-in-emacs.htm
+
+(defun rename-file-and-buffer ()
+ "Renames current buffer and file it is visiting."
+ (interactive)
+ (let ((name (buffer-name))
+ (filename (buffer-file-name)))
+ (if (not (and filename (file-exists-p filename)))
+ (message "Buffer '%s' is not visiting a file!" name)
+ (let ((new-name (read-file-name "New name: " filename)))
+ (cond ((get-buffer new-name)
+ (message "A buffer named '%s' already exists!" new-name))
+ (t
+ (rename-file name new-name 1)
+ (rename-buffer new-name)
+ (set-visited-file-name new-name)
+ (set-buffer-modified-p nil)))))))
+
+(global-set-key (kbd "C-c r") 'rename-file-and-buffer)
+
(defun ff/non-existing-filename (dir prefix suffix)
"Returns a filename of the form DIR/PREFIX[.n].SUFFIX whose file does
not exist"
(propertize
(with-temp-buffer (apply 'call-process x)
(buffer-string))
- 'face 'highlight)
+ 'face '(:background "gray80"))
(with-temp-buffer (apply 'call-process x)
(buffer-string))
))
display-time-interval 15 ;; Check every 15s
display-time-string-forms `(
+
;; (if mail
;; (concat " "
;; (propertize " mail "
(when (ff/load-or-alert "lookup-dict" t)
(define-key global-map [(control \?)] 'lookup-dict))
+;; (defun ff/generate-password () (interactive)
+ ;; (let ((c "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"))
+ ;; (nth (random (length c)) c))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Automatization of things I do often
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(interactive)
(let ((flag-name (replace-regexp-in-string
"[\. \(\)]" "_"
- (upcase (file-name-nondirectory (buffer-name))))))
+ (upcase (file-name-nondirectory (buffer-file-name))))))
(goto-char (point-max))
(insert "\n#endif\n")
(goto-char (point-min))
"-framedrop"
"-zoom"
"-subfont-osd-scale" "3"
+ ;; "-stop-xscreensaver"
;; "-osdlevel" "3"
)
media/mplayer/timing-request-period 5.0
(when (ff/load-or-alert "enotes" t)
(setq enotes/file "~/private/enotes"
enotes/show-help nil
- enotes/full-display nil)
+ enotes/full-display nil
+ enotes/default-time-fields "9:30")
+
(enotes/init)
;; (add-hook 'enotes/alarm-hook
;; (lambda () (ff/play-sound-async "~/local/sounds/three_notes2.wav")))