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    ListFilter,
150    ListTodo,
151    ListTree,
152    ListX,
153    LoadCircle,
154    LocationEdit,
155    LockOutlined,
156    MagnifyingGlass,
157    Maximize,
158    Menu,
159    MenuAlt,
160    MenuAltTemp,
161    Mic,
162    MicMute,
163    Minimize,
164    Notepad,
165    Option,
166    PageDown,
167    PageUp,
168    Paperclip,
169    Pencil,
170    PencilUnavailable,
171    Person,
172    Pin,
173    PlayOutlined,
174    PlayFilled,
175    Plus,
176    Power,
177    Public,
178    PullRequest,
179    Quote,
180    Reader,
181    RefreshTitle,
182    Regex,
183    ReplNeutral,
184    Replace,
185    ReplaceAll,
186    ReplaceNext,
187    ReplyArrowRight,
188    Rerun,
189    Return,
190    RotateCcw,
191    RotateCw,
192    Scissors,
193    Screen,
194    SelectAll,
195    Send,
196    Server,
197    Settings,
198    ShieldCheck,
199    Shift,
200    Slash,
201    Sliders,
202    Space,
203    Sparkle,
204    Split,
205    SplitAlt,
206    SquareDot,
207    SquareMinus,
208    SquarePlus,
209    Star,
210    StarFilled,
211    Stop,
212    Supermaven,
213    SupermavenDisabled,
214    SupermavenError,
215    SupermavenInit,
216    SwatchBook,
217    Tab,
218    Terminal,
219    TerminalAlt,
220    TerminalGhost,
221    TextSnippet,
222    TextThread,
223    Thread,
224    ThreadFromSummary,
225    ThumbsDown,
226    ThumbsUp,
227    TodoComplete,
228    TodoPending,
229    TodoProgress,
230    ToolCopy,
231    ToolDeleteFile,
232    ToolDiagnostics,
233    ToolFolder,
234    ToolHammer,
235    ToolNotification,
236    ToolPencil,
237    ToolRead,
238    ToolRegex,
239    ToolSearch,
240    ToolTerminal,
241    ToolThink,
242    ToolWeb,
243    Trash,
244    Triangle,
245    TriangleRight,
246    Undo,
247    Unpin,
248    UserCheck,
249    UserGroup,
250    UserRoundPen,
251    Warning,
252    WholeWord,
253    XCircle,
254    XCircleFilled,
255    ZedAgent,
256    ZedAssistant,
257    ZedBurnMode,
258    ZedBurnModeOn,
259    ZedMcpCustom,
260    ZedMcpExtension,
261    ZedPredict,
262    ZedPredictDisabled,
263    ZedPredictDown,
264    ZedPredictError,
265    ZedPredictUp,
266    ZedXCopilot,
267    Linux,
268}
269
270impl IconName {
271    /// Returns the path to this icon.
272    pub fn path(&self) -> Arc<str> {
273        let file_stem: &'static str = self.into();
274        format!("icons/{file_stem}.svg").into()
275    }
276}