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