From 8d64d1eeb01cc40b52f02f488f8a8b34b047c735 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 24 Dec 2021 19:25:18 -0500 Subject: feat(wpcarro/emacs): Support emojis in Emacs 🎉 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The future has arrived... Change-Id: Ib4e57018cbf9168e43f403e4e0b640d0e0035352 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4595 Reviewed-by: wpcarro Autosubmit: wpcarro Tested-by: BuildkiteCI --- users/wpcarro/emacs/.emacs.d/wpc/keybindings.el | 2 ++ users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el | 9 +++++++++ users/wpcarro/emacs/default.nix | 1 + 3 files changed, 12 insertions(+) (limited to 'users') diff --git a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el index 78ec1ceb5e02..531e5ed4ead7 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el @@ -37,6 +37,7 @@ (require 'bookmark) (require 'tvl) (require 'window-manager) +(require 'wpc-misc) ;; Note: The following lines must be sorted this way. (setq evil-want-integration t) @@ -175,6 +176,7 @@ (keybindings-exwm "" #'window-manager-next-workspace) (keybindings-exwm "" #'window-manager-prev-workspace) (keybindings-exwm "C-M-\\" #'ivy-pass) +(keybindings-exwm "s-e" #'wpc-misc-copy-emoji) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Workspaces diff --git a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el index 2773629c9f13..9af5d88d3804 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el @@ -311,6 +311,15 @@ :config (paradox-enable)) +;; render emojis in Emacs 🕺 +(use-package emojify + :config + (add-hook 'after-init-hook #'global-emojify-mode) + (defun wpc-misc-copy-emoji () + "Select an emoji from the completing-read menu." + (interactive) + (clipboard-copy (emojify-completing-read "Copy: ")))) + ;; Start the Emacs server (when (not (server-running-p)) (server-start)) diff --git a/users/wpcarro/emacs/default.nix b/users/wpcarro/emacs/default.nix index 3645f880ee30..76f86cf82a32 100644 --- a/users/wpcarro/emacs/default.nix +++ b/users/wpcarro/emacs/default.nix @@ -112,6 +112,7 @@ let company counsel flycheck + emojify ])); vendorDir = path { -- cgit 1.4.1