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    AiDeepSeek,
 15    AiEdit,
 16    AiGemini,
 17    AiGoogle,
 18    AiLmStudio,
 19    AiMistral,
 20    AiOllama,
 21    AiOpenAi,
 22    AiOpenRouter,
 23    AiVZero,
 24    AiZed,
 25    ArrowCircle,
 26    ArrowDown,
 27    ArrowDown10,
 28    ArrowDownFromLine,
 29    ArrowDownRight,
 30    ArrowLeft,
 31    ArrowRight,
 32    ArrowRightLeft,
 33    ArrowUp,
 34    ArrowUpAlt,
 35    ArrowUpFromLine,
 36    ArrowUpRight,
 37    ArrowUpRightAlt,
 38    AtSign,
 39    AudioOff,
 40    AudioOn,
 41    Backspace,
 42    Bell,
 43    BellDot,
 44    BellOff,
 45    BellRing,
 46    Binary,
 47    Blocks,
 48    Bolt,
 49    BoltFilled,
 50    BoltFilledAlt,
 51    Book,
 52    BookCopy,
 53    BookPlus,
 54    Brain,
 55    BugOff,
 56    CaseSensitive,
 57    Check,
 58    CheckDouble,
 59    ChevronDown,
 60    /// This chevron indicates a popover menu.
 61    ChevronDownSmall,
 62    ChevronLeft,
 63    ChevronRight,
 64    ChevronUp,
 65    ChevronUpDown,
 66    Circle,
 67    CircleOff,
 68    CircleHelp,
 69    Close,
 70    Cloud,
 71    Code,
 72    Cog,
 73    Command,
 74    Context,
 75    Control,
 76    Copilot,
 77    CopilotDisabled,
 78    CopilotError,
 79    CopilotInit,
 80    Copy,
 81    CountdownTimer,
 82    Crosshair,
 83    CursorIBeam,
 84    Dash,
 85    DatabaseZap,
 86    Debug,
 87    DebugBreakpoint,
 88    DebugContinue,
 89    DebugDisabledBreakpoint,
 90    DebugDisabledLogBreakpoint,
 91    DebugDetach,
 92    DebugIgnoreBreakpoints,
 93    DebugLogBreakpoint,
 94    DebugPause,
 95    DebugRestart,
 96    DebugStepBack,
 97    DebugStepInto,
 98    DebugStepOut,
 99    DebugStepOver,
100    DebugStop,
101    Delete,
102    Diff,
103    Disconnected,
104    DocumentText,
105    Download,
106    Ellipsis,
107    EllipsisVertical,
108    Envelope,
109    Eraser,
110    Escape,
111    Exit,
112    ExpandDown,
113    ExpandUp,
114    ExpandVertical,
115    ExternalLink,
116    Eye,
117    File,
118    FileCode,
119    FileCreate,
120    FileDiff,
121    FileDoc,
122    FileGeneric,
123    FileGit,
124    FileLock,
125    FileRust,
126    FileSearch,
127    FileText,
128    FileToml,
129    FileTree,
130    Filter,
131    Flame,
132    Folder,
133    FolderOpen,
134    FolderX,
135    Font,
136    FontSize,
137    FontWeight,
138    ForwardArrow,
139    Function,
140    GenericClose,
141    GenericMaximize,
142    GenericMinimize,
143    GenericRestore,
144    GitBranch,
145    GitBranchSmall,
146    Github,
147    Globe,
148    Hammer,
149    Hash,
150    HistoryRerun,
151    Image,
152    Indicator,
153    Info,
154    InlayHint,
155    Keyboard,
156    Layout,
157    Library,
158    LightBulb,
159    LineHeight,
160    Link,
161    ListCollapse,
162    ListTodo,
163    ListTree,
164    ListX,
165    LoadCircle,
166    LocationEdit,
167    LockOutlined,
168    LspDebug,
169    LspRestart,
170    LspStop,
171    MagnifyingGlass,
172    MailOpen,
173    Maximize,
174    Menu,
175    MenuAlt,
176    MessageBubbles,
177    Mic,
178    MicMute,
179    Microscope,
180    Minimize,
181    Option,
182    PageDown,
183    PageUp,
184    PanelLeft,
185    PanelRight,
186    Pencil,
187    Person,
188    PersonCircle,
189    PhoneIncoming,
190    Pin,
191    Play,
192    PlayAlt,
193    PlayBug,
194    Plus,
195    PocketKnife,
196    Power,
197    Public,
198    PullRequest,
199    Quote,
200    RefreshTitle,
201    Regex,
202    ReplNeutral,
203    Replace,
204    ReplaceAll,
205    ReplaceNext,
206    ReplyArrowRight,
207    Rerun,
208    Return,
209    Reveal,
210    RotateCcw,
211    RotateCw,
212    Route,
213    Save,
214    Scissors,
215    Screen,
216    ScrollText,
217    SearchSelection,
218    SelectAll,
219    Send,
220    Server,
221    Settings,
222    SettingsAlt,
223    Shift,
224    Slash,
225    SlashSquare,
226    Sliders,
227    SlidersVertical,
228    Snip,
229    Space,
230    Sparkle,
231    SparkleAlt,
232    SparkleFilled,
233    Spinner,
234    Split,
235    SplitAlt,
236    SquareDot,
237    SquareMinus,
238    SquarePlus,
239    Star,
240    StarFilled,
241    Stop,
242    StopFilled,
243    Strikethrough,
244    Supermaven,
245    SupermavenDisabled,
246    SupermavenError,
247    SupermavenInit,
248    SwatchBook,
249    Tab,
250    Terminal,
251    TerminalAlt,
252    TextSnippet,
253    ThumbsDown,
254    ThumbsUp,
255    ToolBulb,
256    ToolCopy,
257    ToolDeleteFile,
258    ToolDiagnostics,
259    ToolFolder,
260    ToolHammer,
261    ToolNotification,
262    ToolPencil,
263    ToolRead,
264    ToolRegex,
265    ToolSearch,
266    ToolTerminal,
267    ToolWeb,
268    Trash,
269    TrashAlt,
270    Triangle,
271    TriangleRight,
272    Undo,
273    Unpin,
274    Update,
275    UserCheck,
276    UserGroup,
277    UserRoundPen,
278    Visible,
279    Wand,
280    Warning,
281    WholeWord,
282    X,
283    XCircle,
284    ZedAssistant,
285    ZedAssistantFilled,
286    ZedBurnMode,
287    ZedBurnModeOn,
288    ZedMcpCustom,
289    ZedMcpExtension,
290    ZedPredict,
291    ZedPredictDisabled,
292    ZedPredictDown,
293    ZedPredictError,
294    ZedPredictUp,
295    ZedXCopilot,
296}
297
298impl IconName {
299    /// Returns the path to this icon.
300    pub fn path(&self) -> Arc<str> {
301        let file_stem: &'static str = self.into();
302        format!("icons/{file_stem}.svg").into()
303    }
304}