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