diff --git a/custom-modes/heartbeat-cursor.el b/custom-modes/heartbeat-cursor.el new file mode 100644 index 000000000..58b746454 --- /dev/null +++ b/custom-modes/heartbeat-cursor.el @@ -0,0 +1,37 @@ +(require 'cl) +(require 'color) + +(defvar heartbeat-fps 16) +(defvar heartbeat-period 4) + +(defun heartbeat-range (from to cnt) + (let ((step (/ (- to from) (float cnt)))) + (loop for i below cnt collect (+ from (* step i))))) + +(defun heartbeat-cursor-colors () + (let ((cnt (* heartbeat-period heartbeat-fps))) + (mapcar (lambda (r) + (color-rgb-to-hex r 0 0)) + (nconc (heartbeat-range .2 1 (/ cnt 2)) + (heartbeat-range 1 .2 (/ cnt 2)))))) + +(defvar heartbeat-cursor-timer nil) +(defvar heartbeat-cursor-old-color) + +(define-minor-mode heartbeat-cursor-mode + "Change cursor color with the heartbeat effect." + nil "" nil + :global t + (when heartbeat-cursor-timer + (cancel-timer heartbeat-cursor-timer) + (setq heartbeat-cursor-timer nil) + (set-face-background 'cursor heartbeat-cursor-old-color)) + (when heartbeat-cursor-mode + (setq heartbeat-cursor-old-color (face-background 'cursor) + heartbeat-cursor-timer + (run-with-timer + 0 (/ 1 (float heartbeat-fps)) + (lexical-let ((colors (heartbeat-cursor-colors)) tail) + (lambda () + (setq tail (or (cdr tail) colors)) + (set-face-background 'cursor (car tail)))))))) diff --git a/my-package-init/init-ace-jump-mode.el b/my-package-init/init-ace-jump-mode.el new file mode 100644 index 000000000..e8cf64a3f --- /dev/null +++ b/my-package-init/init-ace-jump-mode.el @@ -0,0 +1,7 @@ +(autoload + 'ace-jump-mode + "ace-jump-mode" + "Emacs quick move minor mode" + t) +;; you can select the key you prefer to +(define-key global-map (kbd "C-c SPC") 'ace-jump-mode) diff --git a/my-package-init/init-auto-complete.el b/my-package-init/init-auto-complete.el new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/my-package-init/init-auto-complete.el @@ -0,0 +1 @@ + diff --git a/my-package-init/init-eproject.el b/my-package-init/init-eproject.el new file mode 100644 index 000000000..8924466d7 --- /dev/null +++ b/my-package-init/init-eproject.el @@ -0,0 +1,14 @@ +(require 'eproject) +(require 'eproject-extras) + +(define-project-type python (generic) + (look-for "dummy_dummy") + :relevant-files ("\\.py$") + :irrevelant-files ("\\.pyc$")) + +(define-project-type Wrappy (python) (look-for "wrappy.py")) +(define-project-type Mappy (python) (look-for "mappy.py")) + +(require 'eproject-anything) +(global-set-key (kbd "s-L") 'anything-eproject-files) +(global-set-key (kbd "s-b") 'anything-eproject-buffers) diff --git a/my-package-init/init-pymacs.el b/my-package-init/init-pymacs.el new file mode 100644 index 000000000..3c47575ce --- /dev/null +++ b/my-package-init/init-pymacs.el @@ -0,0 +1,2 @@ +(pymacs-load "ropemacs" "rope-") +(setq ropemacs-enable-autoimport t)