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    Disconnected,
 96    Download,
 97    EditorAtom,
 98    EditorCursor,
 99    EditorEmacs,
100    EditorJetBrains,
101    EditorSublime,
102    EditorVsCode,
103    Ellipsis,
104    EllipsisVertical,
105    Envelope,
106    Eraser,
107    Escape,
108    Exit,
109    ExpandDown,
110    ExpandUp,
111    ExpandVertical,
112    Eye,
113    File,
114    FileCode,
115    FileDiff,
116    FileDoc,
117    FileGeneric,
118    FileGit,
119    FileLock,
120    FileMarkdown,
121    FileRust,
122    FileTextFilled,
123    FileTextOutlined,
124    FileToml,
125    FileTree,
126    Filter,
127    Flame,
128    Folder,
129    FolderOpen,
130    FolderSearch,
131    Font,
132    FontSize,
133    FontWeight,
134    ForwardArrow,
135    GenericClose,
136    GenericMaximize,
137    GenericMinimize,
138    GenericRestore,
139    GitBranch,
140    GitBranchAlt,
141    GitBranchPlus,
142    Github,
143    Hash,
144    HistoryRerun,
145    Image,
146    Inception,
147    Indicator,
148    Info,
149    Json,
150    Keyboard,
151    Library,
152    LineHeight,
153    Link,
154    Linux,
155    ListCollapse,
156    ListFilter,
157    ListTodo,
158    ListTree,
159    ListX,
160    LoadCircle,
161    LocationEdit,
162    LockOutlined,
163    MagnifyingGlass,
164    Maximize,
165    Menu,
166    MenuAlt,
167    MenuAltTemp,
168    Mic,
169    MicMute,
170    Minimize,
171    Notepad,
172    Option,
173    PageDown,
174    PageUp,
175    Paperclip,
176    Pencil,
177    PencilUnavailable,
178    Person,
179    Pin,
180    PlayFilled,
181    PlayOutlined,
182    Plus,
183    Power,
184    Public,
185    PullRequest,
186    Quote,
187    Reader,
188    RefreshTitle,
189    Regex,
190    ReplNeutral,
191    Replace,
192    ReplaceAll,
193    ReplaceNext,
194    ReplyArrowRight,
195    Rerun,
196    Return,
197    RotateCcw,
198    RotateCw,
199    Scissors,
200    Screen,
201    SelectAll,
202    Send,
203    Server,
204    Settings,
205    ShieldCheck,
206    Shift,
207    Slash,
208    Sliders,
209    Space,
210    Sparkle,
211    Split,
212    SplitAlt,
213    SquareDot,
214    SquareMinus,
215    SquarePlus,
216    Star,
217    StarFilled,
218    Stop,
219    Supermaven,
220    SupermavenDisabled,
221    SupermavenError,
222    SupermavenInit,
223    SwatchBook,
224    SweepAi,
225    Tab,
226    Terminal,
227    TerminalAlt,
228    TerminalGhost,
229    TextSnippet,
230    TextThread,
231    Thread,
232    ThreadFromSummary,
233    ThumbsDown,
234    ThumbsUp,
235    TodoComplete,
236    TodoPending,
237    TodoProgress,
238    ToolCopy,
239    ToolDeleteFile,
240    ToolDiagnostics,
241    ToolFolder,
242    ToolHammer,
243    ToolNotification,
244    ToolPencil,
245    ToolRead,
246    ToolRegex,
247    ToolSearch,
248    ToolTerminal,
249    ToolThink,
250    ToolWeb,
251    Trash,
252    Triangle,
253    TriangleRight,
254    Undo,
255    Unpin,
256    UserCheck,
257    UserGroup,
258    UserRoundPen,
259    Warning,
260    WholeWord,
261    XCircle,
262    XCircleFilled,
263    ZedAgent,
264    ZedAgentTwo,
265    ZedAssistant,
266    ZedPredict,
267    ZedPredictDisabled,
268    ZedPredictDown,
269    ZedPredictError,
270    ZedPredictUp,
271    ZedSrcCustom,
272    ZedSrcExtension,
273    ZedXCopilot,
274}
275
276impl IconName {
277    /// Returns the path to this icon.
278    pub fn path(&self) -> Arc<str> {
279        let file_stem: &'static str = self.into();
280        format!("icons/{file_stem}.svg").into()
281    }
282}