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