tvl-depot/configs/shared/.emacs.d/wpc/dotfiles.el
William Carroll 7ae17daa98 Drop support for i3
While I first switched to EXWM warily and thinking it would only be temporary,
it seems like this switch is here to stay. It turns out that EXWM was exactly
the integration I've been looking for. How serendipitous it that I found it when
I did.

Thank you, @tazjin.
2020-01-06 15:25:25 +00:00

44 lines
1.3 KiB
EmacsLisp

;;; dotfiles.el --- Elisp to make dotfile management -*- lexical-binding: t -*-
;; Author: William Carroll <wpcarro@gmail.com>
;;; Commentary:
;; Quickly edit commonly used files.
;;; Code:
(require 'macros)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; API
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst dotfiles/install-kbds? t
"When t, install the keybindings.")
(defconst dotfiles/whitelist
'(("compton" . "~/.config/compton.conf")
("dotfiles" . "~/Dropbox/dotfiles/")
("functions" . "~/functions.zsh")
("aliases" . "~/aliases.zsh")
("variables" . "~/variables.zsh")
("Xresources" . "~/.Xresources.shared")
("tmux" . "~/.tmux.conf")
("zshrc" . "~/.zshrc")
("configuration.nix" . "~/Dropbox/programming/nixify/configuration.nix")
("init.el" . "~/.emacs.d/init.el")
("init.vim" . "~/.config/nvim/init.vim"))
"Dotfiles that I commonly edit.")
(defun dotfiles/edit ()
"Select a dotfile from ivy and edit it in an Emacs buffer."
(interactive)
(ivy-read
"Dotfile: "
dotfiles/whitelist
:action (>> cdr find-file)))
(when dotfiles/install-kbds?
(evil-leader/set-key "J" #'dotfiles/edit))
(provide 'dotfiles)
;;; dotfiles.el ends here