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    TerminalGhost,
219    TextSnippet,
220    TextThread,
221    Thread,
222    ThreadFromSummary,
223    ThumbsDown,
224    ThumbsUp,
225    TodoComplete,
226    TodoPending,
227    TodoProgress,
228    ToolCopy,
229    ToolDeleteFile,
230    ToolDiagnostics,
231    ToolFolder,
232    ToolHammer,
233    ToolNotification,
234    ToolPencil,
235    ToolRead,
236    ToolRegex,
237    ToolSearch,
238    ToolTerminal,
239    ToolThink,
240    ToolWeb,
241    Trash,
242    Triangle,
243    TriangleRight,
244    Undo,
245    Unpin,
246    UserCheck,
247    UserGroup,
248    UserRoundPen,
249    Warning,
250    WholeWord,
251    XCircle,
252    XCircleFilled,
253    ZedAgent,
254    ZedAssistant,
255    ZedBurnMode,
256    ZedBurnModeOn,
257    ZedMcpCustom,
258    ZedMcpExtension,
259    ZedPredict,
260    ZedPredictDisabled,
261    ZedPredictDown,
262    ZedPredictError,
263    ZedPredictUp,
264    ZedXCopilot,
265}
266
267impl IconName {
268    /// Returns the path to this icon.
269    pub fn path(&self) -> Arc<str> {
270        let file_stem: &'static str = self.into();
271        format!("icons/{file_stem}.svg").into()
272    }
273}