-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmagpt-ui-icons.el
More file actions
46 lines (38 loc) · 1.22 KB
/
magpt-ui-icons.el
File metadata and controls
46 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;;; magpt-ui-icons.el --- Emoji icons for MaGPT UI -*- lexical-binding: t; -*-
;; Centralized emoji icons mapping and helper.
;;; Code:
(defgroup magpt-ui nil
"User interface settings for MaGPT."
:group 'magpt)
(defcustom magpt-ui-icons-enabled t
"If non-nil, show emoji icons in MaGPT UI."
:type 'boolean
:group 'magpt-ui)
(defcustom magpt-ui-emoji-map
'((suggestions . "💡")
(suggestion-default . "💡")
(summary . "ℹ️")
(risk . "⚠️")
(commit-lint . "✅")
(branch-name . "🌿")
(resolve-conflict . "🔀")
(push-pull . "🔄")
(branches-overview . "🌳")
(restore-file . "↩️")
(reset-files . "🕓")
(stash . "📦")
(undo-commits . "⏪")
(reflog-rescue . "🛟")
(detached-head . "🧩")
(set-upstream . "🡕")
(eshell-button . "⌨️"))
"Emoji icons used by MaGPT UI."
:type '(alist :key-type symbol :value-type string)
:group 'magpt-ui)
(defun magpt--icon (key)
"Return emoji icon string for KEY when icons are enabled; empty string otherwise."
(if (and (boundp 'magpt-ui-icons-enabled) magpt-ui-icons-enabled)
(or (alist-get key magpt-ui-emoji-map) "")
""))
(provide 'magpt-ui-icons)
;;; magpt-ui-icons.el ends here