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    LockOutlined,
167    LspDebug,
168    LspRestart,
169    LspStop,
170    MagnifyingGlass,
171    MailOpen,
172    Maximize,
173    Menu,
174    MenuAlt,
175    MessageBubbles,
176    Mic,
177    MicMute,
178    Microscope,
179    Minimize,
180    Option,
181    PageDown,
182    PageUp,
183    PanelLeft,
184    PanelRight,
185    Pencil,
186    Person,
187    PersonCircle,
188    PhoneIncoming,
189    Pin,
190    Play,
191    PlayAlt,
192    PlayBug,
193    Plus,
194    PocketKnife,
195    Power,
196    Public,
197    PullRequest,
198    Quote,
199    RefreshTitle,
200    Regex,
201    ReplNeutral,
202    Replace,
203    ReplaceAll,
204    ReplaceNext,
205    ReplyArrowRight,
206    Rerun,
207    Return,
208    Reveal,
209    RotateCcw,
210    RotateCw,
211    Route,
212    Save,
213    Scissors,
214    Screen,
215    ScrollText,
216    SearchSelection,
217    SelectAll,
218    Send,
219    Server,
220    Settings,
221    SettingsAlt,
222    Shift,
223    Slash,
224    SlashSquare,
225    Sliders,
226    SlidersVertical,
227    Snip,
228    Space,
229    Sparkle,
230    SparkleAlt,
231    SparkleFilled,
232    Spinner,
233    Split,
234    SplitAlt,
235    SquareDot,
236    SquareMinus,
237    SquarePlus,
238    Star,
239    StarFilled,
240    Stop,
241    StopFilled,
242    Strikethrough,
243    Supermaven,
244    SupermavenDisabled,
245    SupermavenError,
246    SupermavenInit,
247    SwatchBook,
248    Tab,
249    Terminal,
250    TextSnippet,
251    ThumbsDown,
252    ThumbsUp,
253    ToolBulb,
254    ToolCopy,
255    ToolDeleteFile,
256    ToolDiagnostics,
257    ToolFolder,
258    ToolHammer,
259    ToolNotification,
260    ToolPencil,
261    ToolRegex,
262    ToolSearch,
263    ToolTerminal,
264    ToolWeb,
265    Trash,
266    TrashAlt,
267    Triangle,
268    TriangleRight,
269    Undo,
270    Unpin,
271    Update,
272    UserCheck,
273    UserGroup,
274    UserRoundPen,
275    Visible,
276    Wand,
277    Warning,
278    WholeWord,
279    X,
280    XCircle,
281    ZedAssistant,
282    ZedAssistantFilled,
283    ZedBurnMode,
284    ZedBurnModeOn,
285    ZedMcpCustom,
286    ZedMcpExtension,
287    ZedPredict,
288    ZedPredictDisabled,
289    ZedPredictDown,
290    ZedPredictError,
291    ZedPredictUp,
292    ZedXCopilot,
293}
294
295impl IconName {
296    /// Returns the path to this icon.
297    pub fn path(&self) -> Arc<str> {
298        let file_stem: &'static str = self.into();
299        format!("icons/{file_stem}.svg").into()
300    }
301}