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