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    AtSign,
 39    AudioOff,
 40    AudioOn,
 41    Backspace,
 42    Bell,
 43    BellDot,
 44    BellOff,
 45    BellRing,
 46    Binary,
 47    Blocks,
 48    BoltOutlined,
 49    BoltFilled,
 50    Book,
 51    BookCopy,
 52    CaseSensitive,
 53    Chat,
 54    Check,
 55    CheckDouble,
 56    ChevronDown,
 57    ChevronDownUp,
 58    ChevronLeft,
 59    ChevronRight,
 60    ChevronUp,
 61    ChevronUpDown,
 62    Circle,
 63    CircleHelp,
 64    Close,
 65    CloudDownload,
 66    Code,
 67    Cog,
 68    Command,
 69    Control,
 70    Copilot,
 71    CopilotDisabled,
 72    CopilotError,
 73    CopilotInit,
 74    Copy,
 75    CountdownTimer,
 76    Crosshair,
 77    CursorIBeam,
 78    Dash,
 79    DatabaseZap,
 80    Debug,
 81    DebugBreakpoint,
 82    DebugContinue,
 83    DebugDisabledBreakpoint,
 84    DebugDisabledLogBreakpoint,
 85    DebugDetach,
 86    DebugIgnoreBreakpoints,
 87    DebugLogBreakpoint,
 88    DebugPause,
 89    DebugStepBack,
 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    Github,
141    Hash,
142    HistoryRerun,
143    Image,
144    Indicator,
145    Info,
146    Json,
147    Keyboard,
148    Library,
149    LineHeight,
150    Link,
151    ListCollapse,
152    ListFilter,
153    ListTodo,
154    ListTree,
155    ListX,
156    LoadCircle,
157    LocationEdit,
158    LockOutlined,
159    MagnifyingGlass,
160    Maximize,
161    Menu,
162    MenuAlt,
163    MenuAltTemp,
164    Mic,
165    MicMute,
166    Minimize,
167    Notepad,
168    Option,
169    PageDown,
170    PageUp,
171    Paperclip,
172    Pencil,
173    PencilUnavailable,
174    Person,
175    Pin,
176    PlayOutlined,
177    PlayFilled,
178    Plus,
179    Power,
180    Public,
181    PullRequest,
182    Quote,
183    Reader,
184    RefreshTitle,
185    Regex,
186    ReplNeutral,
187    Replace,
188    ReplaceAll,
189    ReplaceNext,
190    ReplyArrowRight,
191    Rerun,
192    Return,
193    RotateCcw,
194    RotateCw,
195    Scissors,
196    Screen,
197    SelectAll,
198    Send,
199    Server,
200    Settings,
201    ShieldCheck,
202    Shift,
203    Slash,
204    Sliders,
205    Space,
206    Sparkle,
207    Split,
208    SplitAlt,
209    SquareDot,
210    SquareMinus,
211    SquarePlus,
212    Star,
213    StarFilled,
214    Stop,
215    Supermaven,
216    SupermavenDisabled,
217    SupermavenError,
218    SupermavenInit,
219    SwatchBook,
220    SweepAi,
221    Tab,
222    Terminal,
223    TerminalAlt,
224    TerminalGhost,
225    TextSnippet,
226    TextThread,
227    Thread,
228    ThreadFromSummary,
229    ThumbsDown,
230    ThumbsUp,
231    TodoComplete,
232    TodoPending,
233    TodoProgress,
234    ToolCopy,
235    ToolDeleteFile,
236    ToolDiagnostics,
237    ToolFolder,
238    ToolHammer,
239    ToolNotification,
240    ToolPencil,
241    ToolRead,
242    ToolRegex,
243    ToolSearch,
244    ToolTerminal,
245    ToolThink,
246    ToolWeb,
247    Trash,
248    Triangle,
249    TriangleRight,
250    Undo,
251    Unpin,
252    UserCheck,
253    UserGroup,
254    UserRoundPen,
255    Warning,
256    WholeWord,
257    XCircle,
258    XCircleFilled,
259    ZedAgent,
260    ZedAssistant,
261    ZedBurnMode,
262    ZedBurnModeOn,
263    ZedSrcCustom,
264    ZedSrcExtension,
265    ZedPredict,
266    ZedPredictDisabled,
267    ZedPredictDown,
268    ZedPredictError,
269    ZedPredictUp,
270    ZedXCopilot,
271    Linux,
272}
273
274impl IconName {
275    /// Returns the path to this icon.
276    pub fn path(&self) -> Arc<str> {
277        let file_stem: &'static str = self.into();
278        format!("icons/{file_stem}.svg").into()
279    }
280}