Fix the dashboard including a function to tell me what is available

Minor tweaks to things that have bothered me.
This commit is contained in:
Howard Abrams 2022-04-01 11:35:27 -07:00
parent cc2fb9b988
commit b84fbeb5d4
3 changed files with 42 additions and 3 deletions

View file

@ -25,7 +25,17 @@ A literate programming file to configure the Emacs UI.
;;; Code:
#+END_SRC
* Dashboard
The [[https://github.com/emacs-dashboard/emacs-dashboard][emacs-dashboard]] project makes a nicer startup screen.
The [[https://github.com/emacs-dashboard/emacs-dashboard][emacs-dashboard]] project makes a nicer startup screen. It requires [[https://github.com/purcell/page-break-lines][page-break-lines]] (which is a nice project):
#+BEGIN_SRC emacs-lisp
(use-package page-break-lines)
#+END_SRC
And lets make this Emacs look more like a fancy IDE with [[https://github.com/domtronn/all-the-icons.el][all-the-icons]]:
#+BEGIN_SRC emacs-lisp
(use-package all-the-icons
:if (display-graphic-p))
#+END_SRC
#+BEGIN_SRC emacs-lisp
(use-package dashboard
:init
@ -52,6 +62,31 @@ The [[https://github.com/emacs-dashboard/emacs-dashboard][emacs-dashboard]] proj
(setq dashboard-footer-messages (list (ha--dad-joke))))
#+END_SRC
I would appreciate seeing if my Emacs installation has the features that I expect:
#+BEGIN_SRC emacs-lisp
(defun ha-hamacs-features (&optional iconic)
"Simple display of features I'm most keen about.
If ICONIC is non-nil, return a string of icons."
(interactive)
(let* ((png-icon (all-the-icons-material "image"))
(svg-icon (all-the-icons-alltheicon "svg"))
(tls-icon (all-the-icons-faicon "expeditedssl"))
(json-icon (all-the-icons-fileicon "jsx"))
(mag-icon (all-the-icons-faicon "magic"))
(jit-icon (all-the-icons-faicon "cog"))
(results (s-join " "
(list (when (and (fboundp 'native-comp-available-p)
(native-comp-available-p)) (if iconic jit-icon "Native-Compilation"))
(when (image-type-available-p 'svg) (if iconic svg-icon "SVG"))
(when (image-type-available-p 'png) (if iconic png-icon "PNG"))
(when (gnutls-available-p) (if iconic tls-icon "TLS"))
(when (json-available-p) (if iconic json-icon "JSON"))
(when (fboundp 'imagemagick-types) (if iconic mag-icon "ImageMagick"))))))
(if (called-interactively-p)
(message "Enabled features: %s" results)
results)))
#+END_SRC
* Mode Line
Let's install and load some of packages from the [[https://github.com/hlissner/doom-emacs][Doom Emacs]] project, like [[https://github.com/seagle0128/doom-modeline][doom-modeline]] and maybe the themes:
#+BEGIN_SRC emacs-lisp

View file

@ -302,8 +302,12 @@ The [[https://graphviz.org/][graphviz project]] can be written in org blocks, an
#+END_SRC
For example:
#+BEGIN_SRC dot :file ha-org-graphviz-example.png :exports file :results replace file
#+BEGIN_SRC dot :file support/ha-org-graphviz-example.png :exports file :results replace file
digraph G {
graph [bgcolor=transparent];
edge [color=white];
node[style=filled];
A -> B -> E;
A -> D;
A -> C;
@ -317,7 +321,7 @@ For example:
#+ATTR_ORG: :width 400px
#+RESULTS:
[[file:ha-org-graphviz-example.png]]
[[file:support/ha-org-graphviz-example.png]]
*** Next Image
When I create images or other artifacts that I consider /part/ of the org document, I want to have them based on the org file, but with a prepended number. Keeping track of what numbers are now free is difficult, so for a /default/ let's figure it out:

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB