icons.rs

  1use std::sync::Arc;
  2
  3use serde::{Deserialize, Serialize};
  4use strum::{EnumIter, EnumString, IntoStaticStr};
  5
  6#[derive(
  7    Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
  8)]
  9#[strum(serialize_all = "snake_case")]
 10pub enum IconName {
 11    AcpRegistry,
 12    Ai,
 13    AiAnthropic,
 14    AiBedrock,
 15    AiClaude,
 16    AiDeepSeek,
 17    AiEdit,
 18    AiGemini,
 19    AiGoogle,
 20    AiLmStudio,
 21    AiMistral,
 22    AiOllama,
 23    AiOpenAi,
 24    AiOpenAiCompat,
 25    AiOpenRouter,
 26    AiVZero,
 27    AiXAi,
 28    AiZed,
 29    ArrowCircle,
 30    ArrowDown,
 31    ArrowDown10,
 32    ArrowDownRight,
 33    ArrowLeft,
 34    ArrowRight,
 35    ArrowRightLeft,
 36    ArrowUp,
 37    ArrowUpRight,
 38    AtSign,
 39    Attach,
 40    AudioOff,
 41    AudioOn,
 42    Backspace,
 43    Bell,
 44    BellDot,
 45    BellOff,
 46    BellRing,
 47    Binary,
 48    Blocks,
 49    BoltFilled,
 50    BoltOutlined,
 51    Book,
 52    BookCopy,
 53    Box,
 54    CaseSensitive,
 55    Chat,
 56    Check,
 57    CheckDouble,
 58    ChevronDown,
 59    ChevronDownUp,
 60    ChevronLeft,
 61    ChevronRight,
 62    ChevronUp,
 63    ChevronUpDown,
 64    Circle,
 65    CircleHelp,
 66    Close,
 67    CloudDownload,
 68    Code,
 69    Cog,
 70    Command,
 71    Control,
 72    Copilot,
 73    CopilotDisabled,
 74    CopilotError,
 75    CopilotInit,
 76    Copy,
 77    CountdownTimer,
 78    Crosshair,
 79    CursorIBeam,
 80    Dash,
 81    DatabaseZap,
 82    Debug,
 83    DebugBreakpoint,
 84    DebugContinue,
 85    DebugDetach,
 86    DebugDisabledBreakpoint,
 87    DebugDisabledLogBreakpoint,
 88    DebugIgnoreBreakpoints,
 89    DebugLogBreakpoint,
 90    DebugPause,
 91    DebugStepInto,
 92    DebugStepOut,
 93    DebugStepOver,
 94    Diff,
 95    DiffSplit,
 96    DiffUnified,
 97    Disconnected,
 98    Download,
 99    EditorAtom,
100    EditorCursor,
101    EditorEmacs,
102    EditorJetBrains,
103    EditorSublime,
104    EditorVsCode,
105    Ellipsis,
106    EllipsisVertical,
107    Envelope,
108    Eraser,
109    Escape,
110    Exit,
111    ExpandDown,
112    ExpandUp,
113    ExpandVertical,
114    Eye,
115    File,
116    FileCode,
117    FileDiff,
118    FileDoc,
119    FileGeneric,
120    FileGit,
121    FileLock,
122    FileMarkdown,
123    FileRust,
124    FileTextFilled,
125    FileTextOutlined,
126    FileToml,
127    FileTree,
128    Filter,
129    Flame,
130    Folder,
131    FolderOpen,
132    FolderSearch,
133    Font,
134    FontSize,
135    FontWeight,
136    ForwardArrow,
137    ForwardArrowUp,
138    GenericClose,
139    GenericMaximize,
140    GenericMinimize,
141    GenericRestore,
142    GitBranch,
143    GitBranchAlt,
144    GitBranchPlus,
145    GitCommit,
146    GitGraph,
147    Github,
148    Hash,
149    HistoryRerun,
150    Image,
151    Inception,
152    Indicator,
153    Info,
154    Json,
155    Keyboard,
156    Library,
157    LineHeight,
158    Link,
159    Linux,
160    ListCollapse,
161    ListFilter,
162    ListTodo,
163    ListTree,
164    ListX,
165    LoadCircle,
166    LocationEdit,
167    LockOutlined,
168    MagnifyingGlass,
169    Maximize,
170    Menu,
171    MenuAlt,
172    MenuAltTemp,
173    Mic,
174    MicMute,
175    Minimize,
176    Notepad,
177    Option,
178    PageDown,
179    PageUp,
180    Paperclip,
181    Pencil,
182    PencilUnavailable,
183    Person,
184    Pin,
185    PlayFilled,
186    PlayOutlined,
187    Plus,
188    Power,
189    Public,
190    PullRequest,
191    Quote,
192    Reader,
193    RefreshTitle,
194    Regex,
195    ReplNeutral,
196    Replace,
197    ReplaceAll,
198    ReplaceNext,
199    ReplyArrowRight,
200    Rerun,
201    Return,
202    RotateCcw,
203    RotateCw,
204    Scissors,
205    Screen,
206    SelectAll,
207    Send,
208    Server,
209    Settings,
210    ShieldCheck,
211    Shift,
212    Slash,
213    Sliders,
214    Space,
215    Sparkle,
216    Split,
217    SplitAlt,
218    SquareDot,
219    SquareMinus,
220    SquarePlus,
221    Star,
222    StarFilled,
223    Stop,
224    Supermaven,
225    SupermavenDisabled,
226    SupermavenError,
227    SupermavenInit,
228    SwatchBook,
229    SweepAi,
230    SweepAiDisabled,
231    SweepAiDown,
232    SweepAiError,
233    SweepAiUp,
234    Tab,
235    Terminal,
236    TerminalAlt,
237    TerminalGhost,
238    TextSnippet,
239    TextThread,
240    ThinkingMode,
241    ThinkingModeOff,
242    Thread,
243    ThreadFromSummary,
244    ThumbsDown,
245    ThumbsUp,
246    TodoComplete,
247    TodoPending,
248    TodoProgress,
249    ToolCopy,
250    ToolDeleteFile,
251    ToolDiagnostics,
252    ToolFolder,
253    ToolHammer,
254    ToolNotification,
255    ToolPencil,
256    ToolRead,
257    ToolRegex,
258    ToolSearch,
259    ToolTerminal,
260    ToolThink,
261    ToolWeb,
262    Trash,
263    Triangle,
264    TriangleRight,
265    Undo,
266    Unpin,
267    UserCheck,
268    UserGroup,
269    UserRoundPen,
270    Warning,
271    WholeWord,
272    WorkspaceNavClosed,
273    WorkspaceNavOpen,
274    XCircle,
275    XCircleFilled,
276    ZedAgent,
277    ZedAgentTwo,
278    ZedAssistant,
279    ZedPredict,
280    ZedPredictDisabled,
281    ZedPredictDown,
282    ZedPredictError,
283    ZedPredictUp,
284    ZedSrcCustom,
285    ZedSrcExtension,
286    ZedXCopilot,
287}
288
289impl IconName {
290    /// Returns the path to this icon.
291    pub fn path(&self) -> Arc<str> {
292        let file_stem: &'static str = self.into();
293        format!("icons/{file_stem}.svg").into()
294    }
295}