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