end-4 / dots-hyprland

i hate minimalism so...
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.98k stars 267 forks source link

[Issue] Error: can't assign "MAYBE_ICONNAME" as icon, it is not a file nor a named icon #402

Closed favefan closed 5 months ago

favefan commented 5 months ago

From the GUI it doesn't look like there's anything wrong or I'm not aware of any elements that aren't showing up. But when I look at journalctl -b, certain errors that may be related to not finding the icon show up. Thanks.

Click to expand ```plain ags[8027]: Error: can't assign "code" as icon, it is not a file nor a named icon set icon@resource:///com/github/Aylur/ags/widgets/icon.js:40:30 _handleParamProp@resource:///com/github/Aylur/ags/widgets/widget.js:124:13 Icon@resource:///com/github/Aylur/ags/widgets/icon.js:23:14 Icon@resource:///com/github/Aylur/ags/widget.js:26:32 Window@file:///home/khun/.config/ags/modules/overview/overview_hyprland.js:68:32 default/Workspace/widget.set@file:///home/khun/.config/ags/modules/overview/overview_hyprland.js:292:37 default/OverviewRow/updateWorkspace/<@file:///home/khun/.config/ags/modules/overview/overview_hyprland.js:371:66 _init/GLib.MainLoop.prototype.runAsync/
end-4 commented 5 months ago

this is because the icon pack you use doesn't support the app, or the icon class guessing fails. It's kind of impossible to have this work 100% correctly.. But you can add something like this to the userConfigOptions object in ~/.config/ags/user_options.js:

    'icons': {
        substitutions: {
            'code': "visual-studio-code",
            'preferences-desktop-theme': "org.gnome.tweaks",
        }
    },

this way code will have vscode icon and whatever desktop theme preference app you're using will have the icon for gnome tweaks, assuming these substitutions have the correct names (idk about your icon theme)

favefan commented 5 months ago

@end-4 I see, I get it, thanks for the answer!