Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on how to manipulate Gnome's "Top Bar"/"Activities Bar"/"Top Panel" using GDK

Parent

how to manipulate Gnome's "Top Bar"/"Activities Bar"/"Top Panel" using GDK

+1
−0

I am using Linux and Gnome. Using GDK, I would like to programmatically manipulate the Top Bar (i.e., the bar at the top of the screen with "Activities", the time, etc.). Here is a picture of it:

top bar

I have been unable to find any information online. I have also tried using wnck, but I don't think the Top Bar is accessible through wnck.

If it isn't possible with GDK, then is it possible with another library such as GTK or X11?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

"Manipulate" in what sense? (2 comments)
Post
+2
−0

That bar is part of GNOME Shell, and user applications don't get to mess around with the shell. You need to look into writing shell extensions to modify that in a general way.

One common thing for an application to want is to show a status icon, in which case you could use an extension like this one and use any of the supported AppIndicator-like standards in your user application. Unfortunately, if you're developing an application for others to use, there's no way for you to force such icons to appear in the shell without your users installing an extension like the linked one. If you require native support without an extension, you'll have to settle for a GNotification, which won't appear in the bar.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Thanks for the answer. I was hoping there was a way to do it without having to write an extension (ma... (2 comments)
Thanks for the answer. I was hoping there was a way to do it without having to write an extension (ma...
Trevor‭ wrote almost 2 years ago

Thanks for the answer. I was hoping there was a way to do it without having to write an extension (maybe there isn't, but that was my hope).

Shouldn't it also be possible to make some changes to the top bar by modifying CSS files (e.g., a file such as /usr/share/gnome-shell/theme/gnome-classic.css)? I have played around with modifying some of these files, but have never had success.

r~~‭ wrote almost 2 years ago

I seem to recall that the default CSS that GNOME Shell uses is compiled into some binary format, not read from disk as CSS. You can extend it with, again, an extension, which at least has enough support from the GNOME team that the GNOME Tweaks application acts as a front-end for it.

Still, don't expect to be able to change everything you can change with CSS in a web page. Even things like widths tend to be determined by hard-coded layout algorithms rather than CSS rules.