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