Initial commit.
Creating the standard Autotools infrastructure and adding the first extensions (the Hello, World! provided by the wizard).
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
EXTENSION_ID = example
|
||||
|
||||
include ../../extension.mk
|
||||
@@ -0,0 +1,19 @@
|
||||
// Sample extension code, makes clicking on the panel show a message
|
||||
const St = imports.gi.St;
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
|
||||
function _showHello() {
|
||||
let text = new St.Label({ style_class: 'helloworld-label', text: "Hello, world!" });
|
||||
let monitor = global.get_primary_monitor();
|
||||
global.stage.add_actor(text);
|
||||
text.set_position(Math.floor (monitor.width / 2 - text.width / 2), Math.floor(monitor.height / 2 - text.height / 2));
|
||||
Mainloop.timeout_add(3000, function () { text.destroy(); });
|
||||
}
|
||||
|
||||
// Put your extension initialization code here
|
||||
function main() {
|
||||
Main.panel.actor.reactive = true;
|
||||
Main.panel.actor.connect('button-release-event', _showHello);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"uuid": "example@gnome-shell-extensions.gnome.org", "name": "Hello, World!", "description": "An example extension to show how it works. Shows Hello, world when clicking on the top panel.", "shell-version": [ "2.91.5" ]}
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Example stylesheet */
|
||||
.helloworld-label {
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
background-color: rgba(10,10,10,0.7);
|
||||
border-radius: 5px;
|
||||
}
|
||||
Reference in New Issue
Block a user