This configuration has a very minimal set of goals, and is likely not where you want to start. Unless you’re looking to roll your own emacs configuration and would like a starting point that stays out of your way. BaseMacs provides a set of helper functions for making a custom configuration of emacs a little bit nicer (opinionated statement). That’s it.
BaseMacs will bootstrap straight.el and use-package, and installs emacs-dashboard by default. Nothing else. If you enable
the other builtin layers, additional packages may get installed. For example, there is support in this framework, for
generating hydras
. However, the hydra package is not bootstrapped by default. If you enable that layer, then the packages
will get installed on the next restart of emacs, and you’ll be able to use the hyra helpers.
The recommended way to use BaseMacs is to clone this repository, drop your init.el in, and everything should just work as usual at that point. Unless you have code that performs the bootstrapping operations or package installs noted above, you should notice no difference, except now you have a dashboard with a friendly message telling you the available custom keybindings.
At this point you can start migrating your configuration to use the helper functions to generate custom hydras, add key bindings to your custom keymap and get them automatically added to the dashboard help output, build customization menus to handle configuring all of your options. Go nuts!
I’ll endeavor to fill this section out with a few basic examples to help get you started, as soon as possible.
Generates set data for `defcustom` from a list of tags and modes.
(base/generate-set-data tags-and-modes)
tags-and-modes
: A list of pairs where each pair is (tag mode).
Generates and evaluates a defcustom block.
(base/generate-defcustom custom-var-name custom-var-desc tags-and-modes custom-group)
custom-var-name
: The name of the custom variable.custom-var-desc
: Description of the custom variable.tags-and-modes
: A list of pairs where each pair is (tag mode).custom-group
: The group for the custom variable.
Adds a key binding to the BaseMacs keymap.
(base/add-key-binding key command help-text)
key
: The key to bind.command
: The command to execute.help-text
: A description of the command.
Creates an empty file or updates its modification timestamp if it exists.
(base/touch-file filename)
filename
: The name of the file to touch.
Creates a hydra menu.
(base/create-hydra-menu name menu-string input-data-list)
name
: The name of the hydra.menu-string
: The title of the menu.input-data-list
: A list of menu items, each containing a key, description, and command.
Inserts a banner into the dashboard buffer.
(base/dashboard-insert-logo-title banner)
banner
: The banner string or list of strings to insert.
Builds a list of strings to display as the banner.
(base/dashboard-build-logo-title lst)
lst
: A list of strings to form the banner.
Returns a random string from a list.
(base/random-string-from-list strings)
strings
: A list of strings to choose from.
Ensures that a directory exists, creating it if necessary.
(base/ensure-directory-exists dir)
dir
: The directory path to check or create.
Recursively lists all files in a directory with a given extension.
(base/list-files-with-extension dir extension)
dir
: The directory to search.extension
: The file extension to filter by.
Generates a unique filename for Org-capture.
(base/org-capture-get-unique-filename)
None.
Updates the org-agenda-files variable with all .org files in a directory.
(base/org-agenda-files-update)
None.
Contains help lines for the BaseMacs dashboard.
(setq base-help-lines '("Help lines"))
The prefix for all user keys (default is “C-c”).
(setq base-user-key-prefix "C-c")
The base for all user keys (default is “b”).
(setq base-user-key-base "b")
Container for the layer toggle options.
(setq base-layer-toggles '(("dashboard" base-dashboard-toggle)))
A tag used for help messages and labels.
(setq base-help-tag "BaseMacs")