Fixed a bit of the startup
This commit is contained in:
		
							parent
							
								
									da51188cc1
								
							
						
					
					
						commit
						1f9f59d9ed
					
				
					 3 changed files with 18 additions and 18 deletions
				
			
		|  | @ -23,8 +23,7 @@ | ||||||
|   "Play a default notification sound file. |   "Play a default notification sound file. | ||||||
| Customize the variable, `beep-alert-sound-file' to adjust the sound." | Customize the variable, `beep-alert-sound-file' to adjust the sound." | ||||||
|   (if (fboundp 'play-sound-internal) |   (if (fboundp 'play-sound-internal) | ||||||
|       (ignore-errors |       (play-sound-file beep-alert-sound-file) | ||||||
|         (play-sound-file beep-alert-sound-file)) |  | ||||||
|     (call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0))) |     (call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0))) | ||||||
| 
 | 
 | ||||||
| (defvar beep-speech-executable "say %s" | (defvar beep-speech-executable "say %s" | ||||||
|  | @ -36,23 +35,23 @@ Customize the variable, `beep-speech-executable'." | ||||||
|   (let ((command (format beep-speech-executable phrase))) |   (let ((command (format beep-speech-executable phrase))) | ||||||
|     (async-shell-command command))) |     (async-shell-command command))) | ||||||
| 
 | 
 | ||||||
| (defun beep--when-finished (phrase &optional to-speak) | (defun beep-when-finished (phrase &optional to-speak) | ||||||
|   "Notify us with string, PHRASE, to grab our attention. |   "Notify us with string, PHRASE, to grab our attention. | ||||||
| Useful after a long process has completed, but use sparingly, | Useful after a long process has completed, but use sparingly, | ||||||
| as this can be pretty distracting." | as this can be pretty distracting." | ||||||
|   (message phrase) |  | ||||||
|   (when (functionp 'alert) |   (when (functionp 'alert) | ||||||
|     (alert phrase :title "Completed")) |     (alert phrase :title "Completed")) | ||||||
|   (beep--beep) |   (beep--beep) | ||||||
|   (beep--speak (or to-speak phrase))) |   (beep--speak (or to-speak phrase)) | ||||||
|  |   (message phrase)) | ||||||
| 
 | 
 | ||||||
| (defun compile-and-notify () | (defun compile-and-notify () | ||||||
|   "Call `compile' and notify us when finished. |   "Call `compile' and notify us when finished. | ||||||
| See `beep--when-finished' for details." | See `beep-when-finished' for details." | ||||||
|   (interactive) |   (interactive) | ||||||
|   (let ((default-directory (projectile-project-root))) |   (let ((default-directory (projectile-project-root))) | ||||||
|     (call-interactively 'compile) |     (call-interactively 'compile) | ||||||
|     (beep--when-finished "The compile command has finished."))) |     (beep-when-finished "The compile command has finished."))) | ||||||
| 
 | 
 | ||||||
| (defvar beep-func-too-long-time 5 | (defvar beep-func-too-long-time 5 | ||||||
|    "The number of seconds a function runs before it is considered taking too much time, and needing to be alerted when it has finished.") |    "The number of seconds a function runs before it is considered taking too much time, and needing to be alerted when it has finished.") | ||||||
|  | @ -68,11 +67,11 @@ See `beep--when-finished' for details." | ||||||
|                      decode-time |                      decode-time | ||||||
|                      first)) |                      first)) | ||||||
|     (when (> duration beep-func-too-long-time) |     (when (> duration beep-func-too-long-time) | ||||||
|       (beep--when-finished (format "The function, %s, has finished." func))))) |       (beep-when-finished (format "The function, %s, has finished." func))))) | ||||||
| 
 | 
 | ||||||
| (defun recompile-and-notify () | (defun recompile-and-notify () | ||||||
|   "Call `recompile' and notify us when finished. |   "Call `recompile' and notify us when finished. | ||||||
| See `beep--when-finished' for details." | See `beep-when-finished' for details." | ||||||
|   (interactive) |   (interactive) | ||||||
|   (beep--after-function 'recompile)) |   (beep--after-function 'recompile)) | ||||||
| 
 | 
 | ||||||
|  | @ -93,7 +92,7 @@ See `beep--when-finished' for details." | ||||||
|                      decode-time |                      decode-time | ||||||
|                      first)) |                      first)) | ||||||
|     (when (> duration beep-func-too-long-time) |     (when (> duration beep-func-too-long-time) | ||||||
|       (beep--when-finished (format "The function, %s, has finished." |       (beep-when-finished (format "The function, %s, has finished." | ||||||
|                                    (beep--extract-function-name orig-function)))))) |                                    (beep--extract-function-name orig-function)))))) | ||||||
| 
 | 
 | ||||||
| (defun beep--extract-function-name (expr) | (defun beep--extract-function-name (expr) | ||||||
|  |  | ||||||
|  | @ -101,12 +101,12 @@ I would appreciate seeing if my Emacs installation has the features that I expec | ||||||
|                     (feature-combo (all-the-icons-faicon "database") "Sqlite")) |                     (feature-combo (all-the-icons-faicon "database") "Sqlite")) | ||||||
|                   (when (gnutls-available-p) |                   (when (gnutls-available-p) | ||||||
|                     (feature-combo (all-the-icons-faicon "expeditedssl") "TLS")) |                     (feature-combo (all-the-icons-faicon "expeditedssl") "TLS")) | ||||||
|                   ;; TODO: |                   (when (or (string-search "with-mailutils" system-configuration-options) | ||||||
|                   ;; Mailutils? How do we figure out if we are using Gnu Mailutils? |                             (string-search "without-pop" system-configuration-options)) | ||||||
|                   ;;       (mail-icon  (all-the-icons-material "mail")) |                     (feature-combo (all-the-icons-material "mail") "GNU Mail")) | ||||||
|                   ;; XWidgets?  Need to get on my Linux box and compile this. |                   (when (fboundp 'make-xwidget) | ||||||
|                   ;;     (widget-icon  (all-the-icons-material "widgets")) |                     (feature-combo (all-the-icons-material "widgets") "XWidgets")) | ||||||
|                   (when (fboundp 'module-load) |                   (when module-file-suffix  ; or (fboundp 'module-load) | ||||||
|                     (feature-combo (all-the-icons-faicon "th")      "Modules")) |                     (feature-combo (all-the-icons-faicon "th")      "Modules")) | ||||||
|                   (when (json-available-p) |                   (when (json-available-p) | ||||||
|                     (feature-combo (all-the-icons-fileicon "config-js") "JSON")) |                     (feature-combo (all-the-icons-fileicon "config-js") "JSON")) | ||||||
|  | @ -257,7 +257,8 @@ The =dashboard= project hooks to [[help:emacs-startup-hook][emacs-startup-hook]] | ||||||
|     ;; (shrink-window-horizontally (- (window-size nil t) 50)) |     ;; (shrink-window-horizontally (- (window-size nil t) 50)) | ||||||
|     (shrink-window-horizontally 40) |     (shrink-window-horizontally 40) | ||||||
|     (goto-char (point-min)) |     (goto-char (point-min)) | ||||||
|     (call-interactively 'ha-hamacs-features)) |     (add-hook 'after-init (lambda () | ||||||
|  |                    (call-interactively 'ha-hamacs-features)))) | ||||||
| #+end_src | #+end_src | ||||||
| * Technical Artifacts                                :noexport: | * Technical Artifacts                                :noexport: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -608,7 +608,7 @@ As I've mentioned [[http://www.howardism.org/Technical/Emacs/beep-for-emacs.html | ||||||
| 
 | 
 | ||||||
|   (use-package beep |   (use-package beep | ||||||
|     :straight nil   ; Already in the load-path |     :straight nil   ; Already in the load-path | ||||||
|     :hook (after-init . (lambda () (beep--when-finished "Emacs has started." "Eemacs has started"))) |     :hook (after-init . (lambda () (beep-when-finished "Emacs has started." "Eemacs has started"))) | ||||||
|     :config |     :config | ||||||
|     (dolist (func '(org-publish |     (dolist (func '(org-publish | ||||||
|                     org-publish-all |                     org-publish-all | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue