Questions tagged [gnome-shell-extensions]

The Gnome Shell (Gnome 3) offers JavaScript bindings to customize and extend the shell behavior.

Extension-catalog

Developing

The JavaScript bindings are based on the Gjs project (see ), which has more documentation.

222 questions
9
votes
4 answers

How to set a PNG file in a Gnome Shell extension for St.Icon

My Gnome Shell extension has a folder 'icons' and there is an icon file called 'MyIcon.png' inside. I want to take it as a parameter to an St.Icon object. let icon = new St.Icon({ /* I need what to code here*/ }); Thanks for any help. Selcuk.
The_Cute_Hedgehog
  • 1,280
  • 13
  • 22
7
votes
1 answer

Lang.Class in Javascript

I'm trying to develop an Gnome Shell extension using GJS(Gnome Javascript), however, I came across the Lang library (I think it is a library, if not correct me). But I can't find any resources about it on the web. In the code it looks something like…
Ángel Araya
  • 225
  • 1
  • 8
7
votes
1 answer

Call Gnome Shell Shortcuts programmatically

Gnome Shell has great shortcuts, however, I don't find a way to call them programmingly Assume that I want to use a GJS script to start Google Chrome, move it to workspace 1, and maximize it, then start Emacs, move it to workspace 2, and maximize…
Zeno Zeng
  • 301
  • 3
  • 7
6
votes
1 answer

Is there any way to write unit tests for GNOME-Shell extensions

I am currently trying to refactor an existing gnome-shell extension's codebase. Part of that is introducing unit tests as it seems rather neglectful to not use tests in 2016. After some tinkering I managed to setup a working node-phantomjs-qunit…
Elbenfreund
  • 296
  • 1
  • 3
  • 12
6
votes
3 answers

Gnome shell extensions: how to run a command with pipes

So I'm making a Gnome Shell extension. And I want to be able to run some command with a pipe. (The command is actually "xrandr --query | awk 'something'", but that is off topic) So, what I have done so far is GLib.spawn_async_with_pipes(null, …
S_D
  • 61
  • 1
  • 3
6
votes
0 answers

How to access OAuth 2.0, REST API in GNOME 3.0 shell extension?

How would I port the OAuth 2.0 implict grant flow from a browser environment if I wanted to access the REST API beneath it through a GNOME shell extension ? How would I redirect the user to the OAuth 2.0 decision endpoint through a login screen? If…
Johny Jose
  • 533
  • 4
  • 11
5
votes
2 answers

Gnome Extensions - Run shell command

I am writing a simple extension to open browser by clicking the extension button. I would like to know if there is a function which can execute passed shell command as argument. Also, it'd be really helpful if anyone can suggest a good simple…
Sam Fischer
  • 51
  • 1
  • 6
5
votes
1 answer

How can my GNOME Shell extension detect the GNOME version?

I'd like to support multiple GNOME versions with my shell extension. How can I detect the GNOME version it's running on and branch the code appropriately?
Leif Arne Storset
  • 899
  • 1
  • 8
  • 19
5
votes
1 answer

Extension event loop in Gnome 3.10 vs 3.14

I wrote this accessibility extension: https://extensions.gnome.org/extension/975/keyboard-modifiers-status/ https://github.com/sneetsher/Keyboard-Modifiers-Status Which works as supposed in Gnome Shell v3.14 & v3.16 but not in v3.10. It shows the…
user.dz
  • 962
  • 2
  • 19
  • 39
4
votes
1 answer

Gnome shell extension, copy text to clipboard

I'm working on a Gnome Shell Extensions and I can't find any documentation on how to copy some string into the clipboard for the user. I searched the Gnome extensions git but without any success. Thank you for your help! :)
Cyril N.
  • 38,875
  • 36
  • 142
  • 243
4
votes
1 answer

Sharing code between a GTK/GJS App and a Gnome Shell Extension

I am developing a GTK application in GJS and like to reuse parts of the GTK code inside a Gnome Shell extension. However, I did not find a way to add a Gtk.Widget to the menu of my Gnome Shell panel icon. I tried to use GtkClutter.Actor from…
Juve
  • 10,584
  • 14
  • 63
  • 90
4
votes
2 answers

How do I check that a Gjs class has already been defined?

I am writing the preference view a GNOME shell extension and an facing issues when using the imports.lang function to write the application in an object oriented fashion. const Gtk = imports.gi.Gtk const Lang = imports.lang Gtk.init(null) const…
kiyui
  • 375
  • 3
  • 14
4
votes
1 answer

How do I log from an Extension?

I'm writing new Extension code and want to log to a file for debugging purposes. I've tried using the print() function to write to ~/.cache/gdm/session.log as explained here: http://codeisland.org/2013/making-gnome-shell-extensions/ This does not…
4
votes
2 answers

How to make Gnome Shell extension query for changes

I've been battling the horrendous Gnome API documentation and came up with this extension: const St = imports.gi.St; const Main = imports.ui.main; const Tweener = imports.ui.tweener; const GLib = imports.gi.GLib; let label; function init() { …
mart1n
  • 5,969
  • 5
  • 46
  • 83
3
votes
1 answer

how can I re-disable the hot corner in gnome-shell 40?

I used to disable gnome-shell's hot corner feature with the No Topleft Hot Corner extension. Upgrading to gnome-shell 40 has it deprecated. Gnome-tweaks claims it's able to disable it as well, but activating this "disable the hot-corner" option…
la Fleur
  • 426
  • 3
  • 11
1
2
3
14 15