Closed ulville closed 4 months ago
Alright thanks for these great informations, also I am not a Gnome-Extension dev but i wanted a tweak like this on Gnome46 so I made one with the help of chatGPT cause the GJS guide was kinda take long, can you give me a guide to on making an icon indicator?
its fixed now, ty for reporting again if u can give a guide on making icon indicator on the panel (Quicksettings section not in the free area) like caffeine icon indicator.
You mean in here? Where the mouse cursor points
If so I'm not sure but there is another extension I use which does that. Maybe you sould take a look at its code to find out. https://extensions.gnome.org/extension/5335/power-profile-indicator/
I'm sure there was something on the GJS Extensions guide for that. Or better if you need further help you should consider joining the Gnome Extensions Matrix room. There will be a lot of friendly people who are willing to help you in there. Most likely much more knowledgeable then myself
Yep thats what i mean, actually i am trying now to make it
i think i did it ill update it to gnome store asap thank u for ur information <3
The icon of the header is broken. It shows image-not-found fallback.
graphics-card-symbolic
seems to not exist anywhere in the system by default. Maybe you use an icon theme which includes it. It's not a standard icon name I suppose. You should use a standard icon name or supply the icon yourself.If you have an icon you meant to use which is not available in the Adwaita icon set in
/usr/share/icons/Adwaita
you should supply it in your extension. Add a directory namedicons
in the extension's directory and copy your symbolic icon in there. Then you can point to that icon in your code. You can take a look at Caffeine's source code as an example on how to do that.Basically the
setHeader()
function also accepts a Gio.Icon object which you can construct by callingGio.icon_new_for_string(`${path}/icons/<your-icon-name-symbolic>.svg`);
.path
variable must be passed from theExtension
class to theIndicator
class in theenable()
function. Then fromIndicator
class to theQuickMenuToggle
class.As a suggestion you can also use this icon from the https://teams.pages.gitlab.gnome.org/Design/icon-development-kit-www/ It's also available from the Icon Library. It's name is
pci-card-symbolic
https://github.com/chikobara/GPU-Switcher-Supergfxctl/blob/4dda7ebc4febbcd598de5c601296de9801044b20/extension.js#L55