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