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    Github,
146    Hash,
147    HistoryRerun,
148    Image,
149    Inception,
150    Indicator,
151    Info,
152    Json,
153    Keyboard,
154    Library,
155    LineHeight,
156    Link,
157    Linux,
158    ListCollapse,
159    ListFilter,
160    ListTodo,
161    ListTree,
162    ListX,
163    LoadCircle,
164    LocationEdit,
165    LockOutlined,
166    MagnifyingGlass,
167    Maximize,
168    Menu,
169    MenuAlt,
170    MenuAltTemp,
171    Mic,
172    MicMute,
173    Minimize,
174    Notepad,
175    Option,
176    PageDown,
177    PageUp,
178    Paperclip,
179    Pencil,
180    PencilUnavailable,
181    Person,
182    Pin,
183    PlayFilled,
184    PlayOutlined,
185    Plus,
186    Power,
187    Public,
188    PullRequest,
189    Quote,
190    Reader,
191    RefreshTitle,
192    Regex,
193    ReplNeutral,
194    Replace,
195    ReplaceAll,
196    ReplaceNext,
197    ReplyArrowRight,
198    Rerun,
199    Return,
200    RotateCcw,
201    RotateCw,
202    Scissors,
203    Screen,
204    SelectAll,
205    Send,
206    Server,
207    Settings,
208    ShieldCheck,
209    Shift,
210    Slash,
211    Sliders,
212    Space,
213    Sparkle,
214    Split,
215    SplitAlt,
216    SquareDot,
217    SquareMinus,
218    SquarePlus,
219    Star,
220    StarFilled,
221    Stop,
222    Supermaven,
223    SupermavenDisabled,
224    SupermavenError,
225    SupermavenInit,
226    SwatchBook,
227    SweepAi,
228    SweepAiDisabled,
229    SweepAiDown,
230    SweepAiError,
231    SweepAiUp,
232    Tab,
233    Terminal,
234    TerminalAlt,
235    TerminalGhost,
236    TextSnippet,
237    TextThread,
238    ThinkingMode,
239    ThinkingModeOff,
240    Thread,
241    ThreadFromSummary,
242    ThumbsDown,
243    ThumbsUp,
244    TodoComplete,
245    TodoPending,
246    TodoProgress,
247    ToolCopy,
248    ToolDeleteFile,
249    ToolDiagnostics,
250    ToolFolder,
251    ToolHammer,
252    ToolNotification,
253    ToolPencil,
254    ToolRead,
255    ToolRegex,
256    ToolSearch,
257    ToolTerminal,
258    ToolThink,
259    ToolWeb,
260    Trash,
261    Triangle,
262    TriangleRight,
263    Undo,
264    Unpin,
265    UserCheck,
266    UserGroup,
267    UserRoundPen,
268    Warning,
269    WholeWord,
270    WorkspaceNavClosed,
271    WorkspaceNavOpen,
272    XCircle,
273    XCircleFilled,
274    ZedAgent,
275    ZedAgentTwo,
276    ZedAssistant,
277    ZedPredict,
278    ZedPredictDisabled,
279    ZedPredictDown,
280    ZedPredictError,
281    ZedPredictUp,
282    ZedSrcCustom,
283    ZedSrcExtension,
284    ZedXCopilot,
285}
286
287impl IconName {
288    /// Returns the path to this icon.
289    pub fn path(&self) -> Arc<str> {
290        let file_stem: &'static str = self.into();
291        format!("icons/{file_stem}.svg").into()
292    }
293}