You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04顶部栏应用图标替换及图标主题开发中单色应用图标定位与修改咨询

Ubuntu 22.04顶部栏应用图标替换及图标主题开发中单色应用图标定位与修改咨询

Hey there! Great question—developing an icon theme is such a fun (and sometimes tricky) project. Let me break this down for you step by step to help you locate and modify those black-and-white symbolic icons.

Locating Symbolic Icons

Symbolic (monochrome) icons for apps like Files (Nautilus) live in a few key places, depending on whether you're working with system themes or your custom user theme:

  • System-wide icon theme directories: The default system themes (like Yaru) store symbolic icons in /usr/share/icons/YOUR_THEME_NAME/. You'll find most app-related symbolic icons in subdirectories like:

    • scalable/places/: For Files/folder-related icons (e.g., folders, home directory)
    • scalable/actions/: For action icons (e.g., open, delete)
    • scalable/status/: For status icons shown in the top bar
      For example, the Yaru theme's symbolic folder icons are at /usr/share/icons/Yaru/scalable/places/.
  • Per-app icon directories: Some apps bundle their own symbolic icons. For Files (Nautilus), check /usr/share/nautilus/icons/—though keep in mind system themes usually override these, so your custom theme's icons will take precedence.

  • User-specific theme directory: If you're developing a theme locally (recommended to avoid messing with system files), store your icons in ~/.local/share/icons/YOUR_CUSTOM_THEME_NAME/. Icons here will override system-wide ones, making testing easier.

Standard Naming Conventions

Symbolic icons follow the Freedesktop.org Icon Naming Specification—this ensures your theme works consistently across apps. Here's what you need to know:

  • General category names: For core Files/folder icons, stick to standard names like folder-symbolic.svg, folder-open-symbolic.svg, and user-home-symbolic.svg. These are recognized by all apps that use folder-related icons.

  • App-specific symbolic icons: Some apps use their own symbolic icon names, often formatted as APP_NAME-symbolic.svg. For Files (Nautilus), this would be nautilus-symbolic.svg. You can check existing themes to match their naming—just browse the symbolic directories of a default theme like Yaru to see what names they use.

  • Theme index configuration: Don't forget to update your theme's index.theme file to include the directories where your symbolic icons live. Add lines like:

    [scalable/places]
    Type=Scalable
    MinSize=16
    MaxSize=512
    Context=Places
    

    This tells the system where to look for your icons and how to handle scaling.

Quick Testing Tip

After modifying your icons, you don't need to reboot. Just press Alt+F2, type r, and press Enter to restart the GNOME Shell—this will refresh the icon theme immediately.

备注:内容来源于stack exchange,提问作者Chiggiddi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 09:24:51